diff --git a/src/libcalamares/Settings.h b/src/libcalamares/Settings.h index 79ed37ef8..66a03e3a0 100644 --- a/src/libcalamares/Settings.h +++ b/src/libcalamares/Settings.h @@ -23,7 +23,7 @@ #define SETTINGS_H #include "DllMacro.h" -#include "Typedefs.h" +#include "modulesystem/Actions.h" #include #include @@ -41,7 +41,6 @@ public: QObject* parent = nullptr ); static Settings* instance(); - //TODO: load from YAML then emit ready QStringList modulesSearchPaths() const; diff --git a/src/libcalamares/Typedefs.h b/src/libcalamares/Typedefs.h index 324f2b155..6d61b6995 100644 --- a/src/libcalamares/Typedefs.h +++ b/src/libcalamares/Typedefs.h @@ -29,12 +29,6 @@ class Job; typedef QSharedPointer< Job > job_ptr; using JobList = QList< job_ptr >; -enum ModuleAction : char -{ - Show, - Exec -}; - class ViewStep; typedef QList< ViewStep* > ViewStepList; diff --git a/src/libcalamares/modulesystem/Actions.h b/src/libcalamares/modulesystem/Actions.h new file mode 100644 index 000000000..069937235 --- /dev/null +++ b/src/libcalamares/modulesystem/Actions.h @@ -0,0 +1,34 @@ +/* === This file is part of Calamares - === + * + * Copyright 2014, Teo Mrnjavac + * Copyright 2019, Adriaan de Groot + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#ifndef MODULESYSTEM_ACTIONS_H +#define MODULESYSTEM_ACTIONS_H + +namespace Calamares +{ + +enum class ModuleAction : char +{ + Show, + Exec +}; + +} // namespace + +#endif diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index 32fe09033..852f41445 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -277,7 +277,7 @@ ModuleManager::loadModules() // At this point we most certainly have a pointer to a loaded module in // thisModule. We now need to enqueue jobs info into an EVS. - if ( currentAction == Calamares::Exec ) + if ( currentAction == ModuleAction::Exec ) { ExecutionViewStep* evs = qobject_cast< ExecutionViewStep* >(