From fa9601990ba770677a2ea769ecd64fa5c8b4e35b Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 21 Jul 2023 12:37:43 +0200 Subject: [PATCH] Debugger: Register common aspects Change-Id: Iaa43758bdf0e5060830213ae744a2d0baedf6c15 Reviewed-by: Christian Stenger --- src/plugins/debugger/commonoptionspage.h | 32 +++++++++---------- .../debuggersourcepathmappingwidget.cpp | 4 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/plugins/debugger/commonoptionspage.h b/src/plugins/debugger/commonoptionspage.h index f5624191bfb..d60658710a4 100644 --- a/src/plugins/debugger/commonoptionspage.h +++ b/src/plugins/debugger/commonoptionspage.h @@ -19,7 +19,7 @@ using SourcePathMap = QMap; class SourcePathMapAspect : public Utils::TypedAspect { public: - SourcePathMapAspect(); + explicit SourcePathMapAspect(Utils::AspectContainer *container); ~SourcePathMapAspect() override; void fromMap(const QVariantMap &map) override; @@ -43,23 +43,23 @@ public: CommonSettings(); ~CommonSettings(); - Utils::BoolAspect useAlternatingRowColors; - Utils::BoolAspect useAnnotationsInMainEditor; - Utils::BoolAspect useToolTipsInMainEditor; - Utils::BoolAspect closeSourceBuffersOnExit; - Utils::BoolAspect closeMemoryBuffersOnExit; - Utils::BoolAspect raiseOnInterrupt; - Utils::BoolAspect breakpointsFullPathByDefault; - Utils::BoolAspect warnOnReleaseBuilds; - Utils::IntegerAspect maximalStackDepth; + Utils::BoolAspect useAlternatingRowColors{this}; + Utils::BoolAspect useAnnotationsInMainEditor{this}; + Utils::BoolAspect useToolTipsInMainEditor{this}; + Utils::BoolAspect closeSourceBuffersOnExit{this}; + Utils::BoolAspect closeMemoryBuffersOnExit{this}; + Utils::BoolAspect raiseOnInterrupt{this}; + Utils::BoolAspect breakpointsFullPathByDefault{this}; + Utils::BoolAspect warnOnReleaseBuilds{this}; + Utils::IntegerAspect maximalStackDepth{this}; - Utils::BoolAspect fontSizeFollowsEditor; - Utils::BoolAspect switchModeOnExit; - Utils::BoolAspect showQmlObjectTree; - Utils::BoolAspect stationaryEditorWhileStepping; - Utils::BoolAspect forceLoggingToConsole; + Utils::BoolAspect fontSizeFollowsEditor{this}; + Utils::BoolAspect switchModeOnExit{this}; + Utils::BoolAspect showQmlObjectTree{this}; + Utils::BoolAspect stationaryEditorWhileStepping{this}; + Utils::BoolAspect forceLoggingToConsole{this}; - SourcePathMapAspect sourcePathMap; + SourcePathMapAspect sourcePathMap{this}; Utils::BoolAspect *registerForPostMortem = nullptr; }; diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp index 8e4d2bef147..244264bf793 100644 --- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp +++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp @@ -442,8 +442,8 @@ public: }; -SourcePathMapAspect::SourcePathMapAspect() - : d(new SourcePathMapAspectPrivate) +SourcePathMapAspect::SourcePathMapAspect(AspectContainer *container) + : TypedAspect(container), d(new SourcePathMapAspectPrivate) { }