Commit 17ecb5bb authored by Kai Koehne's avatar Kai Koehne

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: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 60c4160e
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment