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

@@ -45,11 +45,7 @@
using namespace ProjectExplorer::Internal;
VcsAnnotateTaskHandler::VcsAnnotateTaskHandler() :
ITaskHandler(QLatin1String(Constants::VCS_ANNOTATE_TASK))
{ }
bool VcsAnnotateTaskHandler::canHandle(const ProjectExplorer::Task &task)
bool VcsAnnotateTaskHandler::canHandle(const ProjectExplorer::Task &task) const
{
QFileInfo fi(task.file.toFileInfo());
if (!fi.exists() || !fi.isFile() || !fi.isReadable())
@@ -69,7 +65,7 @@ void VcsAnnotateTaskHandler::handle(const ProjectExplorer::Task &task)
vc->vcsAnnotate(fi.absoluteFilePath(), task.movedLine);
}
QAction *VcsAnnotateTaskHandler::createAction(QObject *parent)
QAction *VcsAnnotateTaskHandler::createAction(QObject *parent) const
{
QAction *vcsannotateAction = new QAction(tr("&Annotate"), parent);
vcsannotateAction->setToolTip(tr("Annotate using version control system"));