diff --git a/src/libcalamares/partition/FileSystem.h b/src/libcalamares/partition/FileSystem.h index 6696f0df9..0f16c2979 100644 --- a/src/libcalamares/partition/FileSystem.h +++ b/src/libcalamares/partition/FileSystem.h @@ -19,6 +19,7 @@ #define PARTITION_FILESYSTEM_H #include "DllMacro.h" +#include "partition/Global.h" #include @@ -70,6 +71,28 @@ userVisibleFS( FileSystem* fs ) return fs ? userVisibleFS( *fs ) : QString(); } +/** @brief Mark a particular filesystem type as used (or not) + * + * See useFilesystemGS(const QString&, bool); this method uses the filesystem type + * enumeration to pick the name. (The other implementation is in `Global.h` + * because it touches Global Storage, but this one needs KPMcore) + */ +inline void +useFilesystemGS( FileSystem::Type filesystem, bool used ) +{ + useFilesystemGS( untranslatedFS( filesystem ), used ); +} + +/* @brief Reads from global storage whether the typesystem type is used + * + * See isFilesystemUsedGS(const QString&). (The other implementation is in `Global.h` + * because it touches Global Storage, but this one needs KPMcore) + */ +inline bool +isFilesystemUsedGS( FileSystem::Type filesystem ) +{ + return isFilesystemUsedGS( untranslatedFS( filesystem ) ); +} } // namespace Partition } // namespace CalamaresUtils diff --git a/src/libcalamares/partition/Global.h b/src/libcalamares/partition/Global.h index 64c221240..efdec5bd0 100644 --- a/src/libcalamares/partition/Global.h +++ b/src/libcalamares/partition/Global.h @@ -10,20 +10,15 @@ /* * This is the API for manipulating Global Storage keys related to - * filesystems and partitions. + * filesystems and partitions. This does **not** depend on KPMcore. */ #ifndef PARTITION_GLOBAL_H #define PARTITION_GLOBAL_H #include "DllMacro.h" -#include "FileSystem.h" #include "JobQueue.h" -// TODO: this assumes KPMcore is present, but the header and TU -// are used always. -#include - namespace CalamaresUtils { namespace Partition @@ -77,27 +72,6 @@ isFilesystemUsedGS( const QString& filesystemType ) return isFilesystemUsedGS( Calamares::JobQueue::instanceGlobalStorage(), filesystemType ); } -/** @brief Mark a particular filesystem type as used (or not) - * - * See useFilesystemGS(const QString&, bool); this method uses the filesystem type - * enumeration to pick the name. - */ -inline void -useFilesystemGS( FileSystem::Type filesystem, bool used ) -{ - useFilesystemGS( untranslatedFS( filesystem ), used ); -} - -/* @brief Reads from global storage whether the typesystem type is used - * - * See isFilesystemUsedGS(const QString&). - */ -inline bool -isFilesystemUsedGS( FileSystem::Type filesystem ) -{ - return isFilesystemUsedGS( untranslatedFS( filesystem ) ); -} - } // namespace Partition } // namespace CalamaresUtils