From a5b0525b79555439a4138e9a9c44f60518feed51 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 21 Jul 2016 18:03:40 +0200 Subject: QML Debugger: Don't pretend the engine is interrupted when it isn't After sending the interrupt request the application will continue to the next line of JavaScript and only interrupt then. There is no way to interrupt the application via the JS debugger as long as no JS engine is active. The downside of this is that the pause/continue/stop icons are disabled until the application actually interrupts. The user might not understand this. Change-Id: I355de52f65898d6bdcd437675adba368662f3c13 Task-number: QTCREATORBUG-16646 Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/debugger/qml/qmlengine.cpp') diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 26a6661a8b..a50c319af9 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -661,7 +661,7 @@ void QmlEngine::interruptInferior() { showMessage(INTERRUPT, LogInput); d->runDirectCommand(INTERRUPT); - notifyInferiorStopOk(); + showStatusMessage(tr("Waiting for JavaScript engine to interrupt on next statement.")); } void QmlEngine::executeStep() @@ -1966,7 +1966,8 @@ void QmlEnginePrivate::messageReceived(const QByteArray &data) } engine->notifyInferiorSpontaneousStop(); backtrace(); - } else if (engine->state() == InferiorStopOk) { + } else if (engine->state() == InferiorStopRequested) { + engine->notifyInferiorStopOk(); backtrace(); } } -- cgit v1.2.1