forked from qt-creator/qt-creator
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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -583,7 +583,7 @@ void DebuggerRunTool::start()
|
|||||||
++d->engineStopsNeeded;
|
++d->engineStopsNeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_runParameters.startMode == StartInternal) {
|
if (m_runParameters.startMode != AttachToCore) {
|
||||||
QStringList unhandledIds;
|
QStringList unhandledIds;
|
||||||
bool hasQmlBreakpoints = false;
|
bool hasQmlBreakpoints = false;
|
||||||
for (const GlobalBreakpoint &gbp : BreakpointManager::globalBreakpoints()) {
|
for (const GlobalBreakpoint &gbp : BreakpointManager::globalBreakpoints()) {
|
||||||
@@ -597,15 +597,14 @@ void DebuggerRunTool::start()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!unhandledIds.isEmpty()) {
|
if (!unhandledIds.isEmpty()) {
|
||||||
QString warningMessage =
|
QString warningMessage = Tr::tr("Some breakpoints cannot be handled by the debugger "
|
||||||
Tr::tr("Some breakpoints cannot be handled by the debugger "
|
|
||||||
"languages currently active, and will be ignored.<p>"
|
"languages currently active, and will be ignored.<p>"
|
||||||
"Affected are breakpoints %1")
|
"Affected are breakpoints %1")
|
||||||
.arg(unhandledIds.join(", "));
|
.arg(unhandledIds.join(", "));
|
||||||
|
|
||||||
if (hasQmlBreakpoints) {
|
if (hasQmlBreakpoints) {
|
||||||
warningMessage += "<p>" +
|
warningMessage += "<p>"
|
||||||
Tr::tr("QML debugging needs to be enabled both in the Build "
|
+ Tr::tr("QML debugging needs to be enabled both in the Build "
|
||||||
"and the Run settings.");
|
"and the Run settings.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,7 +616,8 @@ void DebuggerRunTool::start()
|
|||||||
Tr::tr("Debugger"),
|
Tr::tr("Debugger"),
|
||||||
warningMessage,
|
warningMessage,
|
||||||
Tr::tr("&Show this message again."),
|
Tr::tr("&Show this message again."),
|
||||||
&checked, QDialogButtonBox::Ok);
|
&checked,
|
||||||
|
QDialogButtonBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user