Commit fa6ad900 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Use KActionCollection::setDefaultShortcut for actions that go into the action collection

Otherwise we get a huge warning, seems like something to have fixed in
KActionCollection though...
parent d3b0344c
......@@ -238,25 +238,25 @@ void ContextBrowserPlugin::createActionsForMainWindow(Sublime::MainWindow* windo
QAction* previousContext = actions.addAction("previous_context");
previousContext->setText( i18n("&Previous Visited Context") );
previousContext->setIcon( QIcon::fromTheme("go-previous-context" ) );
previousContext->setShortcut( Qt::META | Qt::Key_Left );
actions.setDefaultShortcut( previousContext, Qt::META | Qt::Key_Left );
QObject::connect(previousContext, SIGNAL(triggered(bool)), this, SLOT(previousContextShortcut()));
QAction* nextContext = actions.addAction("next_context");
nextContext->setText( i18n("&Next Visited Context") );
nextContext->setIcon( QIcon::fromTheme("go-next-context" ) );
nextContext->setShortcut( Qt::META | Qt::Key_Right );
actions.setDefaultShortcut( nextContext, Qt::META | Qt::Key_Right );
QObject::connect(nextContext, SIGNAL(triggered(bool)), this, SLOT(nextContextShortcut()));
QAction* previousUse = actions.addAction("previous_use");
previousUse->setText( i18n("&Previous Use") );
previousUse->setIcon( QIcon::fromTheme("go-previous-use") );
previousUse->setShortcut( Qt::META | Qt::SHIFT | Qt::Key_Left );
actions.setDefaultShortcut( previousUse, Qt::META | Qt::SHIFT | Qt::Key_Left );
QObject::connect(previousUse, SIGNAL(triggered(bool)), this, SLOT(previousUseShortcut()));
QAction* nextUse = actions.addAction("next_use");
nextUse->setText( i18n("&Next Use") );
nextUse->setIcon( QIcon::fromTheme("go-next-use") );
nextUse->setShortcut( Qt::META | Qt::SHIFT | Qt::Key_Right );
actions.setDefaultShortcut( nextUse, Qt::META | Qt::SHIFT | Qt::Key_Right );
QObject::connect(nextUse, SIGNAL(triggered(bool)), this, SLOT(nextUseShortcut()));
QWidgetAction* outline = new QWidgetAction(this);
......
......@@ -67,7 +67,7 @@ DocumentSwitcherPlugin::DocumentSwitcherPlugin(QObject *parent, const QVariantLi
forwardAction = actionCollection()->addAction ( "last_used_views_forward" );
forwardAction->setText( i18n( "Last Used Views" ) );
forwardAction->setIcon( QIcon::fromTheme("go-next-view-page") );
forwardAction->setShortcut( Qt::CTRL | Qt::Key_Tab );
actionCollection()->setDefaultShortcut( forwardAction, Qt::CTRL | Qt::Key_Tab );
forwardAction->setWhatsThis( i18n( "Opens a list to walk through the list of last used views." ) );
forwardAction->setStatusTip( i18n( "Walk through the list of last used views" ) );
connect( forwardAction, SIGNAL(triggered()), SLOT(walkForward()) );
......@@ -75,7 +75,7 @@ DocumentSwitcherPlugin::DocumentSwitcherPlugin(QObject *parent, const QVariantLi
backwardAction = actionCollection()->addAction ( "last_used_views_backward" );
backwardAction->setText( i18n( "Last Used Views (Reverse)" ) );
backwardAction->setIcon( QIcon::fromTheme("go-previous-view-page") );
backwardAction->setShortcut( Qt::CTRL | Qt::SHIFT | Qt::Key_Tab );
actionCollection()->setDefaultShortcut( backwardAction, Qt::CTRL | Qt::SHIFT | Qt::Key_Tab );
backwardAction->setWhatsThis( i18n( "Opens a list to walk through the list of last used views in reverse." ) );
backwardAction->setStatusTip( i18n( "Walk through the list of last used views" ) );
connect( backwardAction, SIGNAL(triggered()), SLOT(walkBackward()) );
......
......@@ -89,7 +89,7 @@ GrepViewPlugin::GrepViewPlugin( QObject *parent, const QVariantList & )
QAction*action = actionCollection()->addAction("edit_grep");
action->setText(i18n("Find/Replace in Fi&les..."));
action->setShortcut( QKeySequence("Ctrl+Alt+F") );
actionCollection()->setDefaultShortcut( action, QKeySequence("Ctrl+Alt+F") );
connect(action, SIGNAL(triggered(bool)), this, SLOT(showDialogFromMenu()));
action->setToolTip( i18n("Search for expressions over several files") );
action->setWhatsThis( i18n("Opens the 'Find/Replace in files' dialog. There you "
......
......@@ -513,7 +513,7 @@ PatchReviewPlugin::PatchReviewPlugin( QObject *parent, const QVariantList & )
m_finishReview = new QAction(this);
m_finishReview->setIcon( QIcon::fromTheme( "dialog-ok" ) );
m_finishReview->setShortcut( Qt::CTRL|Qt::Key_Return );
actionCollection()->setDefaultShortcut( m_finishReview, Qt::CTRL|Qt::Key_Return );
actionCollection()->addAction("commit_or_finish_review", m_finishReview);
ICore::self()->uiController()->activeArea()->addAction(m_finishReview);
......
......@@ -113,7 +113,7 @@ ProjectManagerViewPlugin::ProjectManagerViewPlugin( QObject *parent, const QVari
d->m_build = new QAction( i18n("Build Selection"), this );
d->m_build->setIconText( i18n("Build") );
d->m_build->setShortcut( Qt::Key_F8 );
actionCollection()->setDefaultShortcut( d->m_build, Qt::Key_F8 );
d->m_build->setIcon(QIcon::fromTheme("run-build"));
d->m_build->setEnabled( false );
connect( d->m_build, SIGNAL(triggered()), this, SLOT(buildProjectItems()) );
......@@ -121,7 +121,7 @@ ProjectManagerViewPlugin::ProjectManagerViewPlugin( QObject *parent, const QVari
d->m_install = new QAction( i18n("Install Selection"), this );
d->m_install->setIconText( i18n("Install") );
d->m_install->setIcon(QIcon::fromTheme("run-build-install"));
d->m_install->setShortcut( Qt::SHIFT + Qt::Key_F8 );
actionCollection()->setDefaultShortcut( d->m_install, Qt::SHIFT + Qt::Key_F8 );
d->m_install->setEnabled( false );
connect( d->m_install, SIGNAL(triggered()), this, SLOT(installProjectItems()) );
actionCollection()->addAction( "project_install", d->m_install );
......
......@@ -721,25 +721,25 @@ void QuickOpenPlugin::createActionsForMainWindow(Sublime::MainWindow* /*window*/
QAction* quickOpen = actions.addAction("quick_open");
quickOpen->setText( i18n("&Quick Open") );
quickOpen->setIcon( QIcon::fromTheme("quickopen") );
quickOpen->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_Q );
actions.setDefaultShortcut( quickOpen, Qt::CTRL | Qt::ALT | Qt::Key_Q );
connect(quickOpen, SIGNAL(triggered(bool)), this, SLOT(quickOpen()));
QAction* quickOpenFile = actions.addAction("quick_open_file");
quickOpenFile->setText( i18n("Quick Open &File") );
quickOpenFile->setIcon( QIcon::fromTheme("quickopen-file") );
quickOpenFile->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_O );
actions.setDefaultShortcut( quickOpenFile, Qt::CTRL | Qt::ALT | Qt::Key_O );
connect(quickOpenFile, SIGNAL(triggered(bool)), this, SLOT(quickOpenFile()));
QAction* quickOpenClass = actions.addAction("quick_open_class");
quickOpenClass->setText( i18n("Quick Open &Class") );
quickOpenClass->setIcon( QIcon::fromTheme("quickopen-class") );
quickOpenClass->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_C );
actions.setDefaultShortcut( quickOpenClass, Qt::CTRL | Qt::ALT | Qt::Key_C );
connect(quickOpenClass, SIGNAL(triggered(bool)), this, SLOT(quickOpenClass()));
QAction* quickOpenFunction = actions.addAction("quick_open_function");
quickOpenFunction->setText( i18n("Quick Open &Function") );
quickOpenFunction->setIcon( QIcon::fromTheme("quickopen-function") );
quickOpenFunction->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_M );
actions.setDefaultShortcut( quickOpenFunction, Qt::CTRL | Qt::ALT | Qt::Key_M );
connect(quickOpenFunction, SIGNAL(triggered(bool)), this, SLOT(quickOpenFunction()));
QAction* quickOpenAlreadyOpen = actions.addAction("quick_open_already_open");
......@@ -750,41 +750,41 @@ void QuickOpenPlugin::createActionsForMainWindow(Sublime::MainWindow* /*window*/
QAction* quickOpenDocumentation = actions.addAction("quick_open_documentation");
quickOpenDocumentation->setText( i18n("Quick Open &Documentation") );
quickOpenDocumentation->setIcon( QIcon::fromTheme("quickopen-documentation") );
quickOpenDocumentation->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_D );
actions.setDefaultShortcut( quickOpenDocumentation, Qt::CTRL | Qt::ALT | Qt::Key_D );
connect(quickOpenDocumentation, SIGNAL(triggered(bool)), this, SLOT(quickOpenDocumentation()));
m_quickOpenDeclaration = actions.addAction("quick_open_jump_declaration");
m_quickOpenDeclaration->setText( i18n("Jump to Declaration") );
m_quickOpenDeclaration->setIcon( QIcon::fromTheme("go-jump-declaration" ) );
m_quickOpenDeclaration->setShortcut( Qt::CTRL | Qt::Key_Period );
actions.setDefaultShortcut( m_quickOpenDeclaration, Qt::CTRL | Qt::Key_Period );
connect(m_quickOpenDeclaration, SIGNAL(triggered(bool)), this, SLOT(quickOpenDeclaration()), Qt::QueuedConnection);
m_quickOpenDefinition = actions.addAction("quick_open_jump_definition");
m_quickOpenDefinition->setText( i18n("Jump to Definition") );
m_quickOpenDefinition->setIcon( QIcon::fromTheme("go-jump-definition" ) );
m_quickOpenDefinition->setShortcut( Qt::CTRL | Qt::Key_Comma );
actions.setDefaultShortcut( m_quickOpenDefinition, Qt::CTRL | Qt::Key_Comma );
connect(m_quickOpenDefinition, SIGNAL(triggered(bool)), this, SLOT(quickOpenDefinition()), Qt::QueuedConnection);
QWidgetAction* quickOpenLine = new QWidgetAction(this);
quickOpenLine->setText( i18n("Embedded Quick Open") );
// quickOpenLine->setShortcut( Qt::CTRL | Qt::ALT | Qt::Key_E );
// actions.setDefaultShortcut( quickOpenLine, Qt::CTRL | Qt::ALT | Qt::Key_E );
// connect(quickOpenLine, SIGNAL(triggered(bool)), this, SLOT(quickOpenLine(bool)));
quickOpenLine->setDefaultWidget(createQuickOpenLineWidget());
actions.addAction("quick_open_line", quickOpenLine);
QAction* quickOpenNextFunction = actions.addAction("quick_open_next_function");
quickOpenNextFunction->setText( i18n("Next Function") );
quickOpenNextFunction->setShortcut( Qt::CTRL| Qt::ALT | Qt::Key_PageDown );
actions.setDefaultShortcut( quickOpenNextFunction, Qt::CTRL| Qt::ALT | Qt::Key_PageDown );
connect(quickOpenNextFunction, SIGNAL(triggered(bool)), this, SLOT(nextFunction()));
QAction* quickOpenPrevFunction = actions.addAction("quick_open_prev_function");
quickOpenPrevFunction->setText( i18n("Previous Function") );
quickOpenPrevFunction->setShortcut( Qt::CTRL| Qt::ALT | Qt::Key_PageUp );
actions.setDefaultShortcut( quickOpenPrevFunction, Qt::CTRL| Qt::ALT | Qt::Key_PageUp );
connect(quickOpenPrevFunction, SIGNAL(triggered(bool)), this, SLOT(previousFunction()));
QAction* quickOpenNavigateFunctions = actions.addAction("quick_open_outline");
quickOpenNavigateFunctions->setText( i18n("Outline") );
quickOpenNavigateFunctions->setShortcut( Qt::CTRL| Qt::ALT | Qt::Key_N );
actions.setDefaultShortcut( quickOpenNavigateFunctions, Qt::CTRL| Qt::ALT | Qt::Key_N );
connect(quickOpenNavigateFunctions, SIGNAL(triggered(bool)), this, SLOT(quickOpenNavigateFunctions()));
}
......
......@@ -84,13 +84,13 @@ StandardOutputView::StandardOutputView(QObject *parent, const QVariantList &)
action = actionCollection()->addAction("next_error");
action->setText(i18n("Jump to Next Outputmark"));
action->setShortcut( QKeySequence(Qt::Key_F4) );
actionCollection()->setDefaultShortcut( action, QKeySequence(Qt::Key_F4) );
action->setIcon(QIcon::fromTheme("arrow-right"));
connect(action, SIGNAL(triggered(bool)), this, SIGNAL(selectNextItem()));
action = actionCollection()->addAction("prev_error");
action->setText(i18n("Jump to Previous Outputmark"));
action->setShortcut( QKeySequence(Qt::SHIFT | Qt::Key_F4) );
actionCollection()->setDefaultShortcut( action, QKeySequence(Qt::SHIFT | Qt::Key_F4) );
action->setIcon(QIcon::fromTheme("arrow-left"));
connect(action, SIGNAL(triggered(bool)), this, SIGNAL(selectPrevItem()));
......
......@@ -157,7 +157,7 @@ void SwitchToBuddyPlugin::createActionsForMainWindow(Sublime::MainWindow* window
QAction* switchDefinitionDeclaration = actions.addAction("switch_definition_declaration");
switchDefinitionDeclaration->setText( i18n("&Switch Definition/Declaration") );
switchDefinitionDeclaration->setShortcut( Qt::CTRL | Qt::SHIFT | Qt::Key_C );
actions.setDefaultShortcut( switchDefinitionDeclaration, Qt::CTRL | Qt::SHIFT | Qt::Key_C );
connect(switchDefinitionDeclaration, SIGNAL(triggered(bool)), this, SLOT(switchDefinitionDeclaration()));
}
......
......@@ -236,7 +236,7 @@ void DebugController::setupActions()
ac->addAction("debug_jumptocursor", action);
m_stepOver = action = new QAction(QIcon::fromTheme("debug-step-over"), i18n("Step &Over"), this);
action->setShortcut(Qt::Key_F10);
ac->setDefaultShortcut( action, Qt::Key_F10);
action->setToolTip( i18n("Step over the next line") );
action->setWhatsThis( i18n("Executes one line of source in the current source file. "
"If the source line is a call to a function the whole "
......@@ -254,7 +254,7 @@ void DebugController::setupActions()
m_stepInto = action = new QAction(QIcon::fromTheme("debug-step-into"), i18n("Step &Into"), this);
action->setShortcut(Qt::Key_F11);
ac->setDefaultShortcut( action, Qt::Key_F11);
action->setToolTip( i18n("Step into the next statement") );
action->setWhatsThis( i18n("Executes exactly one line of source. If the source line "
"is a call to a function then execution will stop after "
......@@ -270,7 +270,7 @@ void DebugController::setupActions()
ac->addAction("debug_stepintoinst", action);
m_stepOut = action = new QAction(QIcon::fromTheme("debug-step-out"), i18n("Step O&ut"), this);
action->setShortcut(Qt::Key_F12);
ac->setDefaultShortcut( action, Qt::Key_F12);
action->setToolTip( i18n("Step out of the current function") );
action->setWhatsThis( i18n("Executes the application until the currently executing "
"function is completed. The debugger will then display "
......@@ -281,7 +281,7 @@ void DebugController::setupActions()
ac->addAction("debug_stepout", action);
m_toggleBreakpoint = action = new QAction(QIcon::fromTheme("script-error"), i18n("Toggle Breakpoint"), this);
action->setShortcut( i18n("Ctrl+Alt+B") );
ac->setDefaultShortcut( action, i18n("Ctrl+Alt+B") );
action->setToolTip(i18n("Toggle breakpoint"));
action->setWhatsThis(i18n("Toggles the breakpoint at the current line in editor."));
connect(action, SIGNAL(triggered(bool)), this, SLOT(toggleBreakpoint()));
......
......@@ -610,7 +610,7 @@ void DocumentController::setupActions()
action = ac->addAction( "file_open" );
action->setIcon(QIcon::fromTheme("document-open"));
action->setShortcut( Qt::CTRL + Qt::Key_O );
ac->setDefaultShortcut(action, Qt::CTRL + Qt::Key_O );
action->setText(i18n( "&Open..." ) );
connect( action, SIGNAL(triggered(bool)), SLOT(chooseDocument()) );
action->setToolTip( i18n( "Open file" ) );
......@@ -627,7 +627,7 @@ void DocumentController::setupActions()
connect( action, SIGNAL(triggered(bool)), SLOT(slotSaveAllDocuments()) );
action->setToolTip( i18n( "Save all open documents" ) );
action->setWhatsThis( i18n( "Save all open documents, prompting for additional information when necessary." ) );
action->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) );
ac->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_L) );
action->setEnabled(false);
action = d->revertAll = ac->addAction( "file_revert_all" );
......@@ -640,7 +640,7 @@ void DocumentController::setupActions()
action = d->close = ac->addAction( "file_close" );
action->setIcon(QIcon::fromTheme("window-close"));
action->setShortcut( Qt::CTRL + Qt::Key_W );
ac->setDefaultShortcut(action, Qt::CTRL + Qt::Key_W );
action->setText( i18n( "&Close" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(fileClose()) );
action->setToolTip( i18n( "Close file" ) );
......@@ -657,7 +657,7 @@ void DocumentController::setupActions()
action = d->closeAllOthers = ac->addAction( "file_closeother" );
action->setIcon(QIcon::fromTheme("window-close"));
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_W );
ac->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_W );
action->setText(i18n( "Close All Ot&hers" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(closeAllOtherDocuments()) );
action->setToolTip( i18n( "Close all other documents" ) );
......
......@@ -247,7 +247,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "view_next_window" );
action->setText( i18n( "&Next Window" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(gotoNextWindow()) );
action->setShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_Right );
actionCollection()->setDefaultShortcut(action, Qt::ALT + Qt::SHIFT + Qt::Key_Right );
action->setToolTip( i18nc( "@info:tooltip", "Next window" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the next window." ) );
action->setIcon(QIcon::fromTheme("go-next"));
......@@ -255,7 +255,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "view_previous_window" );
action->setText( i18n( "&Previous Window" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(gotoPreviousWindow()) );
action->setShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_Left );
actionCollection()->setDefaultShortcut(action, Qt::ALT + Qt::SHIFT + Qt::Key_Left );
action->setToolTip( i18nc( "@info:tooltip", "Previous window" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the previous window." ) );
action->setIcon(QIcon::fromTheme("go-previous"));
......@@ -263,7 +263,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "split_horizontal" );
action->setIcon(QIcon::fromTheme( "view-split-top-bottom" ));
action->setText( i18n( "Split View &Top/Bottom" ) );
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_T );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_T );
connect( action, SIGNAL(triggered(bool)), SLOT(splitHorizontal()) );
action->setToolTip( i18nc( "@info:tooltip", "Split horizontal" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Splits the current view horizontally." ) );
......@@ -271,7 +271,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "split_vertical" );
action->setIcon(QIcon::fromTheme( "view-split-left-right" ));
action->setText( i18n( "Split View &Left/Right" ) );
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_L );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_L );
connect( action, SIGNAL(triggered(bool)), SLOT(splitVertical()) );
action->setToolTip( i18nc( "@info:tooltip", "Split vertical" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Splits the current view vertically." ) );
......@@ -279,7 +279,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "view_next_split" );
action->setText( i18n( "&Next Split View" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(gotoNextSplit()) );
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_N );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_N );
action->setToolTip( i18nc( "@info:tooltip", "Next split view" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the next split view." ) );
action->setIcon(QIcon::fromTheme("go-next"));
......@@ -287,7 +287,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "view_previous_split" );
action->setText( i18n( "&Previous Split View" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(gotoPreviousSplit()) );
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_P );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_P );
action->setToolTip( i18nc( "@info:tooltip", "Previous split view" ) );
action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the previous split view." ) );
action->setIcon(QIcon::fromTheme("go-previous"));
......@@ -296,7 +296,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "file_new" );
action->setIcon(QIcon::fromTheme("document-new"));
action->setShortcut( Qt::CTRL + Qt::Key_N );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::Key_N );
action->setText( i18n( "&New" ) );
action->setIconText( i18nc( "Shorter Text for 'New File' shown in the toolbar", "New") );
connect( action, SIGNAL(triggered(bool)), SLOT(fileNew()) );
......@@ -305,7 +305,7 @@ void MainWindowPrivate::setupActions()
action = actionCollection()->addAction( "add_toolview" );
action->setIcon(QIcon::fromTheme("window-new"));
action->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_V );
actionCollection()->setDefaultShortcut(action, Qt::CTRL + Qt::SHIFT + Qt::Key_V );
action->setText( i18n( "&Add Tool View..." ) );
connect( action, SIGNAL(triggered(bool)), SLOT(viewAddNewToolView()) );
action->setToolTip( i18nc( "@info:tooltip", "Add tool view" ) );
......
......@@ -424,7 +424,7 @@ void RunController::setupActions()
d->runAction = new QAction( QIcon::fromTheme("system-run"), i18n("Execute Launch"), this);
d->runAction->setIconText( i18nc("Short text for 'Execute launch' used in the toolbar", "Execute") );
d->runAction->setShortcut(Qt::SHIFT + Qt::Key_F9);
ac->setDefaultShortcut( d->runAction, Qt::SHIFT + Qt::Key_F9);
d->runAction->setToolTip(i18nc("@info:tooltip", "Execute current launch"));
d->runAction->setStatusTip(i18n("Execute current launch"));
d->runAction->setWhatsThis(i18nc("@info:whatsthis", "Executes the target or the program specified in currently active launch configuration."));
......@@ -432,7 +432,7 @@ void RunController::setupActions()
connect(d->runAction, SIGNAL(triggered(bool)), this, SLOT(slotExecute()));
d->dbgAction = new QAction( QIcon::fromTheme("debug-run"), i18n("Debug Launch"), this);
d->dbgAction->setShortcut(Qt::Key_F9);
ac->setDefaultShortcut( d->dbgAction, Qt::Key_F9);
d->dbgAction->setIconText( i18nc("Short text for 'Debug launch' used in the toolbar", "Debug") );
d->dbgAction->setToolTip(i18nc("@info:tooltip", "Debug current launch"));
d->dbgAction->setStatusTip(i18n("Debug current launch"));
......@@ -452,7 +452,7 @@ void RunController::setupActions()
action = d->stopAction = new QAction( QIcon::fromTheme("process-stop"), i18n("Stop All Jobs"), this);
action->setIconText(i18nc("Short text for 'Stop All Jobs' used in the toolbar", "Stop All"));
// Ctrl+Escape would be nicer, but thats taken by the ksysguard desktop shortcut
action->setShortcut(QKeySequence("Ctrl+Shift+Escape"));
ac->setDefaultShortcut( action, QKeySequence("Ctrl+Shift+Escape"));
action->setToolTip(i18nc("@info:tooltip", "Stop all currently running jobs"));
action->setWhatsThis(i18nc("@info:whatsthis", "Requests that all running jobs are stopped."));
action->setEnabled(false);
......
......@@ -554,7 +554,7 @@ SessionController::SessionController( QObject *parent )
action = actionCollection()->addAction( "quit", this, SIGNAL(quitSession()) );
action->setText( i18n("Quit") );
action->setShortcut(Qt::CTRL | Qt::Key_Q);
actionCollection()->setDefaultShortcut( action, Qt::CTRL | Qt::Key_Q );
action->setIcon(QIcon::fromTheme("application-exit"));
#if 0
......
......@@ -98,40 +98,41 @@ MainWindowPrivate::MainWindowPrivate(MainWindow *w, Controller* controller)
QAction* action = new QAction(i18n("Show Left Dock"), this);
action->setCheckable(true);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_L);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_L);
connect(action, SIGNAL(toggled(bool)), SLOT(showLeftDock(bool)));
ac->addAction("show_left_dock", action);
action = new QAction(i18n("Show Right Dock"), this);
action->setCheckable(true);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_R);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_R);
connect(action, SIGNAL(toggled(bool)), SLOT(showRightDock(bool)));
ac->addAction("show_right_dock", action);
action = new QAction(i18n("Show Bottom Dock"), this);
action->setCheckable(true);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_B);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_B);
connect(action, SIGNAL(toggled(bool)), SLOT(showBottomDock(bool)));
ac->addAction("show_bottom_dock", action);
action = new QAction(i18nc("@action", "Focus Editor"), this);
action->setShortcuts(QList<QKeySequence>() << (Qt::META | Qt::CTRL | Qt::Key_E) << Qt::META + Qt::Key_C);
ac->setDefaultShortcuts(action, QList<QKeySequence>() << (Qt::META | Qt::CTRL | Qt::Key_E) << Qt::META + Qt::Key_C);
connect(action, SIGNAL(triggered(bool)), this, SLOT(focusEditor()));
ac->addAction("focus_editor", action);
action = new QAction(i18n("Hide/Restore Docks"), this);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_H);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_H);
connect(action, SIGNAL(triggered(bool)), SLOT(toggleDocksShown()));
ac->addAction("hide_all_docks", action);
action = new QAction(i18n("Next Tool View"), this);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_N);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_N);
action->setIcon(QIcon::fromTheme("go-next"));
connect(action, SIGNAL(triggered(bool)), SLOT(selectNextDock()));
ac->addAction("select_next_dock", action);
action = new QAction(i18n("Previous Tool View"), this);
action->setShortcut(Qt::META | Qt::CTRL | Qt::Key_P);
ac->setDefaultShortcut(action, Qt::META | Qt::CTRL | Qt::Key_P);
action->setIcon(QIcon::fromTheme("go-previous"));
connect(action, SIGNAL(triggered(bool)), SLOT(selectPreviousDock()));
ac->addAction("select_previous_dock", action);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment