diff --git a/src/plugins/projectexplorer/copytaskhandler.cpp b/src/plugins/projectexplorer/copytaskhandler.cpp index 3d098aa2bea..c2f1dee2b57 100644 --- a/src/plugins/projectexplorer/copytaskhandler.cpp +++ b/src/plugins/projectexplorer/copytaskhandler.cpp @@ -30,8 +30,10 @@ #include "copytaskhandler.h" #include "task.h" +#include "taskwindow.h" #include +#include #include #include @@ -61,9 +63,13 @@ void CopyTaskHandler::handle(const ProjectExplorer::Task &task) + type + task.description); } +Core::Id CopyTaskHandler::actionManagerId() const +{ + return Core::Id(Core::Constants::COPY); +} + QAction *CopyTaskHandler::createAction(QObject *parent) const { - QAction *copyAction = new QAction(tr("&Copy", "Name of the action triggering the copytaskhandler"), parent); - copyAction->setToolTip(tr("Copy task to clipboard")); + QAction *copyAction = new QAction(parent); return copyAction; } diff --git a/src/plugins/projectexplorer/copytaskhandler.h b/src/plugins/projectexplorer/copytaskhandler.h index 77fbc633850..4629db56812 100644 --- a/src/plugins/projectexplorer/copytaskhandler.h +++ b/src/plugins/projectexplorer/copytaskhandler.h @@ -44,6 +44,7 @@ public: bool canHandle(const Task &) const { return true; } void handle(const Task &task); + Core::Id actionManagerId() const; QAction *createAction(QObject *parent) const; }; diff --git a/src/plugins/projectexplorer/removetaskhandler.cpp b/src/plugins/projectexplorer/removetaskhandler.cpp index a0cff835942..fa75bf791d2 100644 --- a/src/plugins/projectexplorer/removetaskhandler.cpp +++ b/src/plugins/projectexplorer/removetaskhandler.cpp @@ -52,5 +52,7 @@ QAction *RemoveTaskHandler::createAction(QObject *parent) const { QAction *removeAction = new QAction(tr("Remove", "Name of the action triggering the removetaskhandler"), parent); removeAction->setToolTip(tr("Remove task from the task list")); + removeAction->setShortcut(QKeySequence(QKeySequence::Delete)); + removeAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); return removeAction; } diff --git a/src/plugins/projectexplorer/showineditortaskhandler.cpp b/src/plugins/projectexplorer/showineditortaskhandler.cpp index 7f34850ec97..f1758b2b86b 100644 --- a/src/plugins/projectexplorer/showineditortaskhandler.cpp +++ b/src/plugins/projectexplorer/showineditortaskhandler.cpp @@ -55,7 +55,9 @@ void ShowInEditorTaskHandler::handle(const ProjectExplorer::Task &task) QAction *ShowInEditorTaskHandler::createAction(QObject *parent) const { - QAction *showAction = new QAction(tr("&Show in Editor"), parent); + QAction *showAction = new QAction(tr("Show in Editor"), parent); showAction->setToolTip(tr("Show task location in an editor.")); + showAction->setShortcut(QKeySequence(Qt::Key_Return)); + showAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); return showAction; } diff --git a/src/plugins/projectexplorer/showoutputtaskhandler.cpp b/src/plugins/projectexplorer/showoutputtaskhandler.cpp index 01d6c814e46..47d580f47aa 100644 --- a/src/plugins/projectexplorer/showoutputtaskhandler.cpp +++ b/src/plugins/projectexplorer/showoutputtaskhandler.cpp @@ -61,5 +61,7 @@ QAction *ShowOutputTaskHandler::createAction(QObject *parent) const { QAction *outputAction = new QAction(tr("Show &Output"), parent); outputAction->setToolTip(tr("Show output generating this issue.")); + outputAction->setShortcut(QKeySequence(tr("O"))); + outputAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); return outputAction; }