diff --git a/src/modules/partition/core/Config.cpp b/src/modules/partition/core/Config.cpp index a603cedd0..47951321e 100644 --- a/src/modules/partition/core/Config.cpp +++ b/src/modules/partition/core/Config.cpp @@ -208,9 +208,10 @@ Config::setSwapChoice( Config::SwapChoice c ) } void -Config::setEraseFsTypeChoice(const QString& choice) +Config::setEraseFsTypeChoice( const QString& choice ) { - if(choice != m_eraseFsTypeChoice){ + if ( choice != m_eraseFsTypeChoice ) + { m_eraseFsTypeChoice = choice; } } @@ -249,14 +250,18 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) gs->insert( "allowManualPartitioning", CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ) ); - if ( configurationMap.contains( "availableFileSystemTypes" ) ) { - if(configurationMap.value( "availableFileSystemTypes" ).type() == QVariant::List ){ + if ( configurationMap.contains( "availableFileSystemTypes" ) ) + { + if ( configurationMap.value( "availableFileSystemTypes" ).type() == QVariant::List ) + { m_eraseFsTypes.clear(); - m_eraseFsTypes.append(configurationMap.value( "availableFileSystemTypes" ).toStringList()); - m_eraseFsTypeChoice = m_eraseFsTypes[0]; - } else if ( configurationMap.value( "availableFileSystemTypes" ).type() == QVariant::String ){ - m_eraseFsTypes.append(configurationMap.value( "availableFileSystemTypes" ).toString()); - m_eraseFsTypeChoice = m_eraseFsTypes[0]; + m_eraseFsTypes.append( configurationMap.value( "availableFileSystemTypes" ).toStringList() ); + m_eraseFsTypeChoice = m_eraseFsTypes[ 0 ]; + } + else if ( configurationMap.value( "availableFileSystemTypes" ).type() == QVariant::String ) + { + m_eraseFsTypes.append( configurationMap.value( "availableFileSystemTypes" ).toString() ); + m_eraseFsTypeChoice = m_eraseFsTypes[ 0 ]; } } diff --git a/src/modules/partition/core/Config.h b/src/modules/partition/core/Config.h index 5cdd14c9d..a4f5e68f6 100644 --- a/src/modules/partition/core/Config.h +++ b/src/modules/partition/core/Config.h @@ -96,9 +96,9 @@ public: */ SwapChoice swapChoice() const { return m_swapChoice; } - EraseFsTypesSet eraseFsTypes() const {return m_eraseFsTypes; } + EraseFsTypesSet eraseFsTypes() const { return m_eraseFsTypes; } - QString eraseFsType() const {return m_eraseFsTypeChoice; } + QString eraseFsType() const { return m_eraseFsTypeChoice; } ///@brief Is manual partitioning allowed (not explicitly disnabled in the config file)? diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index d58b22868..6b770a982 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -10,8 +10,8 @@ #include "DeviceList.h" -#include "utils/Logger.h" #include "partition/PartitionIterator.h" +#include "utils/Logger.h" #include #include @@ -133,11 +133,11 @@ getDevices( DeviceType which ) #endif // Unsafe partitioning - auto removeInAllModes = []( DeviceList& l, DeviceList::iterator& it) { return erase(l, it); }; - auto removeInSafeMode = []( DeviceList&, DeviceList::iterator& it) { return ++it; }; + auto removeInAllModes = []( DeviceList& l, DeviceList::iterator& it ) { return erase( l, it ); }; + auto removeInSafeMode = []( DeviceList&, DeviceList::iterator& it ) { return ++it; }; #else // Safe partitioning - auto removeInAllModes = []( DeviceList& l, DeviceList::iterator& it) { return erase(l, it); }; + auto removeInAllModes = []( DeviceList& l, DeviceList::iterator& it ) { return erase( l, it ); }; auto& removeInSafeMode = removeInAllModes; #endif diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 8d048b297..8bff2c95f 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -177,7 +177,8 @@ canBeResized( Partition* candidate, const Logger::Once& o ) if ( availableStorageB > advisedStorageB ) { - cDebug() << o << "Partition" << convenienceName( candidate ) << "authorized for resize + autopartition install."; + cDebug() << o << "Partition" << convenienceName( candidate ) + << "authorized for resize + autopartition install."; return true; } else @@ -412,8 +413,14 @@ runOsprober( DeviceModel* dm ) FstabEntryList fstabEntries = lookForFstabEntries( path ); QString homePath = findPartitionPathForMountPoint( fstabEntries, "/home" ); - osproberEntries.append( - { prettyName, path, file, QString(), canBeResized( dm, path, o ), lineColumns, fstabEntries, homePath } ); + osproberEntries.append( { prettyName, + path, + file, + QString(), + canBeResized( dm, path, o ), + lineColumns, + fstabEntries, + homePath } ); osproberCleanLines.append( line ); } } diff --git a/src/modules/partition/core/PartUtils.h b/src/modules/partition/core/PartUtils.h index 89d2c5e1a..5e84e379b 100644 --- a/src/modules/partition/core/PartUtils.h +++ b/src/modules/partition/core/PartUtils.h @@ -26,7 +26,7 @@ class DeviceModel; class Partition; namespace Logger { - class Once; +class Once; } namespace PartUtils diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index c8b17b1cb..363d9daef 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -258,7 +258,7 @@ PartitionCoreModule::doInit() cDebug() << Logger::SubEntry << "node\tcapacity\tname\tprettyName"; for ( auto device : devices ) { - cDebug() << Logger::SubEntry << Logger::Pointer(device); + cDebug() << Logger::SubEntry << Logger::Pointer( device ); if ( device ) { // Gives ownership of the Device* to the DeviceInfo object @@ -390,7 +390,6 @@ PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::Table OperationHelper helper( partitionModelForDevice( device ), this ); deviceInfo->makeJob< CreatePartitionTableJob >( type ); - } }