Commit 0266f44a authored by Daniel Teske's avatar Daniel Teske
Browse files

RunControlFactories: No need to check for isConfigured



Checking if a runconfiguration is configured happens before searching
for the right factory, thus the factory can assume that it always gets
a configured runconfiguration.

Change-Id: I171318dda22c4e89f3619418336865cb28a3dc5f
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent b20b1d33
......@@ -310,8 +310,6 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
QTC_ASSERT(rc, return sp);
EnvironmentAspect *environment = rc->extraAspect<ProjectExplorer::EnvironmentAspect>();
QTC_ASSERT(environment, return sp);
if (!rc->ensureConfigured(errorMessage))
return sp;
Target *target = runConfiguration->target();
Kit *kit = target ? target->kit() : KitManager::defaultKit();
......
......@@ -54,11 +54,9 @@ bool LocalApplicationRunControlFactory::canRun(RunConfiguration *runConfiguratio
RunControl *LocalApplicationRunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
{
Q_UNUSED(errorMessage)
QTC_ASSERT(canRun(runConfiguration, mode), return 0);
LocalApplicationRunConfiguration *localRunConfiguration = qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
// Force the dialog about executables at this point and fail if there is none
if (!localRunConfiguration->ensureConfigured(errorMessage))
return 0;
return new LocalApplicationRunControl(localRunConfiguration, mode);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment