forked from qt-creator/qt-creator
Debugger: Add an option to not show the unsupported bp warning
Done-by: Elias Steurer Task-number: QTCREATORBUG-31455 Change-Id: I9736a2a0a1b4c3a38516b3397068d2ba2b3f455d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -45,6 +45,14 @@ CommonSettings::CommonSettings()
|
||||
Tr::tr("Scrolls the editor only when it is necessary to keep the current line in view, "
|
||||
"instead of keeping the next statement centered at all times."));
|
||||
|
||||
showUnsupportedBreakpointWarning.setSettingsKey(debugModeGroup, "ShowUnsupportedBreakpointWarning");
|
||||
showUnsupportedBreakpointWarning.setDefaultValue(true);
|
||||
showUnsupportedBreakpointWarning.setLabelText(
|
||||
Tr::tr("Show warnings for unsupported breakpoints"));
|
||||
showUnsupportedBreakpointWarning.setToolTip(
|
||||
Tr::tr("Shows a warning on debugger start-up when breakpoints are requested "
|
||||
"which are not supported by the selected debugger engine."));
|
||||
|
||||
forceLoggingToConsole.setSettingsKey(debugModeGroup, "ForceLoggingToConsole");
|
||||
forceLoggingToConsole.setLabelText(Tr::tr("Force logging to console"));
|
||||
forceLoggingToConsole.setToolTip(
|
||||
@@ -151,6 +159,7 @@ CommonSettings::CommonSettings()
|
||||
switchModeOnExit,
|
||||
showQmlObjectTree,
|
||||
stationaryEditorWhileStepping,
|
||||
showUnsupportedBreakpointWarning,
|
||||
forceLoggingToConsole,
|
||||
registerForPostMortem,
|
||||
st
|
||||
|
@@ -60,6 +60,7 @@ public:
|
||||
Utils::BoolAspect showQmlObjectTree{this};
|
||||
Utils::BoolAspect stationaryEditorWhileStepping{this};
|
||||
Utils::BoolAspect forceLoggingToConsole{this};
|
||||
Utils::BoolAspect showUnsupportedBreakpointWarning{this};
|
||||
|
||||
SourcePathMapAspect sourcePathMap{this};
|
||||
|
||||
|
@@ -46,6 +46,7 @@ DebuggerSettings::DebuggerSettings() :
|
||||
showQmlObjectTree{commonSettings().showQmlObjectTree},
|
||||
stationaryEditorWhileStepping{commonSettings().stationaryEditorWhileStepping},
|
||||
forceLoggingToConsole{commonSettings().forceLoggingToConsole},
|
||||
showUnsupportedBreakpointWarning{commonSettings().showUnsupportedBreakpointWarning},
|
||||
|
||||
sourcePathMap{commonSettings().sourcePathMap},
|
||||
registerForPostMortem{*commonSettings().registerForPostMortem},
|
||||
|
@@ -32,6 +32,7 @@ public:
|
||||
Utils::BoolAspect &showQmlObjectTree;
|
||||
Utils::BoolAspect &stationaryEditorWhileStepping;
|
||||
Utils::BoolAspect &forceLoggingToConsole;
|
||||
Utils::BoolAspect &showUnsupportedBreakpointWarning;
|
||||
|
||||
Utils::TypedAspect<QMap<QString, QString>> &sourcePathMap;
|
||||
|
||||
|
@@ -617,12 +617,20 @@ void DebuggerRunTool::start()
|
||||
|
||||
showMessage(warningMessage, LogWarning);
|
||||
|
||||
static bool doNotShowAgain = false;
|
||||
CheckableMessageBox::information(Core::ICore::dialogParent(),
|
||||
Tr::tr("Debugger"),
|
||||
warningMessage,
|
||||
&doNotShowAgain,
|
||||
QMessageBox::Ok);
|
||||
if (settings().showUnsupportedBreakpointWarning()) {
|
||||
bool doNotAskAgain = false;
|
||||
CheckableDecider decider(&doNotAskAgain);
|
||||
CheckableMessageBox::information(
|
||||
Core::ICore::dialogParent(),
|
||||
Tr::tr("Debugger"),
|
||||
warningMessage,
|
||||
decider,
|
||||
QMessageBox::Ok);
|
||||
if (doNotAskAgain) {
|
||||
settings().showUnsupportedBreakpointWarning.setValue(false);
|
||||
settings().showUnsupportedBreakpointWarning.writeSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user