itaskhandler: interface cleanup

Change-Id: Ib85950a4715d6eaf4225bd8dbcc0c2a91b20dc1d
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
hjk
2012-05-04 20:10:01 +02:00
committed by hjk
parent 06dc126d7c
commit 64ade99b0c
14 changed files with 34 additions and 70 deletions

View File

@@ -42,11 +42,7 @@
using namespace ProjectExplorer::Internal;
ShowInEditorTaskHandler::ShowInEditorTaskHandler() :
ITaskHandler(QLatin1String(Constants::SHOW_TASK_IN_EDITOR))
{ }
bool ShowInEditorTaskHandler::canHandle(const ProjectExplorer::Task &task)
bool ShowInEditorTaskHandler::canHandle(const ProjectExplorer::Task &task) const
{
if (task.file.isEmpty())
return false;
@@ -60,7 +56,7 @@ void ShowInEditorTaskHandler::handle(const ProjectExplorer::Task &task)
TextEditor::BaseTextEditorWidget::openEditorAt(fi.canonicalFilePath(), task.movedLine);
}
QAction *ShowInEditorTaskHandler::createAction(QObject *parent)
QAction *ShowInEditorTaskHandler::createAction(QObject *parent) const
{
QAction *showAction = new QAction(tr("&Show in Editor"), parent);
showAction->setToolTip(tr("Show task location in an editor."));