diff options
33 files changed, 112 insertions, 112 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index a41710b24b0..d3425a7b5c1 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -223,7 +223,7 @@ void BazaarPlugin::createFileActions(const Context &context) m_diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_diffFile, DIFF, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+D") : tr("ALT+Z,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Z,Meta+D") : tr("ALT+Z,Alt+D"))); connect(m_diffFile, &QAction::triggered, this, &BazaarPlugin::diffCurrentFile); m_bazaarContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -231,7 +231,7 @@ void BazaarPlugin::createFileActions(const Context &context) m_logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_logFile, LOG, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+L") : tr("ALT+Z,Alt+L"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Z,Meta+L") : tr("ALT+Z,Alt+L"))); connect(m_logFile, &QAction::triggered, this, &BazaarPlugin::logCurrentFile); m_bazaarContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -239,7 +239,7 @@ void BazaarPlugin::createFileActions(const Context &context) m_statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_statusFile, STATUS, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+S") : tr("ALT+Z,Alt+S"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Z,Meta+S") : tr("ALT+Z,Alt+S"))); connect(m_statusFile, &QAction::triggered, this, &BazaarPlugin::statusCurrentFile); m_bazaarContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -413,7 +413,7 @@ void BazaarPlugin::createRepositoryActions(const Context &context) action = new QAction(tr("Commit..."), this); m_repositoryActionList.append(action); command = ActionManager::registerAction(action, COMMIT, context); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+C") : tr("ALT+Z,Alt+C"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Z,Meta+C") : tr("ALT+Z,Alt+C"))); connect(action, &QAction::triggered, this, &BazaarPlugin::commit); m_bazaarContainer->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index 0977134fbd2..7397cd96d45 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -799,7 +799,7 @@ BookmarkViewFactory::BookmarkViewFactory(BookmarkManager *bm) setDisplayName(BookmarkView::tr("Bookmarks")); setPriority(300); setId("Bookmarks"); - setActivationSequence(QKeySequence(UseMacShortcuts ? tr("Alt+Meta+M") : tr("Alt+M"))); + setActivationSequence(QKeySequence(useMacShortcuts ? tr("Alt+Meta+M") : tr("Alt+M"))); } NavigationView BookmarkViewFactory::createWidget() diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index ddf1984104f..8ddd17bcfc7 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -106,7 +106,7 @@ BookmarksPluginRunData::BookmarksPluginRunData() // Toggle Command *cmd = ActionManager::registerAction(&m_toggleAction, BOOKMARKS_TOGGLE_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? BookmarksPlugin::tr("Meta+M") + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+M") : BookmarksPlugin::tr("Ctrl+M"))); mbm->addAction(cmd); @@ -114,13 +114,13 @@ BookmarksPluginRunData::BookmarksPluginRunData() // Previous cmd = ActionManager::registerAction(&m_prevAction, BOOKMARKS_PREV_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? BookmarksPlugin::tr("Meta+,") + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+,") : BookmarksPlugin::tr("Ctrl+,"))); mbm->addAction(cmd); // Next cmd = ActionManager::registerAction(&m_nextAction, BOOKMARKS_NEXT_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? BookmarksPlugin::tr("Meta+.") + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+.") : BookmarksPlugin::tr("Ctrl+."))); mbm->addAction(cmd); diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index c9d1b62fd49..266a56e18e3 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -456,7 +456,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er command = ActionManager::registerAction(m_checkOutAction, CMD_ID_CHECKOUT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+O") : tr("Alt+L,Alt+O"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+O") : tr("Alt+L,Alt+O"))); connect(m_checkOutAction, &QAction::triggered, this, &ClearCasePlugin::checkOutCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -464,7 +464,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er m_checkInCurrentAction = new ParameterAction(tr("Check &In..."), tr("Check &In \"%1\"..."), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_checkInCurrentAction, CMD_ID_CHECKIN, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+I") : tr("Alt+L,Alt+I"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+I") : tr("Alt+L,Alt+I"))); connect(m_checkInCurrentAction, &QAction::triggered, this, &ClearCasePlugin::startCheckInCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -472,7 +472,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er m_undoCheckOutAction = new ParameterAction(tr("Undo Check Out"), tr("&Undo Check Out \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_undoCheckOutAction, CMD_ID_UNDOCHECKOUT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+U") : tr("Alt+L,Alt+U"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+U") : tr("Alt+L,Alt+U"))); connect(m_undoCheckOutAction, &QAction::triggered, this, &ClearCasePlugin::undoCheckOutCurrent); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -480,7 +480,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er m_undoHijackAction = new ParameterAction(tr("Undo Hijack"), tr("Undo Hi&jack \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_undoHijackAction, CMD_ID_UNDOHIJACK, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+R") : tr("Alt+L,Alt+R"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+R") : tr("Alt+L,Alt+R"))); connect(m_undoHijackAction, &QAction::triggered, this, &ClearCasePlugin::undoHijackCurrent); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -491,7 +491,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er command = ActionManager::registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+D") : tr("Alt+L,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+D") : tr("Alt+L,Alt+D"))); connect(m_diffCurrentAction, &QAction::triggered, this, &ClearCasePlugin::diffCurrentFile); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -500,7 +500,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er command = ActionManager::registerAction(m_historyCurrentAction, CMD_ID_HISTORY_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+H") : tr("Alt+L,Alt+H"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+H") : tr("Alt+L,Alt+H"))); connect(m_historyCurrentAction, &QAction::triggered, this, &ClearCasePlugin::historyCurrentFile); clearcaseMenu->addAction(command); @@ -510,7 +510,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er command = ActionManager::registerAction(m_annotateCurrentAction, CMD_ID_ANNOTATE, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+A") : tr("Alt+L,Alt+A"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+A") : tr("Alt+L,Alt+A"))); connect(m_annotateCurrentAction, &QAction::triggered, this, &ClearCasePlugin::annotateCurrentFile); clearcaseMenu->addAction(command); @@ -556,14 +556,14 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er m_checkInAllAction = new QAction(tr("Check In All &Files..."), this); command = ActionManager::registerAction(m_checkInAllAction, CMD_ID_CHECKIN_ALL, context); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+F") : tr("Alt+L,Alt+F"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+F") : tr("Alt+L,Alt+F"))); connect(m_checkInAllAction, &QAction::triggered, this, &ClearCasePlugin::startCheckInAll); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); m_statusAction = new QAction(tr("View &Status"), this); command = ActionManager::registerAction(m_statusAction, CMD_ID_STATUS, context); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+L,Meta+S") : tr("Alt+L,Alt+S"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+L,Meta+S") : tr("Alt+L,Alt+S"))); connect(m_statusAction, &QAction::triggered, this, &ClearCasePlugin::viewStatus); clearcaseMenu->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/coreplugin/actionmanager/command.h b/src/plugins/coreplugin/actionmanager/command.h index 47210b4209d..123b6733465 100644 --- a/src/plugins/coreplugin/actionmanager/command.h +++ b/src/plugins/coreplugin/actionmanager/command.h @@ -43,7 +43,7 @@ namespace Core { class Context; -enum { UseMacShortcuts = Utils::HostOsInfo::isMacHost() ? 1 : 0 }; +constexpr bool useMacShortcuts = Utils::HostOsInfo::isMacHost(); class CORE_EXPORT Command : public QObject { diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 61d0854cdf2..5378f9358ab 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -347,76 +347,76 @@ void EditorManagerPrivate::init() // Goto Previous In History Action cmd = ActionManager::registerAction(m_gotoPreviousDocHistoryAction, Constants::GOTOPREVINHISTORY, editDesignContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Alt+Tab") : tr("Ctrl+Tab"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Alt+Tab") : tr("Ctrl+Tab"))); mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE); connect(m_gotoPreviousDocHistoryAction, &QAction::triggered, this, &EditorManagerPrivate::gotoPreviousDocHistory); // Goto Next In History Action cmd = ActionManager::registerAction(m_gotoNextDocHistoryAction, Constants::GOTONEXTINHISTORY, editDesignContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Alt+Shift+Tab") : tr("Ctrl+Shift+Tab"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Alt+Shift+Tab") : tr("Ctrl+Shift+Tab"))); mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE); connect(m_gotoNextDocHistoryAction, &QAction::triggered, this, &EditorManagerPrivate::gotoNextDocHistory); // Go back in navigation history cmd = ActionManager::registerAction(m_goBackAction, Constants::GO_BACK, editDesignContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Alt+Left") : tr("Alt+Left"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Alt+Left") : tr("Alt+Left"))); mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE); connect(m_goBackAction, &QAction::triggered, m_instance, &EditorManager::goBackInNavigationHistory); // Go forward in navigation history cmd = ActionManager::registerAction(m_goForwardAction, Constants::GO_FORWARD, editDesignContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Alt+Right") : tr("Alt+Right"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Alt+Right") : tr("Alt+Right"))); mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE); connect(m_goForwardAction, &QAction::triggered, m_instance, &EditorManager::goForwardInNavigationHistory); m_splitAction = new QAction(Utils::Icons::SPLIT_HORIZONTAL.icon(), tr("Split"), this); cmd = ActionManager::registerAction(m_splitAction, Constants::SPLIT, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,2") : tr("Ctrl+E,2"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,2") : tr("Ctrl+E,2"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_splitAction, &QAction::triggered, this, []() { split(Qt::Vertical); }); m_splitSideBySideAction = new QAction(Utils::Icons::SPLIT_VERTICAL.icon(), tr("Split Side by Side"), this); cmd = ActionManager::registerAction(m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,3") : tr("Ctrl+E,3"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,3") : tr("Ctrl+E,3"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_splitSideBySideAction, &QAction::triggered, m_instance, &EditorManager::splitSideBySide); m_splitNewWindowAction = new QAction(tr("Open in New Window"), this); cmd = ActionManager::registerAction(m_splitNewWindowAction, Constants::SPLIT_NEW_WINDOW, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,4") : tr("Ctrl+E,4"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,4") : tr("Ctrl+E,4"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_splitNewWindowAction, &QAction::triggered, this, []() { splitNewWindow(currentEditorView()); }); m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this); cmd = ActionManager::registerAction(m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,0") : tr("Ctrl+E,0"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,0") : tr("Ctrl+E,0"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_removeCurrentSplitAction, &QAction::triggered, this, &EditorManagerPrivate::removeCurrentSplit); m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this); cmd = ActionManager::registerAction(m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,1") : tr("Ctrl+E,1"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,1") : tr("Ctrl+E,1"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_removeAllSplitsAction, &QAction::triggered, this, &EditorManagerPrivate::removeAllSplits); m_gotoPreviousSplitAction = new QAction(tr("Go to Previous Split or Window"), this); cmd = ActionManager::registerAction(m_gotoPreviousSplitAction, Constants::GOTO_PREV_SPLIT, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,i") : tr("Ctrl+E,i"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,i") : tr("Ctrl+E,i"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_gotoPreviousSplitAction, &QAction::triggered, this, &EditorManagerPrivate::gotoPreviousSplit); m_gotoNextSplitAction = new QAction(tr("Go to Next Split or Window"), this); cmd = ActionManager::registerAction(m_gotoNextSplitAction, Constants::GOTO_NEXT_SPLIT, editManagerContext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,o") : tr("Ctrl+E,o"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+E,o") : tr("Ctrl+E,o"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(m_gotoNextSplitAction, &QAction::triggered, this, &EditorManagerPrivate::gotoNextSplit); diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 5d1b7870b60..72622a4a75a 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -132,7 +132,7 @@ OpenEditorsViewFactory::OpenEditorsViewFactory() { setId("Open Documents"); setDisplayName(OpenEditorsWidget::tr("Open Documents")); - setActivationSequence(QKeySequence(UseMacShortcuts ? tr("Meta+O") : tr("Alt+O"))); + setActivationSequence(QKeySequence(useMacShortcuts ? tr("Meta+O") : tr("Alt+O"))); setPriority(200); } diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index b2b86038827..fd3ff84f843 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -531,7 +531,7 @@ void MainWindow::registerDefaultActions() tmpaction = new QAction(icon, EditorManager::tr("Save &As..."), this); tmpaction->setEnabled(false); cmd = ActionManager::registerAction(tmpaction, Constants::SAVEAS); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+S") : QString())); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+S") : QString())); cmd->setAttribute(Command::CA_UpdateText); cmd->setDescription(tr("Save As...")); mfile->addAction(cmd, Constants::G_FILE_SAVE); @@ -539,7 +539,7 @@ void MainWindow::registerDefaultActions() // SaveAll Action m_saveAllAction = new QAction(tr("Save A&ll"), this); cmd = ActionManager::registerAction(m_saveAllAction, Constants::SAVEALL); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString() : tr("Ctrl+Shift+S"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString() : tr("Ctrl+Shift+S"))); mfile->addAction(cmd, Constants::G_FILE_SAVE); connect(m_saveAllAction, &QAction::triggered, this, &MainWindow::saveAll); @@ -633,7 +633,7 @@ void MainWindow::registerDefaultActions() mwindow->addSeparator(Constants::G_WINDOW_LIST); - if (UseMacShortcuts) { + if (useMacShortcuts) { // Minimize Action QAction *minimizeAction = new QAction(tr("Minimize"), this); minimizeAction->setEnabled(false); // actual implementation in WindowSupport @@ -653,12 +653,12 @@ void MainWindow::registerDefaultActions() toggleFullScreenAction->setCheckable(!HostOsInfo::isMacHost()); toggleFullScreenAction->setEnabled(false); // actual implementation in WindowSupport cmd = ActionManager::registerAction(toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Meta+F") : tr("Ctrl+Shift+F11"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Meta+F") : tr("Ctrl+Shift+F11"))); if (HostOsInfo::isMacHost()) cmd->setAttribute(Command::CA_UpdateText); mwindow->addAction(cmd, Constants::G_WINDOW_SIZE); - if (UseMacShortcuts) { + if (useMacShortcuts) { mwindow->addSeparator(Constants::G_WINDOW_SIZE); QAction *closeAction = new QAction(tr("Close Window"), this); @@ -677,7 +677,7 @@ void MainWindow::registerDefaultActions() m_toggleLeftSideBarAction->setCheckable(true); cmd = ActionManager::registerAction(m_toggleLeftSideBarAction, Constants::TOGGLE_LEFT_SIDEBAR); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+0") : tr("Alt+0"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+0") : tr("Alt+0"))); connect(m_toggleLeftSideBarAction, &QAction::triggered, this, [this](bool visible) { setSidebarVisible(visible, Side::Left); }); ProxyAction *toggleLeftSideBarProxyAction = @@ -693,7 +693,7 @@ void MainWindow::registerDefaultActions() m_toggleRightSideBarAction->setCheckable(true); cmd = ActionManager::registerAction(m_toggleRightSideBarAction, Constants::TOGGLE_RIGHT_SIDEBAR); cmd->setAttribute(Command::CA_UpdateText); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+0") : tr("Alt+Shift+0"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+0") : tr("Alt+Shift+0"))); connect(m_toggleRightSideBarAction, &QAction::triggered, this, [this](bool visible) { setSidebarVisible(visible, Side::Right); }); ProxyAction *toggleRightSideBarProxyAction = diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index 221637c5712..d66b2861925 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -198,7 +198,7 @@ void ModeManagerPrivate::appendMode(IMode *mode) const Id actionId = mode->id().withPrefix("QtCreator.Mode."); QAction *action = new QAction(ModeManager::tr("Switch to <b>%1</b> mode").arg(mode->displayName()), m_instance); Command *cmd = ActionManager::registerAction(action, actionId); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString("Meta+%1").arg(index + 1) + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString("Meta+%1").arg(index + 1) : QString("Ctrl+%1").arg(index + 1))); m_modeCommands.append(cmd); diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index c2cfdfecb92..8a8fe13530d 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -256,7 +256,7 @@ void OutputPaneManager::init() mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup"); cmd = ActionManager::registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax"); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+9") : tr("Alt+Shift+9"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+9") : tr("Alt+Shift+9"))); cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateIcon); mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup"); diff --git a/src/plugins/coreplugin/windowsupport.cpp b/src/plugins/coreplugin/windowsupport.cpp index 7d9c3ef6ad9..87c5985ba03 100644 --- a/src/plugins/coreplugin/windowsupport.cpp +++ b/src/plugins/coreplugin/windowsupport.cpp @@ -60,7 +60,7 @@ WindowSupport::WindowSupport(QWidget *window, const Context &context) m_contextObject->setContext(context); ICore::addContextObject(m_contextObject); - if (UseMacShortcuts) { + if (useMacShortcuts) { m_minimizeAction = new QAction(this); ActionManager::registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, context); connect(m_minimizeAction, &QAction::triggered, m_window, &QWidget::showMinimized); @@ -87,7 +87,7 @@ WindowSupport::WindowSupport(QWidget *window, const Context &context) WindowSupport::~WindowSupport() { if (!m_shutdown) { // don't update all that stuff if we are shutting down anyhow - if (UseMacShortcuts) { + if (useMacShortcuts) { ActionManager::unregisterAction(m_minimizeAction, Constants::MINIMIZE_WINDOW); ActionManager::unregisterAction(m_zoomAction, Constants::ZOOM_WINDOW); ActionManager::unregisterAction(m_closeAction, Constants::CLOSE_WINDOW); @@ -100,7 +100,7 @@ WindowSupport::~WindowSupport() void WindowSupport::setCloseActionEnabled(bool enabled) { - if (UseMacShortcuts) + if (useMacShortcuts) m_closeAction->setEnabled(enabled); } diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index c97e89ae5be..713ebbd1735 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -152,13 +152,13 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe m_postEditorAction = new QAction(tr("Paste Snippet..."), this); command = ActionManager::registerAction(m_postEditorAction, "CodePaster.Post"); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+P") : tr("Alt+C,Alt+P"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+C,Meta+P") : tr("Alt+C,Alt+P"))); connect(m_postEditorAction, &QAction::triggered, this, &CodepasterPlugin::pasteSnippet); cpContainer->addAction(command); m_fetchAction = new QAction(tr("Fetch Snippet..."), this); command = ActionManager::registerAction(m_fetchAction, "CodePaster.Fetch"); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+F") : tr("Alt+C,Alt+F"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+C,Meta+F") : tr("Alt+C,Alt+F"))); connect(m_fetchAction, &QAction::triggered, this, &CodepasterPlugin::fetch); cpContainer->addAction(command); diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index beac37ee7e9..5e9285fed5e 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -209,14 +209,14 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err m_openTypeHierarchyAction = new QAction(tr("Open Type Hierarchy"), this); cmd = ActionManager::registerAction(m_openTypeHierarchyAction, Constants::OPEN_TYPE_HIERARCHY, context); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Shift+T") : tr("Ctrl+Shift+T"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+T") : tr("Ctrl+Shift+T"))); connect(m_openTypeHierarchyAction, &QAction::triggered, this, &CppEditorPlugin::openTypeHierarchy); contextMenu->addAction(cmd); cppToolsMenu->addAction(cmd); m_openIncludeHierarchyAction = new QAction(tr("Open Include Hierarchy"), this); cmd = ActionManager::registerAction(m_openIncludeHierarchyAction, Constants::OPEN_INCLUDE_HIERARCHY, context); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Shift+I") : tr("Ctrl+Shift+I"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+I") : tr("Ctrl+Shift+I"))); connect(m_openIncludeHierarchyAction, &QAction::triggered, this, &CppEditorPlugin::openIncludeHierarchy); contextMenu->addAction(cmd); cppToolsMenu->addAction(cmd); @@ -247,7 +247,7 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err cppToolsMenu->addSeparator(); QAction *inspectCppCodeModel = new QAction(tr("Inspect C++ Code Model..."), this); cmd = ActionManager::registerAction(inspectCppCodeModel, Constants::INSPECT_CPP_CODEMODEL); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Shift+F12") : tr("Ctrl+Shift+F12"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+F12") : tr("Ctrl+Shift+F12"))); connect(inspectCppCodeModel, &QAction::triggered, this, &CppEditorPlugin::inspectCppCodeModel); cppToolsMenu->addAction(cmd); diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index e312cda6398..4341625c93c 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -237,7 +237,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ActionManager::registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+D") : tr("Alt+C,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+C,Meta+D") : tr("Alt+C,Alt+D"))); connect(m_diffCurrentAction, &QAction::triggered, this, &CvsPlugin::diffCurrentFile); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -264,7 +264,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ActionManager::registerAction(m_addAction, CMD_ID_ADD, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+A") : tr("Alt+C,Alt+A"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+C,Meta+A") : tr("Alt+C,Alt+A"))); connect(m_addAction, &QAction::triggered, this, &CvsPlugin::addCurrentFile); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -273,7 +273,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) command = ActionManager::registerAction(m_commitCurrentAction, CMD_ID_COMMIT_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+C,Meta+C") : tr("Alt+C,Alt+C"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+C,Meta+C") : tr("Alt+C,Alt+C"))); connect(m_commitCurrentAction, &QAction::triggered, this, &CvsPlugin::startCommitCurrentFile); cvsMenu->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8825e72ecf0..db1336c972f 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1279,7 +1279,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, TaskHub::addCategory(TASK_CATEGORY_DEBUGGER_RUNTIME, tr("Debugger Runtime")); - const QKeySequence debugKey = QKeySequence(UseMacShortcuts ? tr("Ctrl+Y") : tr("F5")); + const QKeySequence debugKey = QKeySequence(useMacShortcuts ? tr("Ctrl+Y") : tr("F5")); QSettings *settings = ICore::settings(); @@ -1583,7 +1583,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, m_hiddenStopAction->setAttribute(ProxyAction::UpdateIcon); cmd = ActionManager::registerAction(m_hiddenStopAction, Constants::HIDDEN_STOP); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+Ctrl+Y") : tr("Shift+F5"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Shift+Ctrl+Y") : tr("Shift+F5"))); cmd = ActionManager::registerAction(m_abortAction, Constants::ABORT); cmd->setDescription(tr("Reset Debugger")); @@ -1596,25 +1596,25 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, debugMenu->addSeparator(); cmd = ActionManager::registerAction(m_nextAction, Constants::NEXT); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+O") : tr("F10"))); cmd->setAttribute(Command::CA_Hide); cmd->setAttribute(Command::CA_UpdateText); debugMenu->addAction(cmd); cmd = ActionManager::registerAction(m_stepAction, Constants::STEP); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+I") : tr("F11"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+I") : tr("F11"))); cmd->setAttribute(Command::CA_Hide); cmd->setAttribute(Command::CA_UpdateText); debugMenu->addAction(cmd); cmd = ActionManager::registerAction(m_stepOutAction, Constants::STEPOUT); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+T") : tr("Shift+F11"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Ctrl+Shift+T") : tr("Shift+F11"))); cmd->setAttribute(Command::CA_Hide); debugMenu->addAction(cmd); cmd = ActionManager::registerAction(m_runToLineAction, "Debugger.RunToLine", cppDebuggercontext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Shift+F8") : tr("Ctrl+F10"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Shift+F8") : tr("Ctrl+F10"))); cmd->setAttribute(Command::CA_Hide); debugMenu->addAction(cmd); @@ -1639,7 +1639,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, if (isReverseDebuggingEnabled()) { cmd = ActionManager::registerAction(m_reverseDirectionAction, Constants::REVERSE, cppDebuggercontext); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? QString() : tr("F12"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString() : tr("F12"))); cmd->setAttribute(Command::CA_Hide); debugMenu->addAction(cmd); } @@ -1663,7 +1663,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, debugMenu->addAction(cmd); cmd = ActionManager::registerAction(m_breakAction, "Debugger.ToggleBreak"); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("F8") : tr("F9"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("F8") : tr("F9"))); debugMenu->addAction(cmd); connect(m_breakAction, &QAction::triggered, this, &DebuggerPluginPrivate::toggleBreakpointHelper); diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 43e31495508..35dc799cf57 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -558,12 +558,12 @@ void FormEditorData::setupActions() //tool actions m_toolActionIds.push_back("FormEditor.LayoutHorizontally"); - const QString horizLayoutShortcut = UseMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+H"); + const QString horizLayoutShortcut = useMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+H"); addToolAction(m_fwm->actionHorizontalLayout(), m_contexts, m_toolActionIds.back(), mformtools, horizLayoutShortcut); m_toolActionIds.push_back("FormEditor.LayoutVertically"); - const QString vertLayoutShortcut = UseMacShortcuts ? tr("Meta+L") : tr("Ctrl+L"); + const QString vertLayoutShortcut = useMacShortcuts ? tr("Meta+L") : tr("Ctrl+L"); addToolAction(m_fwm->actionVerticalLayout(), m_contexts, m_toolActionIds.back(), mformtools, vertLayoutShortcut); @@ -580,7 +580,7 @@ void FormEditorData::setupActions() m_toolActionIds.back(), mformtools); m_toolActionIds.push_back("FormEditor.LayoutGrid"); - const QString gridShortcut = UseMacShortcuts ? tr("Meta+Shift+G") : tr("Ctrl+G"); + const QString gridShortcut = useMacShortcuts ? tr("Meta+Shift+G") : tr("Ctrl+G"); addToolAction(m_fwm->actionGridLayout(), m_contexts, m_toolActionIds.back(), mformtools, gridShortcut); @@ -589,7 +589,7 @@ void FormEditorData::setupActions() m_toolActionIds.back(), mformtools); m_toolActionIds.push_back("FormEditor.LayoutAdjustSize"); - const QString adjustShortcut = UseMacShortcuts ? tr("Meta+J") : tr("Ctrl+J"); + const QString adjustShortcut = useMacShortcuts ? tr("Meta+J") : tr("Ctrl+J"); addToolAction(m_fwm->actionAdjustSize(), m_contexts, m_toolActionIds.back(), mformtools, adjustShortcut); diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index c3bfbdb0948..43be57f0868 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -475,13 +475,13 @@ bool DiffEditorPlugin::initialize(const QStringList &arguments, QString *errorMe m_diffCurrentFileAction = new QAction(tr("Diff Current File"), this); Command *diffCurrentFileCommand = ActionManager::registerAction(m_diffCurrentFileAction, "DiffEditor.DiffCurrentFile"); - diffCurrentFileCommand->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+H") : tr("Ctrl+H"))); + diffCurrentFileCommand->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+H") : tr("Ctrl+H"))); connect(m_diffCurrentFileAction, &QAction::triggered, this, &DiffEditorPlugin::diffCurrentFile); diffContainer->addAction(diffCurrentFileCommand); m_diffOpenFilesAction = new QAction(tr("Diff Open Files"), this); Command *diffOpenFilesCommand = ActionManager::registerAction(m_diffOpenFilesAction, "DiffEditor.DiffOpenFiles"); - diffOpenFilesCommand->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+Shift+H"))); + diffOpenFilesCommand->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+Shift+H"))); connect(m_diffOpenFilesAction, &QAction::triggered, this, &DiffEditorPlugin::diffOpenFiles); diffContainer->addAction(diffOpenFilesCommand); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 782c33ba772..62e9bc8a53c 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1201,7 +1201,7 @@ bool FakeVimPluginPrivate::initialize() Command *cmd = nullptr; cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim), INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V"))); ActionContainer *advancedMenu = ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED); @@ -1212,7 +1212,7 @@ bool FakeVimPluginPrivate::initialize() auto act = new QAction(this); act->setText(Tr::tr("Execute User Action #%1").arg(i)); cmd = ActionManager::registerAction(act, base.withSuffix(i)); - cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i))); + cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i))); connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); }); } diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 1bd8c518232..9979fc49229 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -337,21 +337,21 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) createFileAction(currentFileMenu, tr("Diff Current File"), tr("Diff of \"%1\""), "Git.Diff", context, true, std::bind(&GitPlugin::diffCurrentFile, this), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+D") : tr("Alt+G,Alt+D"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+D") : tr("Alt+G,Alt+D"))); createFileAction(currentFileMenu, tr("Log Current File"), tr("Log of \"%1\""), "Git.Log", context, true, std::bind(&GitPlugin::logFile, this), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+L") : tr("Alt+G,Alt+L"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+L") : tr("Alt+G,Alt+L"))); createFileAction(currentFileMenu, tr("Blame Current File"), tr("Blame for \"%1\""), "Git.Blame", context, true, std::bind(&GitPlugin::blameFile, this), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+B") : tr("Alt+G,Alt+B"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+B") : tr("Alt+G,Alt+B"))); currentFileMenu->addSeparator(context); createFileAction(currentFileMenu, tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), "Git.Stage", context, true, std::bind(&GitPlugin::stageFile, this), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+A") : tr("Alt+G,Alt+A"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+A") : tr("Alt+G,Alt+A"))); createFileAction(currentFileMenu, tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"), "Git.Unstage", context, true, std::bind(&GitPlugin::unstageFile, this)); @@ -363,7 +363,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) createFileAction(currentFileMenu, tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""), "Git.Undo", context, true, std::bind(&GitPlugin::undoFileChanges, this, true), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+U") : tr("Alt+G,Alt+U"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+U") : tr("Alt+G,Alt+U"))); /* "Current Project" menu */ @@ -373,11 +373,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) createProjectAction(currentProjectMenu, tr("Diff Current Project"), tr("Diff Project \"%1\""), "Git.DiffProject", context, true, &GitPlugin::diffCurrentProject, - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+Shift+D") : tr("Alt+G,Alt+Shift+D"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+Shift+D") : tr("Alt+G,Alt+Shift+D"))); createProjectAction(currentProjectMenu, tr("Log Project"), tr("Log Project \"%1\""), "Git.LogProject", context, true, &GitPlugin::logProject, - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+K") : tr("Alt+G,Alt+K"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+K") : tr("Alt+G,Alt+K"))); createProjectAction(currentProjectMenu, tr("Clean Project..."), tr("Clean Project \"%1\"..."), "Git.CleanProject", context, true, &GitPlugin::cleanProject); @@ -408,7 +408,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) createRepositoryAction(localRepositoryMenu, tr("Commit..."), "Git.Commit", context, true, std::bind(&GitPlugin::startCommit, this, SimpleCommit), - QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+C") : tr("Alt+G,Alt+C"))); + QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+C") : tr("Alt+G,Alt+C"))); createRepositoryAction(localRepositoryMenu, tr("Amend Last Commit..."), "Git.AmendCommit", context, true, std::bind(&GitPlugin::startCommit, this, AmendCommit)); diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index 79336520f03..8a0c4f943f3 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -204,7 +204,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget m_addBookmarkAction = new QAction(Utils::Icons::BOOKMARK_TOOLBAR.icon(), tr("Add Bookmark"), this); cmd = Core::ActionManager::registerAction(m_addBookmarkAction, Constants::HELP_ADDBOOKMARK, context); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M"))); + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+M") : tr("Ctrl+M"))); connect(m_addBookmarkAction, &QAction::triggered, this, &HelpWidget::addBookmark); layout->addWidget(new Utils::StyledSeparator(toolBar)); layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_addBookmarkAction, cmd)); @@ -345,7 +345,7 @@ void HelpWidget::addSideBar() this, &HelpWidget::open); m_contentsAction = new QAction(HelpPlugin::tr(Constants::SB_CONTENTS), this); cmd = Core::ActionManager::registerAction(m_contentsAction, Constants::HELP_CONTENTS, m_context->context()); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Shift+C") + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+Shift+C") : tr("Ctrl+Shift+C"))); shortcutMap.insert(Constants::HELP_CONTENTS, cmd); @@ -357,7 +357,7 @@ void HelpWidget::addSideBar() this, &HelpWidget::showLinks); m_indexAction = new QAction(HelpPlugin::tr(Constants::SB_INDEX), this); cmd = Core::ActionManager::registerAction(m_indexAction, Constants::HELP_INDEX, m_context->context()); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+I") + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+I") : tr("Ctrl+Shift+I"))); shortcutMap.insert(Constants::HELP_INDEX, cmd); @@ -369,7 +369,7 @@ void HelpWidget::addSideBar() m_bookmarkAction = new QAction(tr("Activate Help Bookmarks View"), this); cmd = Core::ActionManager::registerAction(m_bookmarkAction, Constants::HELP_BOOKMARKS, m_context->context()); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Alt+Meta+M") + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Alt+Meta+M") : tr("Ctrl+Shift+B"))); shortcutMap.insert(Constants::HELP_BOOKMARKS, cmd); @@ -378,7 +378,7 @@ void HelpWidget::addSideBar() m_searchAction = new QAction(tr("Activate Help Search View"), this); cmd = Core::ActionManager::registerAction(m_searchAction, Constants::HELP_SEARCH, m_context->context()); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+/") + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+/") : tr("Ctrl+Shift+/"))); shortcutMap.insert(Constants::HELP_SEARCH, cmd); @@ -390,7 +390,7 @@ void HelpWidget::addSideBar() m_openPagesAction = new QAction(tr("Activate Open Help Pages View"), this); cmd = Core::ActionManager::registerAction(m_openPagesAction, Constants::HELP_OPENPAGES, m_context->context()); - cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+O") + cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+O") : tr("Ctrl+Shift+O"))); shortcutMap.insert(Constants::HELP_OPENPAGES, cmd); } diff --git a/src/plugins/imageviewer/imageviewerplugin.cpp b/src/plugins/imageviewer/imageviewerplugin.cpp index 6a453eb90e2..f3059caf1ad 100644 --- a/src/plugins/imageviewer/imageviewerplugin.cpp +++ b/src/plugins/imageviewer/imageviewerplugin.cpp @@ -77,7 +77,7 @@ void ImageViewerPlugin::extensionsInitialized() }); a = registerNewAction(Constants::ACTION_ORIGINAL_SIZE, tr("Original Size"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+0") : tr("Ctrl+0"))); + QKeySequence(Core::useMacShortcuts ? tr("Meta+0") : tr("Ctrl+0"))); connect(a, &QAction::triggered, this, []() { if (ImageViewer *iv = currentImageViewer()) iv->resetToOriginalSize(); diff --git a/src/plugins/macros/macrosplugin.cpp b/src/plugins/macros/macrosplugin.cpp index 38be1c5f8dc..d24d7300c46 100644 --- a/src/plugins/macros/macrosplugin.cpp +++ b/src/plugins/macros/macrosplugin.cpp @@ -74,20 +74,20 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag QAction *startMacro = new QAction(tr("Record Macro"), this); Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+("))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+(") : tr("Alt+("))); mmacrotools->addAction(command); connect(startMacro, &QAction::triggered, m_macroManager, &MacroManager::startMacro); QAction *endMacro = new QAction(tr("Stop Recording Macro"), this); endMacro->setEnabled(false); command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+)") : tr("Alt+)"))); mmacrotools->addAction(command); connect(endMacro, &QAction::triggered, m_macroManager, &MacroManager::endMacro); QAction *executeLastMacro = new QAction(tr("Play Last Macro"), this); command = Core::ActionManager::registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+R") : tr("Alt+R"))); mmacrotools->addAction(command); connect(executeLastMacro, &QAction::triggered, m_macroManager, &MacroManager::executeLastMacro); diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 5c12b42c519..0cf0dcbfb57 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -185,7 +185,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context) diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this); command = Core::ActionManager::registerAction(diffFile, Core::Id(Constants::DIFF), context); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+D") : tr("Alt+G,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+H,Meta+D") : tr("Alt+G,Alt+D"))); connect(diffFile, &QAction::triggered, this, &MercurialPlugin::diffCurrentFile); m_mercurialContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -193,7 +193,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context) logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this); command = Core::ActionManager::registerAction(logFile, Core::Id(Constants::LOG), context); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+L") : tr("Alt+G,Alt+L"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+H,Meta+L") : tr("Alt+G,Alt+L"))); connect(logFile, &QAction::triggered, this, &MercurialPlugin::logCurrentFile); m_mercurialContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -201,7 +201,7 @@ void MercurialPlugin::createFileActions(const Core::Context &context) statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this); command = Core::ActionManager::registerAction(statusFile, Core::Id(Constants::STATUS), context); command->setAttribute(Core::Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+S") : tr("Alt+G,Alt+S"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+H,Meta+S") : tr("Alt+G,Alt+S"))); connect(statusFile, &QAction::triggered, this, &MercurialPlugin::statusCurrentFile); m_mercurialContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -391,7 +391,7 @@ void MercurialPlugin::createRepositoryActions(const Core::Context &context) action = new QAction(tr("Commit..."), this); m_repositoryActionList.append(action); command = Core::ActionManager::registerAction(action, Core::Id(Constants::COMMIT), context); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+H,Meta+C") : tr("Alt+G,Alt+C"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+H,Meta+C") : tr("Alt+G,Alt+C"))); connect(action, &QAction::triggered, this, &MercurialPlugin::commit); m_mercurialContainer->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 0278cd6403c..d97e4fc2a81 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -237,7 +237,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_filelogCurrentAction = new ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+F") : tr("Alt+P,Alt+F"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+F") : tr("Alt+P,Alt+F"))); command->setDescription(tr("Filelog Current File")); connect(m_filelogCurrentAction, &QAction::triggered, this, &PerforcePlugin::filelogCurrentFile); perforceContainer->addAction(command); @@ -248,7 +248,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_editAction = new ParameterAction(tr("Edit"), tr("Edit \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_editAction, CMD_ID_EDIT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+E") : tr("Alt+P,Alt+E"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+E") : tr("Alt+P,Alt+E"))); command->setDescription(tr("Edit File")); connect(m_editAction, &QAction::triggered, this, &PerforcePlugin::openCurrentFile); perforceContainer->addAction(command); @@ -257,7 +257,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_addAction = new ParameterAction(tr("Add"), tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_addAction, CMD_ID_ADD, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+A") : tr("Alt+P,Alt+A"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+A") : tr("Alt+P,Alt+A"))); command->setDescription(tr("Add File")); connect(m_addAction, &QAction::triggered, this, &PerforcePlugin::addCurrentFile); perforceContainer->addAction(command); @@ -274,7 +274,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_revertFileAction = new ParameterAction(tr("Revert"), tr("Revert \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_revertFileAction, CMD_ID_REVERT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+R") : tr("Alt+P,Alt+R"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+R") : tr("Alt+P,Alt+R"))); command->setDescription(tr("Revert File")); connect(m_revertFileAction, &QAction::triggered, this, &PerforcePlugin::revertCurrentFile); perforceContainer->addAction(command); @@ -286,7 +286,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_diffProjectAction = new ParameterAction(diffProjectDefaultText, tr("Diff Project \"%1\""), ParameterAction::AlwaysEnabled, this); command = ActionManager::registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+D") : tr("Alt+P,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+D") : tr("Alt+P,Alt+D"))); command->setDescription(diffProjectDefaultText); connect(m_diffProjectAction, &QAction::triggered, this, &PerforcePlugin::diffCurrentProject); perforceContainer->addAction(command); @@ -302,7 +302,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_submitProjectAction = new ParameterAction(tr("Submit Project"), tr("Submit Project \"%1\""), ParameterAction::EnabledWithParameter, this); command = ActionManager::registerAction(m_submitProjectAction, CMD_ID_SUBMIT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+S") : tr("Alt+P,Alt+S"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+S") : tr("Alt+P,Alt+S"))); connect(m_submitProjectAction, &QAction::triggered, this, &PerforcePlugin::startSubmitProject); perforceContainer->addAction(command); m_commandLocator->appendCommand(command); @@ -340,7 +340,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_openedAction = new QAction(tr("Opened"), this); command = ActionManager::registerAction(m_openedAction, CMD_ID_OPENED, context); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+P,Meta+O") : tr("Alt+P,Alt+O"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+P,Meta+O") : tr("Alt+P,Alt+O"))); connect(m_openedAction, &QAction::triggered, this, &PerforcePlugin::printOpenedFileList); perforceContainer->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp index 2f9859d943d..9265e9f02a9 100644 --- a/src/plugins/projectexplorer/foldernavigationwidget.cpp +++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp @@ -681,7 +681,7 @@ FolderNavigationWidgetFactory::FolderNavigationWidgetFactory() setDisplayName(tr("File System")); setPriority(400); setId("File System"); - setActivationSequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Y") : tr("Alt+Y"))); + setActivationSequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+Y") : tr("Alt+Y"))); insertRootDirectory({QLatin1String("A.Computer"), 0 /*sortValue*/, FolderNavigationWidget::tr("Computer"), diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 25e760867d2..43843ebdf5f 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -953,7 +953,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er dd->m_cancelBuildAction = new QAction(Utils::Icons::STOP_SMALL.icon(), tr("Cancel Build"), this); cmd = ActionManager::registerAction(dd->m_cancelBuildAction, Constants::CANCELBUILD); - cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Backspace") : tr("Alt+Backspace"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Backspace") : tr("Alt+Backspace"))); mbuild->addAction(cmd, Constants::G_BUILD_CANCEL); // run action diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index d7aee0b8863..eef8f772b79 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -540,7 +540,7 @@ ProjectTreeWidgetFactory::ProjectTreeWidgetFactory() setDisplayName(tr("Projects")); setPriority(100); setId(ProjectExplorer::Constants::PROJECTTREE_ID); - setActivationSequence(QKeySequence(UseMacShortcuts ? tr("Meta+X") : tr("Alt+X"))); + setActivationSequence(QKeySequence(useMacShortcuts ? tr("Meta+X") : tr("Alt+X"))); } NavigationView ProjectTreeWidgetFactory::createWidget() diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 141f6e55a3a..9e84525c8c4 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -126,7 +126,7 @@ ProjectWelcomePage::ProjectWelcomePage() for (int i = 1; i <= actionsCount; ++i) { auto act = new QAction(tr("Open Session #%1").arg(i), this); Command *cmd = ActionManager::registerAction(act, sessionBase.withSuffix(i), welcomeContext); - cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? tr("Ctrl+Meta+%1") : tr("Ctrl+Alt+%1")).arg(i))); + cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? tr("Ctrl+Meta+%1") : tr("Ctrl+Alt+%1")).arg(i))); connect(act, &QAction::triggered, this, [this, i] { openSessionAt(i - 1); }); act = new QAction(tr("Open Recent Project #%1").arg(i), this); diff --git a/src/plugins/qmldesigner/components/texteditor/texteditorview.cpp b/src/plugins/qmldesigner/components/texteditor/texteditorview.cpp index a5c4441e6ea..9ed536304f3 100644 --- a/src/plugins/qmldesigner/components/texteditor/texteditorview.cpp +++ b/src/plugins/qmldesigner/components/texteditor/texteditorview.cpp @@ -78,7 +78,7 @@ TextEditorView::TextEditorView(QObject *parent) QAction *completionAction = new QAction(tr("Trigger Completion"), this); Core::Command *command = Core::ActionManager::registerAction(completionAction, TextEditor::Constants::COMPLETE_THIS, context); - command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space"))); + command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space"))); connect(completionAction, &QAction::triggered, [this]() { if (m_widget->textEditor()) diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 87490e946c3..405dfac3e76 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -168,7 +168,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this); cmd = ActionManager::registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context); - cmd->setDefaultKeySequence(UseMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space) + cmd->setDefaultKeySequence(useMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space) : QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space)); connect(showQuickToolbar, &QAction::triggered, this, &QmlJSEditorPlugin::showContextPane); contextMenu->addAction(cmd); diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index d35d027b57e..7748a08c4de 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -246,7 +246,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e command = ActionManager::registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+S,Meta+D") : tr("Alt+S,Alt+D"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+S,Meta+D") : tr("Alt+S,Alt+D"))); connect(m_diffCurrentAction, &QAction::triggered, this, &SubversionPlugin::diffCurrentFile); subversionMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -273,7 +273,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e command = ActionManager::registerAction(m_addAction, CMD_ID_ADD, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+S,Meta+A") : tr("Alt+S,Alt+A"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+S,Meta+A") : tr("Alt+S,Alt+A"))); connect(m_addAction, &QAction::triggered, this, &SubversionPlugin::addCurrentFile); subversionMenu->addAction(command); m_commandLocator->appendCommand(command); @@ -282,7 +282,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e command = ActionManager::registerAction(m_commitCurrentAction, CMD_ID_COMMIT_CURRENT, context); command->setAttribute(Command::CA_UpdateText); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+S,Meta+C") : tr("Alt+S,Alt+C"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+S,Meta+C") : tr("Alt+S,Alt+C"))); connect(m_commitCurrentAction, &QAction::triggered, this, &SubversionPlugin::startCommitCurrentFile); subversionMenu->addAction(command); m_commandLocator->appendCommand(command); diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index be12984f67a..6682dcb4753 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -325,7 +325,7 @@ void TextEditorActionHandlerPrivate::createActions() G_EDIT_FORMAT, advancedEditMenu); m_rewrapParagraphAction = registerAction(REWRAP_PARAGRAPH, [] (TextEditorWidget *w) { w->rewrapParagraph(); }, true, tr("&Rewrap Paragraph"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, R") : tr("Ctrl+E, R")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+E, R") : tr("Ctrl+E, R")), G_EDIT_FORMAT, advancedEditMenu); m_visualizeWhitespaceAction = registerBoolAction(VISUALIZE_WHITESPACE, [] (TextEditorWidget *widget, bool checked) { @@ -336,7 +336,7 @@ void TextEditorActionHandlerPrivate::createActions() } }, false, tr("&Visualize Whitespace"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, Meta+V") : tr("Ctrl+E, Ctrl+V")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+E, Meta+V") : tr("Ctrl+E, Ctrl+V")), G_EDIT_FORMAT, advancedEditMenu); m_visualizeWhitespaceAction->setCheckable(true); m_cleanWhitespaceAction = registerAction(CLEAN_WHITESPACE, @@ -352,7 +352,7 @@ void TextEditorActionHandlerPrivate::createActions() } }, false, tr("Enable Text &Wrapping"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+E, Meta+W") : tr("Ctrl+E, Ctrl+W")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+E, Meta+W") : tr("Ctrl+E, Ctrl+W")), G_EDIT_FORMAT, advancedEditMenu); m_textWrappingAction->setCheckable(true); m_unCommentSelectionAction = registerAction(UN_COMMENT_SELECTION, @@ -377,15 +377,15 @@ void TextEditorActionHandlerPrivate::createActions() G_EDIT_TEXT, advancedEditMenu); m_upperCaseSelectionAction = registerAction(UPPERCASE_SELECTION, [] (TextEditorWidget *w) { w->uppercaseSelection(); }, true, tr("Uppercase Selection"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+Shift+U") : tr("Alt+Shift+U")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+Shift+U") : tr("Alt+Shift+U")), G_EDIT_TEXT, advancedEditMenu); m_lowerCaseSelectionAction = registerAction(LOWERCASE_SELECTION, [] (TextEditorWidget *w) { w->lowercaseSelection(); }, true, tr("Lowercase Selection"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+U") : tr("Alt+U")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+U") : tr("Alt+U")), G_EDIT_TEXT, advancedEditMenu); m_sortSelectedLinesAction = registerAction(SORT_SELECTED_LINES, [] (TextEditorWidget *w) { w->sortSelectedLines(); }, false, tr("&Sort Selected Lines"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+Shift+S") : tr("Alt+Shift+S")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+Shift+S") : tr("Alt+Shift+S")), G_EDIT_TEXT, advancedEditMenu); m_foldAction = registerAction(FOLD, [] (TextEditorWidget *w) { w->fold(); }, true, tr("Fold"), @@ -409,7 +409,7 @@ void TextEditorActionHandlerPrivate::createActions() G_EDIT_FONT, advancedEditMenu); m_resetFontSizeAction = registerAction(RESET_FONT_SIZE, [] (TextEditorWidget *w) { w->zoomReset(); }, false, tr("Reset Font Size"), - QKeySequence(Core::UseMacShortcuts ? tr("Meta+0") : tr("Ctrl+0")), + QKeySequence(Core::useMacShortcuts ? tr("Meta+0") : tr("Ctrl+0")), G_EDIT_FONT, advancedEditMenu); m_gotoBlockStartAction = registerAction(GOTO_BLOCK_START, [] (TextEditorWidget *w) { w->gotoBlockStart(); }, true, tr("Go to Block Start"), diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 37b7aed27fc..9df31c910c6 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -104,7 +104,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe // Add shortcut for invoking automatic completion QAction *completionAction = new QAction(tr("Trigger Completion"), this); Command *command = ActionManager::registerAction(completionAction, Constants::COMPLETE_THIS, context); - command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space"))); + command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space"))); connect(completionAction, &QAction::triggered, []() { if (BaseTextEditor *editor = BaseTextEditor::currentTextEditor()) editor->editorWidget()->invokeAssist(Completion); |