[libcalamares] Namespace consistently

- Things in libcalamares/ subdirectories are namespaced
   according to that subdirectory (sometimes in namespace
   Calamares, sometimes CalamaresUtils). Do that in modulesystem/ too.
main
Adriaan de Groot 5 years ago
parent 78de6776af
commit 666462651b

@ -169,14 +169,14 @@ interpretSequence( const YAML::Node& node, Settings::ModuleSequence& moduleSeque
continue; continue;
} }
QString thisActionS = sequenceVListItem.toMap().firstKey(); QString thisActionS = sequenceVListItem.toMap().firstKey();
ModuleAction thisAction; ModuleSystem::Action thisAction;
if ( thisActionS == "show" ) if ( thisActionS == "show" )
{ {
thisAction = ModuleAction::Show; thisAction = ModuleSystem::Action::Show;
} }
else if ( thisActionS == "exec" ) else if ( thisActionS == "exec" )
{ {
thisAction = ModuleAction::Exec; thisAction = ModuleSystem::Action::Exec;
} }
else else
{ {

@ -46,7 +46,7 @@ public:
using InstanceDescriptionList = QList< InstanceDescription >; using InstanceDescriptionList = QList< InstanceDescription >;
InstanceDescriptionList customModuleInstances() const; InstanceDescriptionList customModuleInstances() const;
using ModuleSequence = QList< QPair< ModuleAction, QStringList > >; using ModuleSequence = QList< QPair< ModuleSystem::Action, QStringList > >;
ModuleSequence modulesSequence() const; ModuleSequence modulesSequence() const;
QString brandingComponentName() const; QString brandingComponentName() const;

@ -22,13 +22,16 @@
namespace Calamares namespace Calamares
{ {
namespace ModuleSystem
{
enum class ModuleAction : char enum class Action : char
{ {
Show, Show,
Exec Exec
}; };
} // namespace ModuleSystem
} // namespace Calamares } // namespace Calamares
#endif #endif

@ -190,7 +190,7 @@ ModuleManager::loadModules()
= failedModules.isEmpty() ? Settings::instance()->modulesSequence() : Settings::ModuleSequence(); = failedModules.isEmpty() ? Settings::instance()->modulesSequence() : Settings::ModuleSequence();
for ( const auto& modulePhase : modulesSequence ) for ( const auto& modulePhase : modulesSequence )
{ {
ModuleAction currentAction = modulePhase.first; ModuleSystem::Action currentAction = modulePhase.first;
foreach ( const QString& moduleEntry, modulePhase.second ) foreach ( const QString& moduleEntry, modulePhase.second )
{ {
@ -285,7 +285,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 == ModuleAction::Exec ) if ( currentAction == ModuleSystem::Action::Exec )
{ {
ExecutionViewStep* evs ExecutionViewStep* evs
= qobject_cast< ExecutionViewStep* >( Calamares::ViewManager::instance()->viewSteps().last() ); = qobject_cast< ExecutionViewStep* >( Calamares::ViewManager::instance()->viewSteps().last() );

Loading…
Cancel
Save