From 318ac763392edf37bd2e18b15efebc7274f222b5 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 15 May 2023 12:42:08 +0200 Subject: QMakeProject: Use PagedSettings page for options Also adapt to a few recent usage changes. Change-Id: I33f45fe7c2b8738280a7c81ddb9110cb8714c45a Reviewed-by: Christian Stenger --- src/plugins/qmakeprojectmanager/qmakesettings.h | 36 +++++++------------------ 1 file changed, 9 insertions(+), 27 deletions(-) (limited to 'src/plugins/qmakeprojectmanager/qmakesettings.h') diff --git a/src/plugins/qmakeprojectmanager/qmakesettings.h b/src/plugins/qmakeprojectmanager/qmakesettings.h index 242f6601e2d..de9a9ec0d37 100644 --- a/src/plugins/qmakeprojectmanager/qmakesettings.h +++ b/src/plugins/qmakeprojectmanager/qmakesettings.h @@ -5,38 +5,20 @@ #include -#include +namespace QmakeProjectManager::Internal { -namespace QmakeProjectManager { -namespace Internal { - -class QmakeSettings : public Utils::AspectContainer +class QmakeSettings : public Core::PagedSettings { - Q_OBJECT - public: - static QmakeSettings &instance(); - static bool warnAgainstUnalignedBuildDir(); - static bool alwaysRunQmake(); - static bool runSystemFunction(); - -signals: - void settingsChanged(); - -private: QmakeSettings(); - friend class SettingsWidget; - Utils::BoolAspect m_warnAgainstUnalignedBuildDir; - Utils::BoolAspect m_alwaysRunQmake; - Utils::BoolAspect m_ignoreSystemFunction; -}; + bool runSystemFunction() { return !ignoreSystemFunction(); } -class QmakeSettingsPage final : public Core::IOptionsPage -{ -public: - QmakeSettingsPage(); + Utils::BoolAspect warnAgainstUnalignedBuildDir; + Utils::BoolAspect alwaysRunQmake; + Utils::BoolAspect ignoreSystemFunction; }; -} // namespace Internal -} // namespace QmakeProjectManager +QmakeSettings &settings(); + +} // QmakeProjectManager::Internal -- cgit v1.2.3