forked from qt-creator/qt-creator
Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now. Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -245,11 +245,7 @@ void BazaarPlugin::createFileActions(const Core::Context &context)
|
|||||||
m_diffFile = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_diffFile = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = m_actionManager->registerAction(m_diffFile, Core::Id(Constants::DIFF), context);
|
command = m_actionManager->registerAction(m_diffFile, Core::Id(Constants::DIFF), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Z,Meta+D") : tr("ALT+Z,Alt+D")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+Z,Meta+D")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("ALT+Z,Alt+D")));
|
|
||||||
#endif
|
|
||||||
connect(m_diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
connect(m_diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
||||||
m_bazaarContainer->addAction(command);
|
m_bazaarContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -257,11 +253,7 @@ void BazaarPlugin::createFileActions(const Core::Context &context)
|
|||||||
m_logFile = new Utils::ParameterAction(tr("Log Current File"), tr("Log \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_logFile = new Utils::ParameterAction(tr("Log Current File"), tr("Log \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = m_actionManager->registerAction(m_logFile, Core::Id(Constants::LOG), context);
|
command = m_actionManager->registerAction(m_logFile, Core::Id(Constants::LOG), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Z,Meta+L") : tr("ALT+Z,Alt+L")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+Z,Meta+L")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("ALT+Z,Alt+L")));
|
|
||||||
#endif
|
|
||||||
connect(m_logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
|
connect(m_logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
|
||||||
m_bazaarContainer->addAction(command);
|
m_bazaarContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -269,11 +261,7 @@ void BazaarPlugin::createFileActions(const Core::Context &context)
|
|||||||
m_statusFile = new Utils::ParameterAction(tr("Status Current File"), tr("Status \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_statusFile = new Utils::ParameterAction(tr("Status Current File"), tr("Status \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = m_actionManager->registerAction(m_statusFile, Core::Id(Constants::STATUS), context);
|
command = m_actionManager->registerAction(m_statusFile, Core::Id(Constants::STATUS), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Z,Meta+S") : tr("ALT+Z,Alt+S")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+Z,Meta+S")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("ALT+Z,Alt+S")));
|
|
||||||
#endif
|
|
||||||
connect(m_statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
|
connect(m_statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
|
||||||
m_bazaarContainer->addAction(command);
|
m_bazaarContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -453,11 +441,7 @@ void BazaarPlugin::createRepositoryActions(const Core::Context &context)
|
|||||||
action = new QAction(tr("Commit..."), this);
|
action = new QAction(tr("Commit..."), this);
|
||||||
m_repositoryActionList.append(action);
|
m_repositoryActionList.append(action);
|
||||||
command = m_actionManager->registerAction(action, Core::Id(Constants::COMMIT), context);
|
command = m_actionManager->registerAction(action, Core::Id(Constants::COMMIT), context);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Z,Meta+C") : tr("ALT+Z,Alt+C")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+Z,Meta+C")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("ALT+Z,Alt+C")));
|
|
||||||
#endif
|
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
|
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
|
||||||
m_bazaarContainer->addAction(command);
|
m_bazaarContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
|
@@ -83,11 +83,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
|||||||
m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
|
m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
|
||||||
Core::Command *cmd =
|
Core::Command *cmd =
|
||||||
am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext);
|
am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext);
|
||||||
#ifndef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+M")));
|
|
||||||
#endif
|
|
||||||
mbm->addAction(cmd);
|
mbm->addAction(cmd);
|
||||||
|
|
||||||
QAction *sep = new QAction(this);
|
QAction *sep = new QAction(this);
|
||||||
@@ -98,21 +94,13 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
|
|||||||
//Previous
|
//Previous
|
||||||
m_prevAction = new QAction(tr("Previous Bookmark"), this);
|
m_prevAction = new QAction(tr("Previous Bookmark"), this);
|
||||||
cmd = am->registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, globalcontext);
|
cmd = am->registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, globalcontext);
|
||||||
#ifndef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+,") : tr("Ctrl+,")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+,")));
|
|
||||||
#endif
|
|
||||||
mbm->addAction(cmd);
|
mbm->addAction(cmd);
|
||||||
|
|
||||||
//Next
|
//Next
|
||||||
m_nextAction = new QAction(tr("Next Bookmark"), this);
|
m_nextAction = new QAction(tr("Next Bookmark"), this);
|
||||||
cmd = am->registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, globalcontext);
|
cmd = am->registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, globalcontext);
|
||||||
#ifndef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+.") : tr("Ctrl+.")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+.")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+.")));
|
|
||||||
#endif
|
|
||||||
mbm->addAction(cmd);
|
mbm->addAction(cmd);
|
||||||
|
|
||||||
sep = new QAction(this);
|
sep = new QAction(this);
|
||||||
|
@@ -49,6 +49,12 @@ namespace Core {
|
|||||||
|
|
||||||
class Context;
|
class Context;
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
enum { UseMacShortcuts = 1 };
|
||||||
|
#else
|
||||||
|
enum { UseMacShortcuts = 0 };
|
||||||
|
#endif
|
||||||
|
|
||||||
class CORE_EXPORT Command : public QObject
|
class CORE_EXPORT Command : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -369,77 +369,55 @@ EditorManager::EditorManager(QWidget *parent) :
|
|||||||
|
|
||||||
// Goto Previous In History Action
|
// Goto Previous In History Action
|
||||||
cmd = am->registerAction(d->m_gotoPreviousDocHistoryAction, Constants::GOTOPREVINHISTORY, editDesignContext);
|
cmd = am->registerAction(d->m_gotoPreviousDocHistoryAction, Constants::GOTOPREVINHISTORY, editDesignContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Alt+Tab") : tr("Ctrl+Tab")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Tab")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Tab")));
|
|
||||||
#endif
|
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
||||||
connect(d->m_gotoPreviousDocHistoryAction, SIGNAL(triggered()), this, SLOT(gotoPreviousDocHistory()));
|
connect(d->m_gotoPreviousDocHistoryAction, SIGNAL(triggered()), this, SLOT(gotoPreviousDocHistory()));
|
||||||
|
|
||||||
// Goto Next In History Action
|
// Goto Next In History Action
|
||||||
cmd = am->registerAction(d->m_gotoNextDocHistoryAction, Constants::GOTONEXTINHISTORY, editDesignContext);
|
cmd = am->registerAction(d->m_gotoNextDocHistoryAction, Constants::GOTONEXTINHISTORY, editDesignContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Alt+Shift+Tab") : tr("Ctrl+Shift+Tab")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+Tab")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+Tab")));
|
|
||||||
#endif
|
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
||||||
connect(d->m_gotoNextDocHistoryAction, SIGNAL(triggered()), this, SLOT(gotoNextDocHistory()));
|
connect(d->m_gotoNextDocHistoryAction, SIGNAL(triggered()), this, SLOT(gotoNextDocHistory()));
|
||||||
|
|
||||||
// Go back in navigation history
|
// Go back in navigation history
|
||||||
cmd = am->registerAction(d->m_goBackAction, Constants::GO_BACK, editDesignContext);
|
cmd = am->registerAction(d->m_goBackAction, Constants::GO_BACK, editDesignContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Alt+Left") : tr("Alt+Left")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Left")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Left")));
|
|
||||||
#endif
|
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
||||||
connect(d->m_goBackAction, SIGNAL(triggered()), this, SLOT(goBackInNavigationHistory()));
|
connect(d->m_goBackAction, SIGNAL(triggered()), this, SLOT(goBackInNavigationHistory()));
|
||||||
|
|
||||||
// Go forward in navigation history
|
// Go forward in navigation history
|
||||||
cmd = am->registerAction(d->m_goForwardAction, Constants::GO_FORWARD, editDesignContext);
|
cmd = am->registerAction(d->m_goForwardAction, Constants::GO_FORWARD, editDesignContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Alt+Right") : tr("Alt+Right")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Right")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Right")));
|
|
||||||
#endif
|
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
|
||||||
connect(d->m_goForwardAction, SIGNAL(triggered()), this, SLOT(goForwardInNavigationHistory()));
|
connect(d->m_goForwardAction, SIGNAL(triggered()), this, SLOT(goForwardInNavigationHistory()));
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QString prefix = tr("Meta+E");
|
|
||||||
#else
|
|
||||||
QString prefix = tr("Ctrl+E");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
d->m_splitAction = new QAction(tr("Split"), this);
|
d->m_splitAction = new QAction(tr("Split"), this);
|
||||||
cmd = am->registerAction(d->m_splitAction, Constants::SPLIT, editManagerContext);
|
cmd = am->registerAction(d->m_splitAction, Constants::SPLIT, editManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("%1,2").arg(prefix)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,2") : tr("Ctrl+E,2")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
||||||
connect(d->m_splitAction, SIGNAL(triggered()), this, SLOT(split()));
|
connect(d->m_splitAction, SIGNAL(triggered()), this, SLOT(split()));
|
||||||
|
|
||||||
d->m_splitSideBySideAction = new QAction(tr("Split Side by Side"), this);
|
d->m_splitSideBySideAction = new QAction(tr("Split Side by Side"), this);
|
||||||
cmd = am->registerAction(d->m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext);
|
cmd = am->registerAction(d->m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("%1,3").arg(prefix)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,3") : tr("Ctrl+E,3")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
||||||
connect(d->m_splitSideBySideAction, SIGNAL(triggered()), this, SLOT(splitSideBySide()));
|
connect(d->m_splitSideBySideAction, SIGNAL(triggered()), this, SLOT(splitSideBySide()));
|
||||||
|
|
||||||
d->m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this);
|
d->m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this);
|
||||||
cmd = am->registerAction(d->m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext);
|
cmd = am->registerAction(d->m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("%1,0").arg(prefix)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,0") : tr("Ctrl+E,0")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
||||||
connect(d->m_removeCurrentSplitAction, SIGNAL(triggered()), this, SLOT(removeCurrentSplit()));
|
connect(d->m_removeCurrentSplitAction, SIGNAL(triggered()), this, SLOT(removeCurrentSplit()));
|
||||||
|
|
||||||
d->m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this);
|
d->m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this);
|
||||||
cmd = am->registerAction(d->m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext);
|
cmd = am->registerAction(d->m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("%1,1").arg(prefix)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,1") : tr("Ctrl+E,1")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
||||||
connect(d->m_removeAllSplitsAction, SIGNAL(triggered()), this, SLOT(removeAllSplits()));
|
connect(d->m_removeAllSplitsAction, SIGNAL(triggered()), this, SLOT(removeAllSplits()));
|
||||||
|
|
||||||
d->m_gotoOtherSplitAction = new QAction(tr("Go to Next Split"), this);
|
d->m_gotoOtherSplitAction = new QAction(tr("Go to Next Split"), this);
|
||||||
cmd = am->registerAction(d->m_gotoOtherSplitAction, Constants::GOTO_OTHER_SPLIT, editManagerContext);
|
cmd = am->registerAction(d->m_gotoOtherSplitAction, Constants::GOTO_OTHER_SPLIT, editManagerContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("%1,o").arg(prefix)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,o") : tr("Ctrl+E,o")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
|
||||||
connect(d->m_gotoOtherSplitAction, SIGNAL(triggered()), this, SLOT(gotoOtherSplit()));
|
connect(d->m_gotoOtherSplitAction, SIGNAL(triggered()), this, SLOT(gotoOtherSplit()));
|
||||||
|
|
||||||
|
@@ -657,9 +657,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
tmpaction = new QAction(icon, tr("Save &As..."), this);
|
tmpaction = new QAction(icon, tr("Save &As..."), this);
|
||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
cmd = am->registerAction(tmpaction, Constants::SAVEAS, globalContext);
|
cmd = am->registerAction(tmpaction, Constants::SAVEAS, globalContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+S") : QString()));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
|
|
||||||
#endif
|
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
cmd->setDescription(tr("Save As..."));
|
cmd->setDescription(tr("Save As..."));
|
||||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||||
@@ -667,9 +665,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
// SaveAll Action
|
// SaveAll Action
|
||||||
m_saveAllAction = new QAction(tr("Save A&ll"), this);
|
m_saveAllAction = new QAction(tr("Save A&ll"), this);
|
||||||
cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, globalContext);
|
cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, globalContext);
|
||||||
#ifndef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString() : tr("Ctrl+Shift+S")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
|
|
||||||
#endif
|
|
||||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||||
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
||||||
|
|
||||||
@@ -755,31 +751,31 @@ void MainWindow::registerDefaultActions()
|
|||||||
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
|
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
|
||||||
m_optionsAction = new QAction(tr("&Options..."), this);
|
m_optionsAction = new QAction(tr("&Options..."), this);
|
||||||
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, globalContext);
|
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, globalContext);
|
||||||
#ifdef Q_OS_MAC
|
if (UseMacShortcuts) {
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
|
||||||
cmd->action()->setMenuRole(QAction::PreferencesRole);
|
cmd->action()->setMenuRole(QAction::PreferencesRole);
|
||||||
#endif
|
}
|
||||||
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
|
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
|
||||||
connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
|
connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
if (UseMacShortcuts) {
|
||||||
// Minimize Action
|
// Minimize Action
|
||||||
m_minimizeAction = new QAction(tr("Minimize"), this);
|
m_minimizeAction = new QAction(tr("Minimize"), this);
|
||||||
cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, globalContext);
|
cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, globalContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
||||||
connect(m_minimizeAction, SIGNAL(triggered()), this, SLOT(showMinimized()));
|
connect(m_minimizeAction, SIGNAL(triggered()), this, SLOT(showMinimized()));
|
||||||
|
|
||||||
// Zoom Action
|
// Zoom Action
|
||||||
m_zoomAction = new QAction(tr("Zoom"), this);
|
m_zoomAction = new QAction(tr("Zoom"), this);
|
||||||
cmd = am->registerAction(m_zoomAction, Constants::ZOOM_WINDOW, globalContext);
|
cmd = am->registerAction(m_zoomAction, Constants::ZOOM_WINDOW, globalContext);
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
||||||
connect(m_zoomAction, SIGNAL(triggered()), this, SLOT(showMaximized()));
|
connect(m_zoomAction, SIGNAL(triggered()), this, SLOT(showMaximized()));
|
||||||
|
|
||||||
// Window separator
|
// Window separator
|
||||||
cmd = createSeparator(am, this, Id("QtCreator.Window.Sep.Size"), globalContext);
|
cmd = createSeparator(am, this, Id("QtCreator.Window.Sep.Size"), globalContext);
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
// Show Sidebar Action
|
// Show Sidebar Action
|
||||||
m_toggleSideBarAction = new QAction(QIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
|
m_toggleSideBarAction = new QAction(QIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
|
||||||
@@ -787,11 +783,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
m_toggleSideBarAction->setCheckable(true);
|
m_toggleSideBarAction->setCheckable(true);
|
||||||
cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, globalContext);
|
cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, globalContext);
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+0") : tr("Alt+0")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+0")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+0")));
|
|
||||||
#endif
|
|
||||||
connect(m_toggleSideBarAction, SIGNAL(triggered(bool)), this, SLOT(setSidebarVisible(bool)));
|
connect(m_toggleSideBarAction, SIGNAL(triggered(bool)), this, SLOT(setSidebarVisible(bool)));
|
||||||
m_toggleSideBarButton->setDefaultAction(cmd->action());
|
m_toggleSideBarButton->setDefaultAction(cmd->action());
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_VIEWS);
|
mwindow->addAction(cmd, Constants::G_WINDOW_VIEWS);
|
||||||
@@ -799,25 +791,23 @@ void MainWindow::registerDefaultActions()
|
|||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
bool fullScreenCheckable = false;
|
bool fullScreenCheckable = false;
|
||||||
QKeySequence fullScreenKeySequence(tr("Ctrl+Meta+F"));
|
|
||||||
const QString fullScreenActionText(tr("Enter Full Screen"));
|
const QString fullScreenActionText(tr("Enter Full Screen"));
|
||||||
if (MacFullScreen::supportsFullScreen()) {
|
bool supportsFullScreen = MacFullScreen::supportsFullScreen();
|
||||||
#else
|
#else
|
||||||
bool fullScreenCheckable = true;
|
bool fullScreenCheckable = true;
|
||||||
QKeySequence fullScreenKeySequence(tr("Ctrl+Shift+F11"));
|
|
||||||
const QString fullScreenActionText(tr("Full Screen"));
|
const QString fullScreenActionText(tr("Full Screen"));
|
||||||
|
bool supportsFullScreen = true;
|
||||||
#endif
|
#endif
|
||||||
// Full Screen Action
|
if (supportsFullScreen) {
|
||||||
m_toggleFullScreenAction = new QAction(fullScreenActionText, this);
|
// Full Screen Action
|
||||||
m_toggleFullScreenAction->setCheckable(fullScreenCheckable);
|
m_toggleFullScreenAction = new QAction(fullScreenActionText, this);
|
||||||
cmd = am->registerAction(m_toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN, globalContext);
|
m_toggleFullScreenAction->setCheckable(fullScreenCheckable);
|
||||||
cmd->setDefaultKeySequence(fullScreenKeySequence);
|
cmd = am->registerAction(m_toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN, globalContext);
|
||||||
cmd->setAttribute(Command::CA_UpdateText); /* for Mac */
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Meta+F") : tr("Ctrl+Shift+F11")));
|
||||||
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
cmd->setAttribute(Command::CA_UpdateText); /* for Mac */
|
||||||
connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
mwindow->addAction(cmd, Constants::G_WINDOW_SIZE);
|
||||||
#ifdef Q_OS_MAC
|
connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Window->Views
|
// Window->Views
|
||||||
ActionContainer *mviews = am->createMenu(Constants::M_WINDOW_VIEWS);
|
ActionContainer *mviews = am->createMenu(Constants::M_WINDOW_VIEWS);
|
||||||
|
@@ -227,10 +227,8 @@ private:
|
|||||||
QAction *m_optionsAction;
|
QAction *m_optionsAction;
|
||||||
QAction *m_toggleSideBarAction;
|
QAction *m_toggleSideBarAction;
|
||||||
QAction *m_toggleFullScreenAction;
|
QAction *m_toggleFullScreenAction;
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QAction *m_minimizeAction;
|
QAction *m_minimizeAction;
|
||||||
QAction *m_zoomAction;
|
QAction *m_zoomAction;
|
||||||
#endif
|
|
||||||
|
|
||||||
QToolButton *m_toggleSideBarButton;
|
QToolButton *m_toggleSideBarButton;
|
||||||
QColor m_overrideColor;
|
QColor m_overrideColor;
|
||||||
|
@@ -212,11 +212,8 @@ void ModeManager::objectAdded(QObject *obj)
|
|||||||
// and still expect the current shortcut to change with it
|
// and still expect the current shortcut to change with it
|
||||||
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
|
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
|
||||||
== currentCmd->defaultKeySequence());
|
== currentCmd->defaultKeySequence());
|
||||||
#ifdef Q_OS_MAC
|
currentCmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString::fromLatin1("Meta+%1").arg(i+1)
|
||||||
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Meta+%1").arg(i+1)));
|
: QString::fromLatin1("Ctrl+%1").arg(i+1)));
|
||||||
#else
|
|
||||||
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Ctrl+%1").arg(i+1)));
|
|
||||||
#endif
|
|
||||||
if (currentlyHasDefaultSequence)
|
if (currentlyHasDefaultSequence)
|
||||||
currentCmd->setKeySequence(currentCmd->defaultKeySequence());
|
currentCmd->setKeySequence(currentCmd->defaultKeySequence());
|
||||||
}
|
}
|
||||||
|
@@ -236,11 +236,7 @@ void OutputPaneManager::init()
|
|||||||
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
|
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
|
||||||
|
|
||||||
cmd = am->registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax", globalContext);
|
cmd = am->registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax", globalContext);
|
||||||
#ifdef Q_OS_MAC
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+9") : tr("Alt+9")));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+9")));
|
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+9")));
|
|
||||||
#endif
|
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
cmd->setAttribute(Command::CA_UpdateIcon);
|
cmd->setAttribute(Command::CA_UpdateIcon);
|
||||||
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
|
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
|
||||||
|
@@ -174,11 +174,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
|
|||||||
|
|
||||||
m_postEditorAction = new QAction(tr("Paste Snippet..."), this);
|
m_postEditorAction = new QAction(tr("Paste Snippet..."), this);
|
||||||
command = actionManager->registerAction(m_postEditorAction, "CodePaster.Post", globalcontext);
|
command = actionManager->registerAction(m_postEditorAction, "CodePaster.Post", globalcontext);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+P") : tr("Alt+C,Alt+P")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+P")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+P")));
|
|
||||||
#endif
|
|
||||||
connect(m_postEditorAction, SIGNAL(triggered()), this, SLOT(postEditor()));
|
connect(m_postEditorAction, SIGNAL(triggered()), this, SLOT(postEditor()));
|
||||||
cpContainer->addAction(command);
|
cpContainer->addAction(command);
|
||||||
|
|
||||||
@@ -189,11 +185,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
|
|||||||
|
|
||||||
m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
|
m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
|
||||||
command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
|
command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+F") : tr("Alt+C,Alt+F")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+F")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+F")));
|
|
||||||
#endif
|
|
||||||
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
|
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
|
||||||
cpContainer->addAction(command);
|
cpContainer->addAction(command);
|
||||||
|
|
||||||
|
@@ -285,11 +285,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
command = ami->registerAction(m_diffCurrentAction,
|
command = ami->registerAction(m_diffCurrentAction,
|
||||||
CMD_ID_DIFF_CURRENT, globalcontext);
|
CMD_ID_DIFF_CURRENT, globalcontext);
|
||||||
command->setAttribute(Command::CA_UpdateText);
|
command->setAttribute(Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+D") : tr("Alt+C,Alt+D")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+D")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+D")));
|
|
||||||
#endif
|
|
||||||
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
||||||
cvsMenu->addAction(command);
|
cvsMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -318,11 +314,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
command = ami->registerAction(m_addAction, CMD_ID_ADD,
|
command = ami->registerAction(m_addAction, CMD_ID_ADD,
|
||||||
globalcontext);
|
globalcontext);
|
||||||
command->setAttribute(Command::CA_UpdateText);
|
command->setAttribute(Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+A") : tr("Alt+C,Alt+A")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+A")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+A")));
|
|
||||||
#endif
|
|
||||||
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
||||||
cvsMenu->addAction(command);
|
cvsMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -331,11 +323,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
command = ami->registerAction(m_commitCurrentAction,
|
command = ami->registerAction(m_commitCurrentAction,
|
||||||
CMD_ID_COMMIT_CURRENT, globalcontext);
|
CMD_ID_COMMIT_CURRENT, globalcontext);
|
||||||
command->setAttribute(Command::CA_UpdateText);
|
command->setAttribute(Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+C") : tr("Alt+C,Alt+C")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+C,Meta+C")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+C")));
|
|
||||||
#endif
|
|
||||||
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
|
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
|
||||||
cvsMenu->addAction(command);
|
cvsMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
|
@@ -54,11 +54,6 @@ const char OPENED_WITH_MEMORY[] = "MemoryView";
|
|||||||
// Debug action
|
// Debug action
|
||||||
const char DEBUG[] = "Debugger.Debug";
|
const char DEBUG[] = "Debugger.Debug";
|
||||||
const int P_ACTION_DEBUG = 90; // Priority for the modemanager.
|
const int P_ACTION_DEBUG = 90; // Priority for the modemanager.
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
const char DEBUG_KEY[] = "Ctrl+Y";
|
|
||||||
#else
|
|
||||||
const char DEBUG_KEY[] = "F5";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
|
|
||||||
|
@@ -385,38 +385,6 @@ namespace PE = ProjectExplorer::Constants;
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
const char STOP_KEY[] = "Shift+Ctrl+Y";
|
|
||||||
const char RESET_KEY[] = "Ctrl+Shift+F5";
|
|
||||||
const char STEP_KEY[] = "Ctrl+Shift+I";
|
|
||||||
const char STEPOUT_KEY[] = "Ctrl+Shift+T";
|
|
||||||
const char NEXT_KEY[] = "Ctrl+Shift+O";
|
|
||||||
const char REVERSE_KEY[] = "";
|
|
||||||
const char RUN_TO_LINE_KEY[] = "Shift+F8";
|
|
||||||
const char RUN_TO_SELECTED_FUNCTION_KEY[] = "Ctrl+F6";
|
|
||||||
const char JUMP_TO_LINE_KEY[] = "Ctrl+D,Ctrl+L";
|
|
||||||
const char TOGGLE_BREAK_KEY[] = "F8";
|
|
||||||
const char BREAK_BY_FUNCTION_KEY[] = "Ctrl+D,Ctrl+F";
|
|
||||||
const char BREAK_AT_MAIN_KEY[] = "Ctrl+D,Ctrl+M";
|
|
||||||
const char ADD_TO_WATCH_KEY[] = "Ctrl+D,Ctrl+W";
|
|
||||||
const char SNAPSHOT_KEY[] = "Ctrl+D,Ctrl+S";
|
|
||||||
#else
|
|
||||||
const char STOP_KEY[] = "Shift+F5";
|
|
||||||
const char RESET_KEY[] = "Ctrl+Shift+F5";
|
|
||||||
const char STEP_KEY[] = "F11";
|
|
||||||
const char STEPOUT_KEY[] = "Shift+F11";
|
|
||||||
const char NEXT_KEY[] = "F10";
|
|
||||||
const char REVERSE_KEY[] = "F12";
|
|
||||||
const char RUN_TO_LINE_KEY[] = "Ctrl+F10";
|
|
||||||
const char RUN_TO_SELECTED_FUNCTION_KEY[] = "Ctrl+F6";
|
|
||||||
const char JUMP_TO_LINE_KEY[] = "";
|
|
||||||
const char TOGGLE_BREAK_KEY[] = "F9";
|
|
||||||
const char BREAK_BY_FUNCTION_KEY[] = "";
|
|
||||||
const char BREAK_AT_MAIN_KEY[] = "";
|
|
||||||
const char ADD_TO_WATCH_KEY[] = "Ctrl+Alt+Q";
|
|
||||||
const char SNAPSHOT_KEY[] = "Ctrl+D,Ctrl+S";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
|
|
||||||
|
|
||||||
@@ -2871,6 +2839,8 @@ QMessageBox *showMessageBox(int icon, const QString &title,
|
|||||||
|
|
||||||
void DebuggerPluginPrivate::extensionsInitialized()
|
void DebuggerPluginPrivate::extensionsInitialized()
|
||||||
{
|
{
|
||||||
|
const QKeySequence debugKey = QKeySequence(UseMacShortcuts ? tr("Ctrl+Y") : tr("F5"));
|
||||||
|
|
||||||
m_coreSettings = ICore::settings();
|
m_coreSettings = ICore::settings();
|
||||||
|
|
||||||
m_debuggerSettings = new DebuggerSettings(m_coreSettings);
|
m_debuggerSettings = new DebuggerSettings(m_coreSettings);
|
||||||
@@ -3158,7 +3128,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_startAction, Constants::DEBUG, globalcontext);
|
cmd = am->registerAction(m_startAction, Constants::DEBUG, globalcontext);
|
||||||
cmd->setDescription(tr("Start Debugging"));
|
cmd->setDescription(tr("Start Debugging"));
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::DEBUG_KEY)));
|
cmd->setDefaultKeySequence(debugKey);
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
mstart->addAction(cmd, CC::G_DEFAULT_ONE);
|
mstart->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||||
|
|
||||||
@@ -3254,7 +3224,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_continueAction,
|
cmd = am->registerAction(m_continueAction,
|
||||||
Constants::CONTINUE, globalcontext);
|
Constants::CONTINUE, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::DEBUG_KEY)));
|
cmd->setDefaultKeySequence(debugKey);
|
||||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||||
|
|
||||||
cmd = am->registerAction(m_exitAction,
|
cmd = am->registerAction(m_exitAction,
|
||||||
@@ -3269,11 +3239,10 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_hiddenStopAction,
|
cmd = am->registerAction(m_hiddenStopAction,
|
||||||
Constants::HIDDEN_STOP, globalcontext);
|
Constants::HIDDEN_STOP, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::STOP_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+Ctrl+Y") : tr("Shift+F5")));
|
||||||
|
|
||||||
cmd = am->registerAction(m_abortAction,
|
cmd = am->registerAction(m_abortAction,
|
||||||
Constants::ABORT, globalcontext);
|
Constants::ABORT, globalcontext);
|
||||||
//cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::RESET_KEY)));
|
|
||||||
cmd->setDescription(tr("Reset Debugger"));
|
cmd->setDescription(tr("Reset Debugger"));
|
||||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||||
|
|
||||||
@@ -3284,34 +3253,33 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_nextAction,
|
cmd = am->registerAction(m_nextAction,
|
||||||
Constants::NEXT, globalcontext);
|
Constants::NEXT, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::NEXT_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10")));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_stepAction,
|
cmd = am->registerAction(m_stepAction,
|
||||||
Constants::STEP, globalcontext);
|
Constants::STEP, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::STEP_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+I") : tr("F11")));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
cmd->setAttribute(Command::CA_UpdateText);
|
cmd->setAttribute(Command::CA_UpdateText);
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_stepOutAction,
|
cmd = am->registerAction(m_stepOutAction,
|
||||||
Constants::STEPOUT, cppDebuggercontext);
|
Constants::STEPOUT, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::STEPOUT_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+T") : tr("Shift+F11")));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_runToLineAction,
|
cmd = am->registerAction(m_runToLineAction,
|
||||||
"Debugger.RunToLine", cppDebuggercontext);
|
"Debugger.RunToLine", cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::RUN_TO_LINE_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+F8") : tr("Ctrl+F10")));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_runToSelectedFunctionAction,
|
cmd = am->registerAction(m_runToSelectedFunctionAction,
|
||||||
"Debugger.RunToSelectedFunction", cppDebuggercontext);
|
"Debugger.RunToSelectedFunction", cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+F6") : tr("Ctrl+F6")));
|
||||||
QLatin1String(Constants::RUN_TO_SELECTED_FUNCTION_KEY)));
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
// Don't add to menu by default as keeping its enabled state
|
// Don't add to menu by default as keeping its enabled state
|
||||||
// and text up-to-date is a lot of hassle.
|
// and text up-to-date is a lot of hassle.
|
||||||
@@ -3329,7 +3297,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_reverseDirectionAction,
|
cmd = am->registerAction(m_reverseDirectionAction,
|
||||||
Constants::REVERSE, cppDebuggercontext);
|
Constants::REVERSE, cppDebuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::REVERSE_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString() : tr("F12")));
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
|
|
||||||
@@ -3340,7 +3308,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
//cmd = am->registerAction(m_snapshotAction,
|
//cmd = am->registerAction(m_snapshotAction,
|
||||||
// "Debugger.Snapshot", cppDebuggercontext);
|
// "Debugger.Snapshot", cppDebuggercontext);
|
||||||
//cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::SNAPSHOT_KEY)));
|
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+S")));
|
||||||
//cmd->setAttribute(Command::CA_Hide);
|
//cmd->setAttribute(Command::CA_Hide);
|
||||||
//debugMenu->addAction(cmd);
|
//debugMenu->addAction(cmd);
|
||||||
|
|
||||||
@@ -3356,7 +3324,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
|
|
||||||
cmd = am->registerAction(m_breakAction,
|
cmd = am->registerAction(m_breakAction,
|
||||||
"Debugger.ToggleBreak", globalcontext);
|
"Debugger.ToggleBreak", globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(QLatin1String(Constants::TOGGLE_BREAK_KEY)));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("F8") : tr("F9")));
|
||||||
debugMenu->addAction(cmd);
|
debugMenu->addAction(cmd);
|
||||||
connect(m_breakAction, SIGNAL(triggered()),
|
connect(m_breakAction, SIGNAL(triggered()),
|
||||||
SLOT(toggleBreakpoint()));
|
SLOT(toggleBreakpoint()));
|
||||||
|
@@ -105,12 +105,6 @@
|
|||||||
|
|
||||||
static const char settingsGroupC[] = "Designer";
|
static const char settingsGroupC[] = "Designer";
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
enum { osMac = 1 };
|
|
||||||
#else
|
|
||||||
enum { osMac = 0 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Actions of the designer plugin:
|
/* Actions of the designer plugin:
|
||||||
* Designer provides a toolbar which is subject to a context change (to
|
* Designer provides a toolbar which is subject to a context change (to
|
||||||
* "edit mode" context) when it is focused.
|
* "edit mode" context) when it is focused.
|
||||||
@@ -499,12 +493,12 @@ void FormEditorW::setupActions()
|
|||||||
|
|
||||||
//tool actions
|
//tool actions
|
||||||
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutHorizontally"));
|
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutHorizontally"));
|
||||||
const QString horizLayoutShortcut = osMac ? tr("Meta+Shift+H") : tr("Ctrl+H");
|
const QString horizLayoutShortcut = Core::UseMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+H");
|
||||||
addToolAction(m_fwm->actionHorizontalLayout(), am, m_contexts,
|
addToolAction(m_fwm->actionHorizontalLayout(), am, m_contexts,
|
||||||
m_toolActionIds.back(), mformtools, horizLayoutShortcut);
|
m_toolActionIds.back(), mformtools, horizLayoutShortcut);
|
||||||
|
|
||||||
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutVertically"));
|
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutVertically"));
|
||||||
const QString vertLayoutShortcut = osMac ? tr("Meta+L") : tr("Ctrl+L");
|
const QString vertLayoutShortcut = Core::UseMacShortcuts ? tr("Meta+L") : tr("Ctrl+L");
|
||||||
addToolAction(m_fwm->actionVerticalLayout(), am, m_contexts,
|
addToolAction(m_fwm->actionVerticalLayout(), am, m_contexts,
|
||||||
m_toolActionIds.back(), mformtools, vertLayoutShortcut);
|
m_toolActionIds.back(), mformtools, vertLayoutShortcut);
|
||||||
|
|
||||||
@@ -521,7 +515,7 @@ void FormEditorW::setupActions()
|
|||||||
m_toolActionIds.back(), mformtools);
|
m_toolActionIds.back(), mformtools);
|
||||||
|
|
||||||
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutGrid"));
|
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutGrid"));
|
||||||
const QString gridShortcut = osMac ? tr("Meta+Shift+G") : tr("Ctrl+G");
|
const QString gridShortcut = Core::UseMacShortcuts ? tr("Meta+Shift+G") : tr("Ctrl+G");
|
||||||
addToolAction(m_fwm->actionGridLayout(), am, m_contexts,
|
addToolAction(m_fwm->actionGridLayout(), am, m_contexts,
|
||||||
m_toolActionIds.back(), mformtools, gridShortcut);
|
m_toolActionIds.back(), mformtools, gridShortcut);
|
||||||
|
|
||||||
@@ -530,7 +524,7 @@ void FormEditorW::setupActions()
|
|||||||
m_toolActionIds.back(), mformtools);
|
m_toolActionIds.back(), mformtools);
|
||||||
|
|
||||||
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutAdjustSize"));
|
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutAdjustSize"));
|
||||||
const QString adjustShortcut = osMac ? tr("Meta+J") : tr("Ctrl+J");
|
const QString adjustShortcut = Core::UseMacShortcuts ? tr("Meta+J") : tr("Ctrl+J");
|
||||||
addToolAction(m_fwm->actionAdjustSize(), am, m_contexts,
|
addToolAction(m_fwm->actionAdjustSize(), am, m_contexts,
|
||||||
m_toolActionIds.back(), mformtools, adjustShortcut);
|
m_toolActionIds.back(), mformtools, adjustShortcut);
|
||||||
|
|
||||||
|
@@ -107,7 +107,6 @@ namespace Constants {
|
|||||||
|
|
||||||
const char INSTALL_HANDLER[] = "TextEditor.FakeVimHandler";
|
const char INSTALL_HANDLER[] = "TextEditor.FakeVimHandler";
|
||||||
const char MINI_BUFFER[] = "TextEditor.FakeVimMiniBuffer";
|
const char MINI_BUFFER[] = "TextEditor.FakeVimMiniBuffer";
|
||||||
const char INSTALL_KEY[] = "Alt+V,Alt+V";
|
|
||||||
const char SETTINGS_CATEGORY[] = "D.FakeVim";
|
const char SETTINGS_CATEGORY[] = "D.FakeVim";
|
||||||
const char SETTINGS_CATEGORY_FAKEVIM_ICON[] = ":/core/images/category_fakevim.png";
|
const char SETTINGS_CATEGORY_FAKEVIM_ICON[] = ":/core/images/category_fakevim.png";
|
||||||
const char SETTINGS_ID[] = "A.General";
|
const char SETTINGS_ID[] = "A.General";
|
||||||
@@ -971,7 +970,7 @@ bool FakeVimPluginPrivate::initialize()
|
|||||||
Core::Command *cmd = 0;
|
Core::Command *cmd = 0;
|
||||||
cmd = actionManager->registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
cmd = actionManager->registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
||||||
Constants::INSTALL_HANDLER, globalcontext, true);
|
Constants::INSTALL_HANDLER, globalcontext, true);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::INSTALL_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+V,Alt+V")));
|
||||||
|
|
||||||
ActionContainer *advancedMenu =
|
ActionContainer *advancedMenu =
|
||||||
actionManager->actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
actionManager->actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||||
@@ -982,9 +981,8 @@ bool FakeVimPluginPrivate::initialize()
|
|||||||
act->setText(tr("Execute User Action #%1").arg(i));
|
act->setText(tr("Execute User Action #%1").arg(i));
|
||||||
act->setData(i);
|
act->setData(i);
|
||||||
QString id = QString("FakeVim.UserAction%1").arg(i);
|
QString id = QString("FakeVim.UserAction%1").arg(i);
|
||||||
QString keys = QString("Alt+V,%1").arg(i);
|
|
||||||
cmd = actionManager->registerAction(act, Core::Id(id), globalcontext);
|
cmd = actionManager->registerAction(act, Core::Id(id), globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(keys));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+V,%1").arg(i)));
|
||||||
connect(act, SIGNAL(triggered()), SLOT(userActionTriggered()));
|
connect(act, SIGNAL(triggered()), SLOT(userActionTriggered()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -328,33 +328,20 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
tr("Blame Current File"), tr("Blame for \"%1\""),
|
tr("Blame Current File"), tr("Blame for \"%1\""),
|
||||||
Core::Id("Git.Blame"),
|
Core::Id("Git.Blame"),
|
||||||
globalcontext, true, SLOT(blameFile()));
|
globalcontext, true, SLOT(blameFile()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+B") : tr("Alt+G,Alt+B")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+B")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parameterActionCommand
|
parameterActionCommand
|
||||||
= createFileAction(actionManager, gitContainer,
|
= createFileAction(actionManager, gitContainer,
|
||||||
tr("Diff Current File"), tr("Diff of \"%1\""),
|
tr("Diff Current File"), tr("Diff of \"%1\""),
|
||||||
Core::Id("Git.Diff"), globalcontext, true,
|
Core::Id("Git.Diff"), globalcontext, true,
|
||||||
SLOT(diffCurrentFile()));
|
SLOT(diffCurrentFile()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+D") : tr("Alt+G,Alt+D")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+D")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parameterActionCommand
|
parameterActionCommand
|
||||||
= createFileAction(actionManager, gitContainer,
|
= createFileAction(actionManager, gitContainer,
|
||||||
tr("Log Current File"), tr("Log of \"%1\""),
|
tr("Log Current File"), tr("Log of \"%1\""),
|
||||||
Core::Id("Git.Log"), globalcontext, true, SLOT(logFile()));
|
Core::Id("Git.Log"), globalcontext, true, SLOT(logFile()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+L") : tr("Alt+G,Alt+L")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+L")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// ------
|
// ------
|
||||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.File"), this));
|
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.File"), this));
|
||||||
@@ -363,11 +350,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
= createFileAction(actionManager, gitContainer,
|
= createFileAction(actionManager, gitContainer,
|
||||||
tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"),
|
tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"),
|
||||||
Core::Id("Git.Stage"), globalcontext, true, SLOT(stageFile()));
|
Core::Id("Git.Stage"), globalcontext, true, SLOT(stageFile()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+A") : tr("Alt+G,Alt+A")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+A")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parameterActionCommand
|
parameterActionCommand
|
||||||
= createFileAction(actionManager, gitContainer,
|
= createFileAction(actionManager, gitContainer,
|
||||||
@@ -385,12 +368,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""),
|
tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""),
|
||||||
Core::Id("Git.Undo"), globalcontext,
|
Core::Id("Git.Undo"), globalcontext,
|
||||||
true, SLOT(undoFileChanges()));
|
true, SLOT(undoFileChanges()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+U") : tr("Alt+G,Alt+U")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+U")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// ------------
|
// ------------
|
||||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.Project"), this));
|
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.Project"), this));
|
||||||
@@ -401,22 +379,14 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
Core::Id("Git.DiffProject"),
|
Core::Id("Git.DiffProject"),
|
||||||
globalcontext, true,
|
globalcontext, true,
|
||||||
SLOT(diffCurrentProject()));
|
SLOT(diffCurrentProject()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+Shift+D") : tr("Alt+G,Alt+Shift+D")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+Shift+D")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+Shift+D")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parameterActionCommand
|
parameterActionCommand
|
||||||
= createProjectAction(actionManager, gitContainer,
|
= createProjectAction(actionManager, gitContainer,
|
||||||
tr("Log Project"), tr("Log Project \"%1\""),
|
tr("Log Project"), tr("Log Project \"%1\""),
|
||||||
Core::Id("Git.LogProject"), globalcontext, true,
|
Core::Id("Git.LogProject"), globalcontext, true,
|
||||||
SLOT(logProject()));
|
SLOT(logProject()));
|
||||||
#ifdef Q_OS_MAC
|
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+K") : tr("Alt+G,Alt+K")));
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+K")));
|
|
||||||
#else
|
|
||||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
parameterActionCommand
|
parameterActionCommand
|
||||||
= createProjectAction(actionManager, gitContainer,
|
= createProjectAction(actionManager, gitContainer,
|
||||||
@@ -560,11 +530,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|||||||
actionCommand = createRepositoryAction(actionManager, gitContainer,
|
actionCommand = createRepositoryAction(actionManager, gitContainer,
|
||||||
tr("Commit..."), Core::Id("Git.Commit"),
|
tr("Commit..."), Core::Id("Git.Commit"),
|
||||||
globalcontext, true, SLOT(startCommit()));
|
globalcontext, true, SLOT(startCommit()));
|
||||||
#ifdef Q_OS_MAC
|
actionCommand.second->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+G,Meta+C") : tr("Alt+G,Alt+C")));
|
||||||
actionCommand.second->setDefaultKeySequence(QKeySequence(tr("Meta+G,Meta+C")));
|
|
||||||
#else
|
|
||||||
actionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
createRepositoryAction(actionManager, gitContainer,
|
createRepositoryAction(actionManager, gitContainer,
|
||||||
tr("Amend Last Commit..."), Core::Id("Git.AmendCommit"),
|
tr("Amend Last Commit..."), Core::Id("Git.AmendCommit"),
|
||||||
|
@@ -88,22 +88,14 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
|||||||
|
|
||||||
QAction *startMacro = new QAction(tr("Record Macro"), this);
|
QAction *startMacro = new QAction(tr("Record Macro"), this);
|
||||||
Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext);
|
Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+(")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+(")));
|
|
||||||
#endif
|
|
||||||
mmacrotools->addAction(command);
|
mmacrotools->addAction(command);
|
||||||
connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro()));
|
connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro()));
|
||||||
|
|
||||||
QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
|
QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
|
||||||
endMacro->setEnabled(false);
|
endMacro->setEnabled(false);
|
||||||
command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext);
|
command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+)")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+)")));
|
|
||||||
#endif
|
|
||||||
mmacrotools->addAction(command);
|
mmacrotools->addAction(command);
|
||||||
connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro()));
|
connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro()));
|
||||||
|
|
||||||
|
@@ -233,11 +233,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
|||||||
diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
|
diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||||
command = actionManager->registerAction(diffFile, Core::Id(Constants::DIFF), context);
|
command = actionManager->registerAction(diffFile, Core::Id(Constants::DIFF), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+D") : tr("Alt+H,Alt+D")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+D")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+D")));
|
|
||||||
#endif
|
|
||||||
connect(diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
connect(diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
||||||
mercurialContainer->addAction(command);
|
mercurialContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -245,11 +241,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
|||||||
logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this);
|
logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||||
command = actionManager->registerAction(logFile, Core::Id(Constants::LOG), context);
|
command = actionManager->registerAction(logFile, Core::Id(Constants::LOG), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+L") : tr("Alt+H,Alt+L")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+L")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+L")));
|
|
||||||
#endif
|
|
||||||
connect(logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
|
connect(logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
|
||||||
mercurialContainer->addAction(command);
|
mercurialContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -257,11 +249,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
|||||||
statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this);
|
statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||||
command = actionManager->registerAction(statusFile, Core::Id(Constants::STATUS), context);
|
command = actionManager->registerAction(statusFile, Core::Id(Constants::STATUS), context);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+S") : tr("Alt+H,Alt+S")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+S")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+S")));
|
|
||||||
#endif
|
|
||||||
connect(statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
|
connect(statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
|
||||||
mercurialContainer->addAction(command);
|
mercurialContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -451,11 +439,7 @@ void MercurialPlugin::createRepositoryActions(const Core::Context &context)
|
|||||||
action = new QAction(tr("Commit..."), this);
|
action = new QAction(tr("Commit..."), this);
|
||||||
m_repositoryActionList.append(action);
|
m_repositoryActionList.append(action);
|
||||||
command = actionManager->registerAction(action, Core::Id(Constants::COMMIT), context);
|
command = actionManager->registerAction(action, Core::Id(Constants::COMMIT), context);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+C") : tr("Alt+H,Alt+C")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+C")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+C")));
|
|
||||||
#endif
|
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
|
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
|
||||||
mercurialContainer->addAction(command);
|
mercurialContainer->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
|
@@ -294,11 +294,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_filelogCurrentAction = new Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_filelogCurrentAction = new Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = am->registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, globalcontext);
|
command = am->registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+F") : tr("Alt+P,Alt+F")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+F")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+F")));
|
|
||||||
#endif
|
|
||||||
command->setDescription(tr("Filelog Current File"));
|
command->setDescription(tr("Filelog Current File"));
|
||||||
connect(m_filelogCurrentAction, SIGNAL(triggered()), this, SLOT(filelogCurrentFile()));
|
connect(m_filelogCurrentAction, SIGNAL(triggered()), this, SLOT(filelogCurrentFile()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
@@ -309,11 +305,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_editAction = new Utils::ParameterAction(tr("Edit"), tr("Edit \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_editAction = new Utils::ParameterAction(tr("Edit"), tr("Edit \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = am->registerAction(m_editAction, CMD_ID_EDIT, globalcontext);
|
command = am->registerAction(m_editAction, CMD_ID_EDIT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+E") : tr("Alt+P,Alt+E")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+E")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+E")));
|
|
||||||
#endif
|
|
||||||
command->setDescription(tr("Edit File"));
|
command->setDescription(tr("Edit File"));
|
||||||
connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile()));
|
connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
@@ -322,11 +314,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_addAction = new Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_addAction = new Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = am->registerAction(m_addAction, CMD_ID_ADD, globalcontext);
|
command = am->registerAction(m_addAction, CMD_ID_ADD, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+A") : tr("Alt+P,Alt+A")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+A")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+A")));
|
|
||||||
#endif
|
|
||||||
command->setDescription(tr("Add File"));
|
command->setDescription(tr("Add File"));
|
||||||
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
@@ -343,11 +331,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_revertFileAction = new Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_revertFileAction = new Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = am->registerAction(m_revertFileAction, CMD_ID_REVERT, globalcontext);
|
command = am->registerAction(m_revertFileAction, CMD_ID_REVERT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+R") : tr("Alt+P,Alt+R")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+R")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+R")));
|
|
||||||
#endif
|
|
||||||
command->setDescription(tr("Revert File"));
|
command->setDescription(tr("Revert File"));
|
||||||
connect(m_revertFileAction, SIGNAL(triggered()), this, SLOT(revertCurrentFile()));
|
connect(m_revertFileAction, SIGNAL(triggered()), this, SLOT(revertCurrentFile()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
@@ -359,11 +343,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_diffProjectAction = new Utils::ParameterAction(diffProjectDefaultText, tr("Diff Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
|
m_diffProjectAction = new Utils::ParameterAction(diffProjectDefaultText, tr("Diff Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
|
||||||
command = am->registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, globalcontext);
|
command = am->registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+D") : tr("Alt+P,Alt+D")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+D")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+D")));
|
|
||||||
#endif
|
|
||||||
command->setDescription(diffProjectDefaultText);
|
command->setDescription(diffProjectDefaultText);
|
||||||
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject()));
|
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
@@ -379,11 +359,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
m_submitProjectAction = new Utils::ParameterAction(tr("Submit Project"), tr("Submit Project \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
m_submitProjectAction = new Utils::ParameterAction(tr("Submit Project"), tr("Submit Project \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
|
||||||
command = am->registerAction(m_submitProjectAction, CMD_ID_SUBMIT, globalcontext);
|
command = am->registerAction(m_submitProjectAction, CMD_ID_SUBMIT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+S") : tr("Alt+P,Alt+S")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+S")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+S")));
|
|
||||||
#endif
|
|
||||||
connect(m_submitProjectAction, SIGNAL(triggered()), this, SLOT(startSubmitProject()));
|
connect(m_submitProjectAction, SIGNAL(triggered()), this, SLOT(startSubmitProject()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -421,11 +397,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
|||||||
|
|
||||||
m_openedAction = new QAction(tr("Opened"), this);
|
m_openedAction = new QAction(tr("Opened"), this);
|
||||||
command = am->registerAction(m_openedAction, CMD_ID_OPENED, globalcontext);
|
command = am->registerAction(m_openedAction, CMD_ID_OPENED, globalcontext);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+P,Meta+O") : tr("Alt+P,Alt+O")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+P,Meta+O")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+P,Alt+O")));
|
|
||||||
#endif
|
|
||||||
connect(m_openedAction, SIGNAL(triggered()), this, SLOT(printOpenedFileList()));
|
connect(m_openedAction, SIGNAL(triggered()), this, SLOT(printOpenedFileList()));
|
||||||
mperforce->addAction(command);
|
mperforce->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
|
@@ -217,11 +217,8 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
|
|||||||
|
|
||||||
QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this);
|
QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this);
|
||||||
cmd = am->registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context);
|
cmd = am->registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context);
|
||||||
#ifdef Q_OS_MACX
|
cmd->setDefaultKeySequence(Core::UseMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space)
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space));
|
: QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space));
|
||||||
#else
|
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space));
|
|
||||||
#endif
|
|
||||||
connect(showQuickToolbar, SIGNAL(triggered()), this, SLOT(showContextPane()));
|
connect(showQuickToolbar, SIGNAL(triggered()), this, SLOT(showContextPane()));
|
||||||
contextMenu->addAction(cmd);
|
contextMenu->addAction(cmd);
|
||||||
qmlToolsMenu->addAction(cmd);
|
qmlToolsMenu->addAction(cmd);
|
||||||
|
@@ -309,11 +309,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
|
|||||||
command = ami->registerAction(m_diffCurrentAction,
|
command = ami->registerAction(m_diffCurrentAction,
|
||||||
CMD_ID_DIFF_CURRENT, globalcontext);
|
CMD_ID_DIFF_CURRENT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+S,Meta+D") : tr("Alt+S,Alt+D")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+S,Meta+D")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+D")));
|
|
||||||
#endif
|
|
||||||
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
||||||
subversionMenu->addAction(command);
|
subversionMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -342,11 +338,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
|
|||||||
command = ami->registerAction(m_addAction, CMD_ID_ADD,
|
command = ami->registerAction(m_addAction, CMD_ID_ADD,
|
||||||
globalcontext);
|
globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+S,Meta+A") : tr("Alt+S,Alt+A")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+S,Meta+A")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+A")));
|
|
||||||
#endif
|
|
||||||
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
|
||||||
subversionMenu->addAction(command);
|
subversionMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
@@ -355,11 +347,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
|
|||||||
command = ami->registerAction(m_commitCurrentAction,
|
command = ami->registerAction(m_commitCurrentAction,
|
||||||
CMD_ID_COMMIT_CURRENT, globalcontext);
|
CMD_ID_COMMIT_CURRENT, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
command->setAttribute(Core::Command::CA_UpdateText);
|
||||||
#ifdef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+S,Meta+C") : tr("Alt+S,Alt+C")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+S,Meta+C")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+C")));
|
|
||||||
#endif
|
|
||||||
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
|
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
|
||||||
subversionMenu->addAction(command);
|
subversionMenu->addAction(command);
|
||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
|
@@ -170,16 +170,10 @@ void TextEditorActionHandler::createActions()
|
|||||||
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
||||||
connect(m_formatAction, SIGNAL(triggered(bool)), this, SLOT(formatAction()));
|
connect(m_formatAction, SIGNAL(triggered(bool)), this, SLOT(formatAction()));
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
QString modifier = tr("Meta");
|
|
||||||
#else
|
|
||||||
QString modifier = tr("Ctrl");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_rewrapParagraphAction = new QAction(tr("&Rewrap Paragraph"), this);
|
m_rewrapParagraphAction = new QAction(tr("&Rewrap Paragraph"), this);
|
||||||
m_modifyingActions << m_rewrapParagraphAction;
|
m_modifyingActions << m_rewrapParagraphAction;
|
||||||
command = am->registerAction(m_rewrapParagraphAction, TextEditor::Constants::REWRAP_PARAGRAPH, m_contextId, true);
|
command = am->registerAction(m_rewrapParagraphAction, TextEditor::Constants::REWRAP_PARAGRAPH, m_contextId, true);
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("%1+E, R").arg(modifier)));
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, R") : tr("Ctrl+E, R")));
|
||||||
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
||||||
connect(m_rewrapParagraphAction, SIGNAL(triggered(bool)), this, SLOT(rewrapParagraphAction()));
|
connect(m_rewrapParagraphAction, SIGNAL(triggered(bool)), this, SLOT(rewrapParagraphAction()));
|
||||||
|
|
||||||
@@ -188,7 +182,7 @@ void TextEditorActionHandler::createActions()
|
|||||||
m_visualizeWhitespaceAction->setCheckable(true);
|
m_visualizeWhitespaceAction->setCheckable(true);
|
||||||
command = am->registerAction(m_visualizeWhitespaceAction,
|
command = am->registerAction(m_visualizeWhitespaceAction,
|
||||||
TextEditor::Constants::VISUALIZE_WHITESPACE, m_contextId);
|
TextEditor::Constants::VISUALIZE_WHITESPACE, m_contextId);
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("%1+E, %2+V").arg(modifier, modifier)));
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, Meta+V") : tr("Ctrl+E, Ctrl+V")));
|
||||||
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
||||||
connect(m_visualizeWhitespaceAction, SIGNAL(triggered(bool)), this, SLOT(setVisualizeWhitespace(bool)));
|
connect(m_visualizeWhitespaceAction, SIGNAL(triggered(bool)), this, SLOT(setVisualizeWhitespace(bool)));
|
||||||
|
|
||||||
@@ -203,7 +197,7 @@ void TextEditorActionHandler::createActions()
|
|||||||
m_textWrappingAction = new QAction(tr("Enable Text &Wrapping"), this);
|
m_textWrappingAction = new QAction(tr("Enable Text &Wrapping"), this);
|
||||||
m_textWrappingAction->setCheckable(true);
|
m_textWrappingAction->setCheckable(true);
|
||||||
command = am->registerAction(m_textWrappingAction, TextEditor::Constants::TEXT_WRAPPING, m_contextId);
|
command = am->registerAction(m_textWrappingAction, TextEditor::Constants::TEXT_WRAPPING, m_contextId);
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("%1+E, %2+W").arg(modifier, modifier)));
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, Meta+W") : tr("Ctrl+E, Ctrl+W")));
|
||||||
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
|
||||||
connect(m_textWrappingAction, SIGNAL(triggered(bool)), this, SLOT(setTextWrapping(bool)));
|
connect(m_textWrappingAction, SIGNAL(triggered(bool)), this, SLOT(setTextWrapping(bool)));
|
||||||
|
|
||||||
@@ -282,9 +276,7 @@ void TextEditorActionHandler::createActions()
|
|||||||
|
|
||||||
m_resetFontSizeAction = new QAction(tr("Reset Font Size"), this);
|
m_resetFontSizeAction = new QAction(tr("Reset Font Size"), this);
|
||||||
command = am->registerAction(m_resetFontSizeAction, Constants::RESET_FONT_SIZE, m_contextId);
|
command = am->registerAction(m_resetFontSizeAction, Constants::RESET_FONT_SIZE, m_contextId);
|
||||||
#ifndef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? QString() : tr("Ctrl+0")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+0")));
|
|
||||||
#endif
|
|
||||||
connect(m_resetFontSizeAction, SIGNAL(triggered()), this, SLOT(resetFontSize()));
|
connect(m_resetFontSizeAction, SIGNAL(triggered()), this, SLOT(resetFontSize()));
|
||||||
advancedMenu->addAction(command, Core::Constants::G_EDIT_FONT);
|
advancedMenu->addAction(command, Core::Constants::G_EDIT_FONT);
|
||||||
|
|
||||||
|
@@ -189,11 +189,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
|
|||||||
// Make sure the shortcut still works when the completion widget is active
|
// Make sure the shortcut still works when the completion widget is active
|
||||||
completionShortcut->setContext(Qt::ApplicationShortcut);
|
completionShortcut->setContext(Qt::ApplicationShortcut);
|
||||||
Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context);
|
Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context);
|
||||||
#ifndef Q_OS_MAC
|
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space")));
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space")));
|
|
||||||
#else
|
|
||||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+Space")));
|
|
||||||
#endif
|
|
||||||
connect(completionShortcut, SIGNAL(activated()), this, SLOT(invokeCompletion()));
|
connect(completionShortcut, SIGNAL(activated()), this, SLOT(invokeCompletion()));
|
||||||
|
|
||||||
// Add shortcut for invoking quick fix options
|
// Add shortcut for invoking quick fix options
|
||||||
|
Reference in New Issue
Block a user