From 17ecb5bb714480af3208599c864bafca0930eb88 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 13 Oct 2011 15:32:42 +0200 Subject: [PATCH] Debugger: Avoid "Could not connect ... QML debugger" warning for mixed debugging There's a race condition between the QML Engine trying to connect after the app printed "Waiting on debugger port ...", and any possible Cpp breakpoints stopping the app. Therefore, don't annoy the user with "Could not connec to QML Debugger" warnings while the Cpp debugger is stepping. Change-Id: I77f6f98e835e45363c5d47e10b39df249f65a1a3 Task-number: QTCREATORBUG-6249 Reviewed-by: Aurindam Jana --- src/plugins/debugger/qml/qmlengine.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 46ccd86dc9..9d2c4cb865 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -210,6 +210,14 @@ void QmlEngine::beginConnection() void QmlEngine::connectionStartupFailed() { + if (isSlaveEngine()) { + if (masterEngine()->state() != InferiorRunOk) { + // we're right now debugging C++, just try longer ... + beginConnection(); + return; + } + } + Core::ICore * const core = Core::ICore::instance(); QMessageBox *infoBox = new QMessageBox(core->mainWindow()); infoBox->setIcon(QMessageBox::Critical); -- 2.11.0