forked from qt-creator/qt-creator
QmlProfiler: Use StandardRunnable in LocalQmlProfilerRunner
Change-Id: I8c59f9dfe562717edd86453b0154b7f2811a06f3 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -75,6 +75,12 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
|
||||
QTC_ASSERT(runConfiguration->runnable().is<StandardRunnable>(), return 0);
|
||||
auto runnable = runConfiguration->runnable().as<StandardRunnable>();
|
||||
|
||||
if (runnable.executable.isEmpty()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("No executable file to launch.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Kit *kit = runConfiguration->target()->kit();
|
||||
AnalyzerConnection connection;
|
||||
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||
@@ -101,20 +107,10 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
|
||||
runControl->setConnection(connection);
|
||||
|
||||
LocalQmlProfilerRunner::Configuration conf;
|
||||
conf.executable = runnable.executable;
|
||||
conf.executableArguments = runnable.commandLineArguments;
|
||||
conf.workingDirectory = runnable.workingDirectory;
|
||||
conf.debuggee = runnable;
|
||||
conf.socket = connection.analyzerSocket;
|
||||
if (EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>())
|
||||
conf.environment = environment->environment();
|
||||
conf.port = connection.analyzerPort;
|
||||
|
||||
if (conf.executable.isEmpty()) {
|
||||
if (errorMessage)
|
||||
*errorMessage = tr("No executable file to launch.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
(void) new LocalQmlProfilerRunner(conf, runControl);
|
||||
return runControl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user