diff --git a/src/libcalamaresui/modulesystem/CppJobModule.cpp b/src/libcalamaresui/modulesystem/CppJobModule.cpp index 3a48e29f2..22d9a0524 100644 --- a/src/libcalamaresui/modulesystem/CppJobModule.cpp +++ b/src/libcalamaresui/modulesystem/CppJobModule.cpp @@ -33,14 +33,14 @@ namespace Calamares Module::Type CppJobModule::type() const { - return Job; + return Module::Type::Job; } Module::Interface CppJobModule::interface() const { - return QtPluginInterface; + return Module::Interface::QtPlugin; } diff --git a/src/libcalamaresui/modulesystem/Module.cpp b/src/libcalamaresui/modulesystem/Module.cpp index 133ee5438..d05245384 100644 --- a/src/libcalamaresui/modulesystem/Module.cpp +++ b/src/libcalamaresui/modulesystem/Module.cpp @@ -235,9 +235,9 @@ Module::typeString() const { switch ( type() ) { - case Job: + case Type::Job: return "Job Module"; - case View: + case Type::View: return "View Module"; } return QString(); @@ -249,13 +249,13 @@ Module::interfaceString() const { switch ( interface() ) { - case ProcessInterface: + case Interface::Process: return "External process"; - case PythonInterface: + case Interface::Python: return "Python (Boost.Python)"; - case PythonQtInterface: + case Interface::PythonQt: return "Python (experimental)"; - case QtPluginInterface: + case Interface::QtPlugin: return "Qt Plugin"; } return QString(); diff --git a/src/libcalamaresui/modulesystem/Module.h b/src/libcalamaresui/modulesystem/Module.h index 218270825..2a283807d 100644 --- a/src/libcalamaresui/modulesystem/Module.h +++ b/src/libcalamaresui/modulesystem/Module.h @@ -54,7 +54,7 @@ public: * A job module is a single Calamares job. * A view module has a UI (one or more view pages) and zero-to-many jobs. */ - enum Type + enum class Type { Job, View @@ -65,12 +65,12 @@ public: * talks to Calamares. * Not all Type-Interface associations are valid. */ - enum Interface + enum class Interface { - QtPluginInterface, - PythonInterface, - ProcessInterface, - PythonQtInterface + QtPlugin, // Jobs or Views + Python, // Jobs only + Process, // Deprecated interface + PythonQt // Views only, available as enum even if PythonQt isn't used }; /** diff --git a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp index 9037d85a6..85bdfa4de 100644 --- a/src/libcalamaresui/modulesystem/ProcessJobModule.cpp +++ b/src/libcalamaresui/modulesystem/ProcessJobModule.cpp @@ -29,14 +29,14 @@ namespace Calamares Module::Type ProcessJobModule::type() const { - return Job; + return Module::Type::Job; } Module::Interface ProcessJobModule::interface() const { - return ProcessInterface; + return Module::Interface::Process; } diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.cpp b/src/libcalamaresui/modulesystem/PythonJobModule.cpp index 7099a3f72..e910a4c80 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonJobModule.cpp @@ -30,14 +30,14 @@ namespace Calamares Module::Type PythonJobModule::type() const { - return Job; + return Module::Type::Job; } Module::Interface PythonJobModule::interface() const { - return PythonInterface; + return Module::Interface::Python; } diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index d6b0e7dab..2789dcfe3 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -34,14 +34,14 @@ namespace Calamares Module::Type ViewModule::type() const { - return View; + return Module::Type::View; } Module::Interface ViewModule::interface() const { - return QtPluginInterface; + return Module::Interface::QtPlugin; }