[libcalamaresui] Add 'emergency' concept to modules.

This commit is contained in:
Adriaan de Groot 2018-05-29 03:37:37 -04:00
parent cfcc753130
commit a04915e6fa

View File

@ -155,6 +155,17 @@ public:
*/
virtual void loadSelf() = 0;
/**
* @brief Is this an emergency module?
*
* An emergency module is run even if an error occurs
* which would terminate Calamares earlier in the same
* *exec* block. Emergency modules in later exec blocks
* are not run (in the common case where there is only
* one exec block, this doesn't really matter).
*/
bool isEmergency() const { return m_emergency; }
/**
* @brief jobs returns any jobs exposed by this module.
* @return a list of jobs (can be empty).
@ -176,11 +187,14 @@ protected:
private:
void loadConfigurationFile( const QString& configFileName ); //throws YAML::Exception
QString m_name;
QStringList m_requiredModules;
QString m_directory;
QString m_instanceId;
bool m_emergency;
friend void ::operator>>( const QVariantMap& moduleDescriptor,
Calamares::Module* m );
};