Analyzer: Use AnalyzerManager for run control creation

Less code.

Change-Id: Ic26d291ada7efd05899623738d89c52b4175716c
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
hjk
2013-08-01 15:02:42 +02:00
parent c1919f0ac3
commit 213cb601af
8 changed files with 24 additions and 54 deletions

View File

@@ -117,13 +117,6 @@ static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration
RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
{
IAnalyzerTool *tool = AnalyzerManager::toolFromRunMode(mode);
if (!tool) {
if (errorMessage)
*errorMessage = tr("No analyzer tool selected"); // never happens
return 0;
}
QTC_ASSERT(canRun(runConfiguration, mode), return 0);
AnalyzerStartParameters sp = createQmlProfilerStartParameters(runConfiguration);
@@ -133,7 +126,7 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
const IDevice::ConstPtr device = DeviceKitInformation::device(runConfiguration->target()->kit());
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
AnalyzerRunControl *rc = tool->createRunControl(sp, runConfiguration);
AnalyzerRunControl *rc = AnalyzerManager::createRunControl(sp, runConfiguration, mode, errorMessage);
QmlProfilerRunControl *engine = qobject_cast<QmlProfilerRunControl *>(rc);
if (!engine) {
delete rc;