Analyzer: Remove one level of indirection when creating RunControls

Change-Id: I7029e2dbd3352549036da642fdbd926756a563cb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-06-19 09:46:25 +02:00
parent cbe27c5c44
commit 88a10a92db
3 changed files with 6 additions and 18 deletions

View File

@@ -32,6 +32,7 @@
#include "analyzermanager.h"
#include "analyzerplugin.h"
#include "analyzerstartparameters.h"
#include "ianalyzertool.h"
#include <coreplugin/coreconstants.h>
@@ -709,10 +710,9 @@ AnalyzerRunControl *AnalyzerManager::createRunControl(
const AnalyzerStartParameters &sp, RunConfiguration *runConfiguration)
{
foreach (AnalyzerAction *action, d->m_actions) {
if (AnalyzerRunControl *rc = action->tryCreateRunControl(sp, runConfiguration))
return rc;
if (action->runMode() == sp.runMode)
return action->runControlCreator()(sp, runConfiguration);
}
QTC_CHECK(false);
return 0;
}