forked from qt-creator/qt-creator
Android: Fix running qml application when debugging is enabled
Execute onQmlDebugSync only in case isQmlDebug.
Before it was mistakenly executed always.
This doesn't fix debugging on Android, but fixes running qml app
when debugging is enabled.
Amends 5e46ff6cc3
Task-number: QTCREATORBUG-31885
Change-Id: I8f2dcefac671e87bbb6e9db5fa8c985d9830a9b1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -508,15 +508,14 @@ static ExecutableItem preStartRecipe(const Storage<RunnerStorage> &storage)
|
||||
storage->m_glue->addStdErr(process.cleanedStdErr().trimmed());
|
||||
};
|
||||
|
||||
const auto onQmlDebugSetup = [storage] {
|
||||
return storage->m_qmlDebugServices == QmlDebug::NoQmlDebugServices
|
||||
? SetupResult::StopWithSuccess : SetupResult::Continue;
|
||||
const auto isQmlDebug = [storage] {
|
||||
return storage->m_qmlDebugServices != QmlDebug::NoQmlDebugServices;
|
||||
};
|
||||
const auto onTaskTreeSetup = [storage](TaskTree &taskTree) {
|
||||
const QString port = "tcp:" + QString::number(storage->m_qmlServer.port());
|
||||
taskTree.setRecipe({removeForwardPortRecipe(storage.activeStorage(), port, port, "QML")});
|
||||
};
|
||||
const auto onQmlDebugDone = [storage, argsStorage] {
|
||||
const auto onQmlDebugSync = [storage, argsStorage] {
|
||||
const QString qmljsdebugger = QString("port:%1,block,services:%2")
|
||||
.arg(storage->m_qmlServer.port()).arg(QmlDebug::qmlDebugServices(storage->m_qmlDebugServices));
|
||||
|
||||
@@ -560,10 +559,9 @@ static ExecutableItem preStartRecipe(const Storage<RunnerStorage> &storage)
|
||||
For (iterator) >> Do {
|
||||
ProcessTask(onPreCommandSetup, onPreCommandDone, CallDoneIf::Error)
|
||||
},
|
||||
Group {
|
||||
onGroupSetup(onQmlDebugSetup),
|
||||
If (isQmlDebug) >> Then {
|
||||
TaskTreeTask(onTaskTreeSetup),
|
||||
onGroupDone(onQmlDebugDone, CallDoneIf::Success)
|
||||
Sync(onQmlDebugSync)
|
||||
},
|
||||
ProcessTask(onActivitySetup, onActivityDone, CallDoneIf::Error)
|
||||
};
|
||||
|
Reference in New Issue
Block a user