forked from qt-creator/qt-creator
AppManInferiorRunner: Remove private field
Pass it via lambda capture instead. Change-Id: Ife0df546854f42e3f8c2e22755fe1cb4ebcb2ace Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -100,8 +100,7 @@ public:
|
|||||||
AppManInferiorRunner(RunControl *runControl,
|
AppManInferiorRunner(RunControl *runControl,
|
||||||
bool usePerf, bool useGdbServer, bool useQmlServer,
|
bool usePerf, bool useGdbServer, bool useQmlServer,
|
||||||
QmlDebugServicesPreset qmlServices)
|
QmlDebugServicesPreset qmlServices)
|
||||||
: SimpleTargetRunner(runControl),
|
: SimpleTargetRunner(runControl)
|
||||||
m_qmlServices(qmlServices)
|
|
||||||
{
|
{
|
||||||
setId(AppManager::Constants::DEBUG_LAUNCHER_ID);
|
setId(AppManager::Constants::DEBUG_LAUNCHER_ID);
|
||||||
setEssential(true);
|
setEssential(true);
|
||||||
@@ -118,7 +117,7 @@ public:
|
|||||||
if (useQmlServer)
|
if (useQmlServer)
|
||||||
runControl->requestQmlChannel();
|
runControl->requestQmlChannel();
|
||||||
|
|
||||||
setStartModifier([this, runControl] {
|
setStartModifier([this, runControl, qmlServices] {
|
||||||
FilePath controller = runControl->aspectData<AppManagerControllerAspect>()->filePath;
|
FilePath controller = runControl->aspectData<AppManagerControllerAspect>()->filePath;
|
||||||
QString appId = runControl->aspectData<AppManagerIdAspect>()->value;
|
QString appId = runControl->aspectData<AppManagerIdAspect>()->value;
|
||||||
QString instanceId = runControl->aspectData<AppManagerInstanceIdAspect>()->value;
|
QString instanceId = runControl->aspectData<AppManagerInstanceIdAspect>()->value;
|
||||||
@@ -141,10 +140,8 @@ public:
|
|||||||
if (usesDebugChannel())
|
if (usesDebugChannel())
|
||||||
debugArgs.append(QString("gdbserver :%1").arg(debugChannel().port()));
|
debugArgs.append(QString("gdbserver :%1").arg(debugChannel().port()));
|
||||||
if (usesQmlChannel()) {
|
if (usesQmlChannel()) {
|
||||||
const QString qmlArgs =
|
const QString qmlArgs = qmlDebugCommandLineArguments(qmlServices,
|
||||||
qmlDebugCommandLineArguments(m_qmlServices,
|
QString("port:%1").arg(qmlChannel().port()), true);
|
||||||
QString("port:%1").arg(qmlChannel().port()),
|
|
||||||
true);
|
|
||||||
debugArgs.append(QString("%program% %1 %arguments%") .arg(qmlArgs));
|
debugArgs.append(QString("%program% %1 %arguments%") .arg(qmlArgs));
|
||||||
}
|
}
|
||||||
cmd.addArg(debugArgs.join(' '));
|
cmd.addArg(debugArgs.join(' '));
|
||||||
@@ -174,9 +171,6 @@ public:
|
|||||||
appendMessage(Tr::tr("Using: %1.").arg(cmd.toUserOutput()), NormalMessageFormat);
|
appendMessage(Tr::tr("Using: %1.").arg(cmd.toUserOutput()), NormalMessageFormat);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
QmlDebugServicesPreset m_qmlServices;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user