[libcalamares] Move module-related things into subdirectory

- Currently just moves a single enum, but this is prep-work for
   moving the non-GUI parts of the module system into libcalamares,
   to better support GUI-less operation.
This commit is contained in:
Adriaan de Groot 2019-05-07 07:09:10 -04:00
parent 761205ecf7
commit cdb613bf02
4 changed files with 36 additions and 9 deletions

View File

@ -23,7 +23,7 @@
#define SETTINGS_H #define SETTINGS_H
#include "DllMacro.h" #include "DllMacro.h"
#include "Typedefs.h" #include "modulesystem/Actions.h"
#include <QObject> #include <QObject>
#include <QStringList> #include <QStringList>
@ -41,7 +41,6 @@ public:
QObject* parent = nullptr ); QObject* parent = nullptr );
static Settings* instance(); static Settings* instance();
//TODO: load from YAML then emit ready
QStringList modulesSearchPaths() const; QStringList modulesSearchPaths() const;

View File

@ -29,12 +29,6 @@ class Job;
typedef QSharedPointer< Job > job_ptr; typedef QSharedPointer< Job > job_ptr;
using JobList = QList< job_ptr >; using JobList = QList< job_ptr >;
enum ModuleAction : char
{
Show,
Exec
};
class ViewStep; class ViewStep;
typedef QList< ViewStep* > ViewStepList; typedef QList< ViewStep* > ViewStepList;

View File

@ -0,0 +1,34 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2019, Adriaan de Groot <groot@kde.org>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef MODULESYSTEM_ACTIONS_H
#define MODULESYSTEM_ACTIONS_H
namespace Calamares
{
enum class ModuleAction : char
{
Show,
Exec
};
} // namespace
#endif

View File

@ -277,7 +277,7 @@ ModuleManager::loadModules()
// At this point we most certainly have a pointer to a loaded module in // 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. // thisModule. We now need to enqueue jobs info into an EVS.
if ( currentAction == Calamares::Exec ) if ( currentAction == ModuleAction::Exec )
{ {
ExecutionViewStep* evs = ExecutionViewStep* evs =
qobject_cast< ExecutionViewStep* >( qobject_cast< ExecutionViewStep* >(