From 388086211af733f132a5f0d12181d8d3811d8273 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 16 Mar 2017 15:04:58 +0100 Subject: [PATCH] Qml Debugger: Show fewer messages in the status bar The QmlDebugConnection can be quite spammy as it repeatedly tries to connect to the application. Show error messages from this process in the debugger log and only output a line in the status bar if the connection is considered to have permanently failed. Change-Id: I4a5715d9acdac47f690cb8aa67adb5cccff76e11 Task-number: QTCREATORBUG-17492 Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 33759888faf..2b95e64cb73 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -303,7 +303,7 @@ QmlEngine::QmlEngine(const DebuggerRunParameters &startParameters, DebuggerEngin connect(d->connection, &QmlDebugConnection::logStateChange, this, &QmlEngine::showConnectionStateMessage); connect(d->connection, &QmlDebugConnection::logError, this, - [this](const QString &error) { showMessage("QML Debugger: " + error, StatusBar); }); + [this](const QString &error) { showMessage("QML Debugger: " + error, LogWarning); }); connect(d->connection, &QmlDebugConnection::connectionFailed, this, &QmlEngine::connectionFailed); @@ -1261,6 +1261,8 @@ void QmlEngine::connectionFailed() { // this is only an error if we are already connected and something goes wrong. if (isConnected()) { + showMessage(tr("QML Debugger: Connection failed."), StatusBar); + if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits notifyInferiorSpontaneousStop(); notifyInferiorIll();