Module type Core ==> Job, plus const correctness.

main
Teo Mrnjavac 11 years ago
parent 9c8d270ddb
commit 7894bb9462

@ -47,9 +47,9 @@ operator>>( const YAML::Node& node, Calamares::Module* m )
m->m_name = QString::fromStdString( node[ "name" ].as< std::string >() ); m->m_name = QString::fromStdString( node[ "name" ].as< std::string >() );
QString typeString = QString::fromStdString( node[ "type" ].as< std::string >() ); QString typeString = QString::fromStdString( node[ "type" ].as< std::string >() );
if ( typeString == "core" ) if ( typeString == "job" )
{ {
m->m_type = Calamares::Module::Core; m->m_type = Calamares::Module::Job;
} }
else if ( typeString == "view" ) else if ( typeString == "view" )
{ {
@ -127,28 +127,28 @@ Module::fromConfigFile( const QString& path )
} }
QString QString
Module::name() Module::name() const
{ {
return m_name; return m_name;
} }
QStringList QStringList
Module::requiredModules() Module::requiredModules() const
{ {
return m_requiredModules; return m_requiredModules;
} }
QString QString
Module::location() Module::location() const
{ {
return m_directory; return m_directory;
} }
bool bool
Module::isLoaded() Module::isLoaded() const
{ {
return m_loaded; return m_loaded;
} }

@ -44,7 +44,7 @@ class UIDLLEXPORT Module
public: public:
enum Type enum Type
{ {
Core, Job,
View View
}; };
@ -58,13 +58,13 @@ public:
static Module* fromConfigFile( const QString& path ); static Module* fromConfigFile( const QString& path );
virtual QString name(); virtual QString name() const;
virtual QStringList requiredModules(); virtual QStringList requiredModules() const;
virtual QString location(); virtual QString location() const;
virtual Type type() = 0; virtual Type type() const = 0;
virtual Interface interface() = 0; virtual Interface interface() const = 0;
virtual bool isLoaded(); virtual bool isLoaded() const;
virtual void loadSelf() = 0; virtual void loadSelf() = 0;

@ -31,14 +31,14 @@ namespace Calamares {
Module::Type Module::Type
ViewModule::type() ViewModule::type() const
{ {
return View; return View;
} }
Module::Interface Module::Interface
ViewModule::interface() ViewModule::interface() const
{ {
return QtPlugin; return QtPlugin;
} }

@ -29,8 +29,8 @@ namespace Calamares {
class UIDLLEXPORT ViewModule : public Module class UIDLLEXPORT ViewModule : public Module
{ {
public: public:
Type type() override; Type type() const override;
Interface interface() override; Interface interface() const override;
void loadSelf() override; void loadSelf() override;

Loading…
Cancel
Save