aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/qml/qmlengine.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2023-12-05 10:23:10 +0100
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2023-12-05 10:47:09 +0000
commited52d0772786cd901b0803a1186feec69b1ecda4 (patch)
treecbac4efb6343a10fad6ea23c48d52b9271f18250 /src/plugins/debugger/qml/qmlengine.cpp
parentd2c03f771b2e15367cc1f7fdad6533c839aef0c4 (diff)
Qml Debugger: Don't complain about connection
When the debugger is quit, connectionStartupFailed will trigger and show a useless message box about not being able to connect. This can also trigger a crash in WatchHandler::cleanup if the user quits Creator while a debugging session is still running. (as seen on macOS). Change-Id: I19461d5cdd449e58e530b09b772431b3cf18c52f Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengine.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 7ba162a28f8..7c907678aed 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -208,6 +208,7 @@ public:
bool unpausedEvaluate = false;
bool contextEvaluate = false;
bool supportChangeBreakpoint = false;
+ bool hasQuit = false;
QTimer connectionTimer;
QmlDebug::QDebugMessageClient *msgClient = nullptr;
@@ -379,6 +380,9 @@ void QmlEngine::beginConnection()
void QmlEngine::connectionStartupFailed()
{
+ if (d->hasQuit)
+ return;
+
if (d->retryOnConnectFail) {
// retry after 3 seconds ...
QTimer::singleShot(3000, this, [this] { beginConnection(); });
@@ -937,6 +941,7 @@ void QmlEngine::quitDebugger()
{
d->automaticConnect = false;
d->retryOnConnectFail = false;
+ d->hasQuit = true;
stopProcess();
closeConnection();
}