Analyzer: Move runMode member from IAnalyzerTool to AnalyzerAction

Slim down tool before dissolving.

Change-Id: I502aaa8860293acf8bfd93f541b751d5b96a9563
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-02-18 11:05:22 +01:00
parent f160d2b8f5
commit 35d3088252
9 changed files with 40 additions and 28 deletions

View File

@@ -63,6 +63,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
action = new AnalyzerAction(this);
action->setId("QmlProfiler.Local");
action->setTool(tool);
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
action->setText(tr("QML Profiler"));
action->setToolTip(description);
action->setStartMode(StartLocal);
@@ -72,6 +73,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
action = new AnalyzerAction(this);
action->setId("QmlProfiler.Remote");
action->setTool(tool);
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
action->setText(tr("QML Profiler (External)"));
action->setToolTip(description);
action->setStartMode(StartRemote);

View File

@@ -124,7 +124,6 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent)
: IAnalyzerTool(parent), d(new QmlProfilerToolPrivate)
{
setObjectName(QLatin1String("QmlProfilerTool"));
setRunMode(QmlProfilerRunMode);
setToolMode(AnyMode);
d->m_profilerState = 0;
@@ -528,7 +527,7 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode)
AnalyzerRunControl *rc = tool->createRunControl(sp, 0);
ProjectExplorerPlugin::startRunControl(rc, tool->runMode());
ProjectExplorerPlugin::startRunControl(rc, QmlProfilerRunMode);
}
void QmlProfilerTool::startTool(StartMode mode)
@@ -546,7 +545,7 @@ void QmlProfilerTool::startTool(StartMode mode)
if (mode == StartLocal) {
// ### not sure if we're supposed to check if the RunConFiguration isEnabled
Project *pro = SessionManager::startupProject();
ProjectExplorerPlugin::instance()->runProject(pro, runMode());
ProjectExplorerPlugin::instance()->runProject(pro, QmlProfilerRunMode);
} else if (mode == StartRemote) {
Internal::startRemoteTool(this, mode);
}