forked from qt-creator/qt-creator
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:
@@ -303,7 +303,7 @@ QmlEngine::QmlEngine(const DebuggerRunParameters &startParameters, DebuggerEngin
|
|||||||
connect(d->connection, &QmlDebugConnection::logStateChange,
|
connect(d->connection, &QmlDebugConnection::logStateChange,
|
||||||
this, &QmlEngine::showConnectionStateMessage);
|
this, &QmlEngine::showConnectionStateMessage);
|
||||||
connect(d->connection, &QmlDebugConnection::logError, this,
|
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,
|
connect(d->connection, &QmlDebugConnection::connectionFailed,
|
||||||
this, &QmlEngine::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.
|
// this is only an error if we are already connected and something goes wrong.
|
||||||
if (isConnected()) {
|
if (isConnected()) {
|
||||||
|
showMessage(tr("QML Debugger: Connection failed."), StatusBar);
|
||||||
|
|
||||||
if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits
|
if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits
|
||||||
notifyInferiorSpontaneousStop();
|
notifyInferiorSpontaneousStop();
|
||||||
notifyInferiorIll();
|
notifyInferiorIll();
|
||||||
|
Reference in New Issue
Block a user