summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-03-09 12:11:17 +0100
committerEike Ziller <eike.ziller@qt.io>2017-03-09 12:14:55 +0100
commitcec29f34eaa286103978167ac30c429c4bd16a68 (patch)
treeb9383e19c93a80936c217600c3c4786512687cb8 /src/plugins/debugger
parent34c16ed7bcd6c222839a05aee8cfa911e92fa918 (diff)
parent33fa4b401c8e4f49cbee3bd31c7c21ade37faf6d (diff)
downloadqt-creator-cec29f34eaa286103978167ac30c429c4bd16a68.tar.gz
Merge remote-tracking branch 'origin/4.2' into 4.3
Conflicts: doc/src/qtcreator.qdoc tests/system/suite_general/suite.conf Change-Id: Ia298b177d6920a1d853e342b62cf98f7c48a278a
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 17b3e7ff70..6770149edb 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -574,15 +574,32 @@ void QmlEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result)
if (result.qmlServerPort.isValid())
runParameters().qmlServer.port = result.qmlServerPort;
- notifyEngineSetupOk();
+ switch (state()) {
+ case InferiorSetupOk:
+ // FIXME: This is not a legal transition, but we need to
+ // get to EngineSetupOk somehow from InferiorSetupOk.
+ // fallthrough. QTCREATORBUG-14089.
+ case EngineSetupRequested:
+ notifyEngineSetupOk();
+ break;
+ case EngineSetupOk:
+ case EngineRunRequested:
+ // QTCREATORBUG-17718: On Android while doing debugging in mixed mode, the QML debug engine
+ // sometimes reports EngineSetupOK after the EngineRunRequested thus overwriting the state
+ // which eventually results into app to waiting for the QML engine connection.
+ // Skipping the EngineSetupOK in aforementioned case.
+ // Nothing to do here. The setup is already done.
+ break;
+ default:
+ QTC_ASSERT(false, qDebug() << "Unexpected state" << state());
+ }
// The remote setup can take while especialy with mixed debugging.
// Just waiting for 8 seconds is not enough. Increase the timeout
// to 60 s
// In case we get an output the d->outputParser will start the connection.
d->noDebugOutputTimer.setInterval(60000);
- }
- else {
+ } else {
if (isMasterEngine())
QMessageBox::critical(ICore::dialogParent(), tr("Failed to start application"),
tr("Application startup failed: %1").arg(result.reason));