forked from qt-creator/qt-creator
ProjectExplorer: Split Target and ToolRunners into smaller tasks
This increases re-usability of activities like 'port gathering', and makes their use less dependent on actual device implementations. Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -32,7 +32,7 @@ namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
IosAnalyzeSupport::IosAnalyzeSupport(RunControl *runControl, bool cppDebug, bool qmlDebug)
|
||||
: ToolRunner(runControl),
|
||||
: RunWorker(runControl),
|
||||
m_runner(new IosRunner(this, runControl, cppDebug, qmlDebug ? QmlDebug::QmlProfilerServices :
|
||||
QmlDebug::NoQmlDebugServices))
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Internal {
|
||||
|
||||
class IosRunner;
|
||||
|
||||
class IosAnalyzeSupport : public ProjectExplorer::ToolRunner
|
||||
class IosAnalyzeSupport : public ProjectExplorer::RunWorker
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -184,11 +184,8 @@ RunControl *IosRunControlFactory::create(RunConfiguration *runConfig,
|
||||
if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE)
|
||||
res = new Ios::Internal::IosRunControl(rc);
|
||||
else if (mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) {
|
||||
RunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, mode);
|
||||
QTC_ASSERT(runControl, return 0);
|
||||
IDevice::ConstPtr device = DeviceKitInformation::device(target->kit());
|
||||
if (device.isNull())
|
||||
return 0;
|
||||
auto runControl = new RunControl(runConfig, mode);
|
||||
runControl->createWorker(mode);
|
||||
auto iosRunConfig = qobject_cast<IosRunConfiguration *>(runConfig);
|
||||
StandardRunnable runnable;
|
||||
runnable.executable = iosRunConfig->localExecutable().toUserOutput();
|
||||
|
||||
Reference in New Issue
Block a user