Add isModuleEnabled function
This commit is contained in:
parent
132bca649e
commit
e22efab1b3
@ -269,6 +269,19 @@ Settings::Settings( const QString& settingsFilePath, bool debugMode )
|
|||||||
s_instance = this;
|
s_instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Settings::isModuleEnabled( QString module )
|
||||||
|
{
|
||||||
|
// Iterate over the list of modules searching for a match
|
||||||
|
for ( const auto& moduleInstance : Calamares::Settings::instance()->moduleInstances() )
|
||||||
|
{
|
||||||
|
if ( moduleInstance.key().first == module )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Settings::reconcileInstancesAndSequence()
|
Settings::reconcileInstancesAndSequence()
|
||||||
{
|
{
|
||||||
|
@ -152,8 +152,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool isSetupMode() const { return m_isSetupMode; }
|
bool isSetupMode() const { return m_isSetupMode; }
|
||||||
|
|
||||||
|
/** @brief Returns true if the named module is enabled */
|
||||||
|
bool isModuleEnabled( QString module );
|
||||||
|
|
||||||
/** @brief Global setting of disable-cancel: can't cancel ever. */
|
/** @brief Global setting of disable-cancel: can't cancel ever. */
|
||||||
bool disableCancel() const { return m_disableCancel; }
|
bool disableCancel() const { return m_disableCancel; }
|
||||||
|
|
||||||
/** @brief Temporary setting of disable-cancel: can't cancel during exec. */
|
/** @brief Temporary setting of disable-cancel: can't cancel during exec. */
|
||||||
bool disableCancelDuringExec() const { return m_disableCancelDuringExec; }
|
bool disableCancelDuringExec() const { return m_disableCancelDuringExec; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user