diff --git a/src/libcalamares/Settings.cpp b/src/libcalamares/Settings.cpp index 456956430..668868812 100644 --- a/src/libcalamares/Settings.cpp +++ b/src/libcalamares/Settings.cpp @@ -265,37 +265,4 @@ Settings::brandingComponentName() const return m_brandingComponentName; } - -bool -Settings::showPromptBeforeExecution() const -{ - return m_promptInstall; -} - - -bool -Settings::debugMode() const -{ - return m_debug; -} - -bool -Settings::doChroot() const -{ - return m_doChroot; -} - -bool -Settings::disableCancel() const -{ - return m_disableCancel; -} - -bool -Settings::disableCancelDuringExec() const -{ - return m_disableCancelDuringExec; -} - - } // namespace Calamares diff --git a/src/libcalamares/Settings.h b/src/libcalamares/Settings.h index 4c2f2ed9d..bd980caaa 100644 --- a/src/libcalamares/Settings.h +++ b/src/libcalamares/Settings.h @@ -51,11 +51,31 @@ public: QString brandingComponentName() const; - bool showPromptBeforeExecution() const; - - bool debugMode() const; + /** @brief Is this a debugging run? + * + * Returns true if Calamares is in debug mode. In debug mode, + * modules and settings are loaded from more locations, to help + * development and debugging. + */ + bool debugMode() const { return m_debug; } + + /** @brief Distinguish "install" from "OEM" modes. + * + * Returns true in "install" mode, which is where actions happen + * in a chroot -- the target system, which exists separately from + * the source system. In "OEM" mode, returns false and most actions + * apply to the *current* (host) system. + */ + bool doChroot() const { return m_doChroot; } - bool doChroot() const; + /** @brief Global setting of prompt-before-install. + * + * Returns true when the configuration is such that the user + * should be prompted one-last-time before any action is taken + * that really affects the machine. + */ + bool showPromptBeforeExecution() const { return m_promptInstall; } + /** @brief Distinguish between "install" and "setup" modes. * * This influences user-visible strings, for instance using the @@ -64,9 +84,9 @@ public: bool isSetupMode() const { return m_isSetupMode; } /** @brief Global setting of disable-cancel: can't cancel ever. */ - bool disableCancel() const; + bool disableCancel() const { return m_disableCancel; } /** @brief Temporary setting of disable-cancel: can't cancel during exec. */ - bool disableCancelDuringExec() const; + bool disableCancelDuringExec() const { return m_disableCancelDuringExec; } private: static Settings* s_instance;