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, "
|
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."));
|
"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.setSettingsKey(debugModeGroup, "ForceLoggingToConsole");
|
||||||
forceLoggingToConsole.setLabelText(Tr::tr("Force logging to console"));
|
forceLoggingToConsole.setLabelText(Tr::tr("Force logging to console"));
|
||||||
forceLoggingToConsole.setToolTip(
|
forceLoggingToConsole.setToolTip(
|
||||||
@@ -151,6 +159,7 @@ CommonSettings::CommonSettings()
|
|||||||
switchModeOnExit,
|
switchModeOnExit,
|
||||||
showQmlObjectTree,
|
showQmlObjectTree,
|
||||||
stationaryEditorWhileStepping,
|
stationaryEditorWhileStepping,
|
||||||
|
showUnsupportedBreakpointWarning,
|
||||||
forceLoggingToConsole,
|
forceLoggingToConsole,
|
||||||
registerForPostMortem,
|
registerForPostMortem,
|
||||||
st
|
st
|
||||||
|
@@ -60,6 +60,7 @@ public:
|
|||||||
Utils::BoolAspect showQmlObjectTree{this};
|
Utils::BoolAspect showQmlObjectTree{this};
|
||||||
Utils::BoolAspect stationaryEditorWhileStepping{this};
|
Utils::BoolAspect stationaryEditorWhileStepping{this};
|
||||||
Utils::BoolAspect forceLoggingToConsole{this};
|
Utils::BoolAspect forceLoggingToConsole{this};
|
||||||
|
Utils::BoolAspect showUnsupportedBreakpointWarning{this};
|
||||||
|
|
||||||
SourcePathMapAspect sourcePathMap{this};
|
SourcePathMapAspect sourcePathMap{this};
|
||||||
|
|
||||||
|
@@ -46,6 +46,7 @@ DebuggerSettings::DebuggerSettings() :
|
|||||||
showQmlObjectTree{commonSettings().showQmlObjectTree},
|
showQmlObjectTree{commonSettings().showQmlObjectTree},
|
||||||
stationaryEditorWhileStepping{commonSettings().stationaryEditorWhileStepping},
|
stationaryEditorWhileStepping{commonSettings().stationaryEditorWhileStepping},
|
||||||
forceLoggingToConsole{commonSettings().forceLoggingToConsole},
|
forceLoggingToConsole{commonSettings().forceLoggingToConsole},
|
||||||
|
showUnsupportedBreakpointWarning{commonSettings().showUnsupportedBreakpointWarning},
|
||||||
|
|
||||||
sourcePathMap{commonSettings().sourcePathMap},
|
sourcePathMap{commonSettings().sourcePathMap},
|
||||||
registerForPostMortem{*commonSettings().registerForPostMortem},
|
registerForPostMortem{*commonSettings().registerForPostMortem},
|
||||||
|
@@ -32,6 +32,7 @@ public:
|
|||||||
Utils::BoolAspect &showQmlObjectTree;
|
Utils::BoolAspect &showQmlObjectTree;
|
||||||
Utils::BoolAspect &stationaryEditorWhileStepping;
|
Utils::BoolAspect &stationaryEditorWhileStepping;
|
||||||
Utils::BoolAspect &forceLoggingToConsole;
|
Utils::BoolAspect &forceLoggingToConsole;
|
||||||
|
Utils::BoolAspect &showUnsupportedBreakpointWarning;
|
||||||
|
|
||||||
Utils::TypedAspect<QMap<QString, QString>> &sourcePathMap;
|
Utils::TypedAspect<QMap<QString, QString>> &sourcePathMap;
|
||||||
|
|
||||||
|
@@ -617,12 +617,20 @@ void DebuggerRunTool::start()
|
|||||||
|
|
||||||
showMessage(warningMessage, LogWarning);
|
showMessage(warningMessage, LogWarning);
|
||||||
|
|
||||||
static bool doNotShowAgain = false;
|
if (settings().showUnsupportedBreakpointWarning()) {
|
||||||
CheckableMessageBox::information(Core::ICore::dialogParent(),
|
bool doNotAskAgain = false;
|
||||||
Tr::tr("Debugger"),
|
CheckableDecider decider(&doNotAskAgain);
|
||||||
warningMessage,
|
CheckableMessageBox::information(
|
||||||
&doNotShowAgain,
|
Core::ICore::dialogParent(),
|
||||||
QMessageBox::Ok);
|
Tr::tr("Debugger"),
|
||||||
|
warningMessage,
|
||||||
|
decider,
|
||||||
|
QMessageBox::Ok);
|
||||||
|
if (doNotAskAgain) {
|
||||||
|
settings().showUnsupportedBreakpointWarning.setValue(false);
|
||||||
|
settings().showUnsupportedBreakpointWarning.writeSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user