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 <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2017-03-16 15:04:58 +01:00
parent 1df4757dae
commit 388086211a

View File

@@ -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();