forked from qt-creator/qt-creator
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 <aurindam.jana@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user