From 7894bb946221fb4d4062a1d7641cacc9518b8bbe Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 10 Jul 2014 12:27:53 +0200 Subject: [PATCH] Module type Core ==> Job, plus const correctness. --- src/libcalamaresui/modulesystem/Module.cpp | 12 ++++++------ src/libcalamaresui/modulesystem/Module.h | 14 +++++++------- src/libcalamaresui/modulesystem/ViewModule.cpp | 4 ++-- src/libcalamaresui/modulesystem/ViewModule.h | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp index 7fa64661e..47c8f05ff 100644 --- a/src/libcalamaresui/modulesystem/Module.cpp +++ b/src/libcalamaresui/modulesystem/Module.cpp @@ -47,9 +47,9 @@ operator>>( const YAML::Node& node, Calamares::Module* m ) m->m_name = QString::fromStdString( node[ "name" ].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" ) { @@ -127,28 +127,28 @@ Module::fromConfigFile( const QString& path ) } QString -Module::name() +Module::name() const { return m_name; } QStringList -Module::requiredModules() +Module::requiredModules() const { return m_requiredModules; } QString -Module::location() +Module::location() const { return m_directory; } bool -Module::isLoaded() +Module::isLoaded() const { return m_loaded; } diff --git a/src/libcalamaresui/modulesystem/Module.h b/src/libcalamaresui/modulesystem/Module.h index 5ce2364ea..8d53558a5 100644 --- a/src/libcalamaresui/modulesystem/Module.h +++ b/src/libcalamaresui/modulesystem/Module.h @@ -44,7 +44,7 @@ class UIDLLEXPORT Module public: enum Type { - Core, + Job, View }; @@ -58,13 +58,13 @@ public: static Module* fromConfigFile( const QString& path ); - virtual QString name(); - virtual QStringList requiredModules(); - virtual QString location(); - virtual Type type() = 0; - virtual Interface interface() = 0; + virtual QString name() const; + virtual QStringList requiredModules() const; + virtual QString location() const; + virtual Type type() const = 0; + virtual Interface interface() const = 0; - virtual bool isLoaded(); + virtual bool isLoaded() const; virtual void loadSelf() = 0; diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index 2f6ee82ed..0e7e50b54 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -31,14 +31,14 @@ namespace Calamares { Module::Type -ViewModule::type() +ViewModule::type() const { return View; } Module::Interface -ViewModule::interface() +ViewModule::interface() const { return QtPlugin; } diff --git a/src/libcalamaresui/modulesystem/ViewModule.h b/src/libcalamaresui/modulesystem/ViewModule.h index fd1257f2d..886861c44 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.h +++ b/src/libcalamaresui/modulesystem/ViewModule.h @@ -29,8 +29,8 @@ namespace Calamares { class UIDLLEXPORT ViewModule : public Module { public: - Type type() override; - Interface interface() override; + Type type() const override; + Interface interface() const override; void loadSelf() override;