From bf9bfeaa9ac7f44e294a776f3bb6f4284a42bf85 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 25 Aug 2022 10:31:11 +0200 Subject: [PATCH] Debugger: Warn about QML Debug Mode not being enabled Previously we only warned the user that he has to enable qml debugging in both run & build config for desktop runs. With this change we now also warn for other types of devices ( e.g. iOS / Android / Remote debugging ) Change-Id: I1437edc9841668299703dad980a292178c891cfe Reviewed-by: Reviewed-by: hjk --- src/plugins/debugger/debuggerruncontrol.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 1bdbdc314ef..e394cd6ee6e 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -583,7 +583,7 @@ void DebuggerRunTool::start() ++d->engineStopsNeeded; } - if (m_runParameters.startMode == StartInternal) { + if (m_runParameters.startMode != AttachToCore) { QStringList unhandledIds; bool hasQmlBreakpoints = false; for (const GlobalBreakpoint &gbp : BreakpointManager::globalBreakpoints()) { @@ -597,16 +597,15 @@ void DebuggerRunTool::start() } } if (!unhandledIds.isEmpty()) { - QString warningMessage = - Tr::tr("Some breakpoints cannot be handled by the debugger " - "languages currently active, and will be ignored.

" - "Affected are breakpoints %1") - .arg(unhandledIds.join(", ")); + QString warningMessage = Tr::tr("Some breakpoints cannot be handled by the debugger " + "languages currently active, and will be ignored.

" + "Affected are breakpoints %1") + .arg(unhandledIds.join(", ")); if (hasQmlBreakpoints) { - warningMessage += "

" + - Tr::tr("QML debugging needs to be enabled both in the Build " - "and the Run settings."); + warningMessage += "

" + + Tr::tr("QML debugging needs to be enabled both in the Build " + "and the Run settings."); } showMessage(warningMessage, LogWarning); @@ -617,7 +616,8 @@ void DebuggerRunTool::start() Tr::tr("Debugger"), warningMessage, Tr::tr("&Show this message again."), - &checked, QDialogButtonBox::Ok); + &checked, + QDialogButtonBox::Ok); } }