Do not warn for combined engine if QML debugging has not been enabled

Do not bring up a message box when connecting to the QML debugging port,
but rather just log, and continue C++ debugging.

This mitigates the issue that, in some configurations, QML debugging is
enabled by default although the application might not be set up properly.

Change-Id: I29e89ada4bf14f57589c8c671452572b689cdbdb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Kai Koehne
2014-03-18 12:55:26 +01:00
parent 6e2de168a1
commit 9a8ec083d5

View File

@@ -457,16 +457,22 @@ void QmlEngine::connectionStartupFailed()
void QmlEngine::appStartupFailed(const QString &errorMessage)
{
QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow());
infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(tr("Qt Creator"));
infoBox->setText(tr("Could not connect to the in-process QML debugger."
"\n%1").arg(errorMessage));
infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
infoBox->setDefaultButton(QMessageBox::Ok);
connect(infoBox, SIGNAL(finished(int)),
this, SLOT(errorMessageBoxFinished(int)));
infoBox->show();
QString error = tr("Could not connect to the in-process QML debugger."
"\n%1").arg(errorMessage);
if (isMasterEngine()) {
QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow());
infoBox->setIcon(QMessageBox::Critical);
infoBox->setWindowTitle(tr("Qt Creator"));
infoBox->setText(error);
infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help);
infoBox->setDefaultButton(QMessageBox::Ok);
connect(infoBox, SIGNAL(finished(int)),
this, SLOT(errorMessageBoxFinished(int)));
infoBox->show();
} else {
showMessage(error, StatusBar);
}
notifyEngineRunFailed();
}