forked from qt-creator/qt-creator
Analyzer: Slim down AnalyzerStartParameters
* SysRoot can always be determined from kit. * Pass around RunMode as extra parameter not as part of AnalyzerStartParameters. That's closer to the pattern used elsewhere. * Environment was always initialized from the runconfig's EnvironmentAspect. The tools can do that directly. * Provide setter for display name for cases where it is not equal to RunConfiguration::displayName Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -69,18 +69,12 @@ bool QmlProfilerRunControlFactory::canRun(RunConfiguration *runConfiguration, Co
|
||||
static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration *runConfiguration)
|
||||
{
|
||||
AnalyzerStartParameters sp;
|
||||
EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>();
|
||||
|
||||
// FIXME: This is only used to communicate the connParams settings.
|
||||
LocalApplicationRunConfiguration *rc =
|
||||
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
|
||||
auto rc = qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
|
||||
QTC_ASSERT(rc, return sp);
|
||||
if (environment)
|
||||
sp.environment = environment->environment();
|
||||
sp.workingDirectory = rc->workingDirectory();
|
||||
sp.debuggee = rc->executable();
|
||||
sp.debuggeeArgs = rc->commandLineArguments();
|
||||
sp.displayName = rc->displayName();
|
||||
|
||||
const QtSupport::BaseQtVersion *version =
|
||||
QtSupport::QtKitInformation::qtVersion(runConfiguration->target()->kit());
|
||||
@@ -103,7 +97,6 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
|
||||
QTC_ASSERT(canRun(runConfiguration, mode), return 0);
|
||||
|
||||
AnalyzerStartParameters sp = createQmlProfilerStartParameters(runConfiguration);
|
||||
sp.runMode = mode;
|
||||
return LocalQmlProfilerRunner::createLocalRunControl(runConfiguration, sp, errorMessage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user