diff options
author | hjk <[email protected]> | 2023-05-15 12:42:08 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2023-05-16 08:10:08 +0000 |
commit | 318ac763392edf37bd2e18b15efebc7274f222b5 (patch) | |
tree | 1a61eb7887afedd1799e07971a33a7c378875248 /src/plugins/qmakeprojectmanager/qmakesettings.h | |
parent | bc1144025631bd609cf3a16281e22962cb165cc7 (diff) |
QMakeProject: Use PagedSettings page for options
Also adapt to a few recent usage changes.
Change-Id: I33f45fe7c2b8738280a7c81ddb9110cb8714c45a
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/qmakesettings.h')
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakesettings.h | 36 |
1 files changed, 9 insertions, 27 deletions
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 <coreplugin/dialogs/ioptionspage.h> -#include <utils/aspects.h> +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 |