diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index dc3b0b572..d4301578b 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -29,10 +29,10 @@ #include +using namespace CalamaresUtils::Units; + namespace PartitionActions { -using CalamaresUtils::operator""_GiB; -using CalamaresUtils::operator""_MiB; qint64 swapSuggestion( const qint64 availableSpaceB, Config::SwapChoice swap ) diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index 7e861d994..5803d59a2 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -27,7 +27,7 @@ #include #include -using CalamaresUtils::operator""_MiB; +using namespace CalamaresUtils::Units; static const int LAYOUT_MARGIN = 4; static const int LABEL_PARTITION_SQUARE_MARGIN = qMax( QFontMetrics( CalamaresUtils::defaultFont() ).ascent() - 2, 18 ); diff --git a/src/modules/partition/tests/CreateLayoutsTests.cpp b/src/modules/partition/tests/CreateLayoutsTests.cpp index 216bfc209..68b839e08 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.cpp +++ b/src/modules/partition/tests/CreateLayoutsTests.cpp @@ -19,6 +19,8 @@ #include +using namespace CalamaresUtils::Units; + class PartitionTable; class SmartStatus; @@ -27,9 +29,6 @@ QTEST_GUILESS_MAIN( CreateLayoutsTests ) static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; static Calamares::JobQueue* jobqueue = nullptr; -using CalamaresUtils::operator""_MiB; -using CalamaresUtils::operator""_GiB; - #define LOGICAL_SIZE 512 CreateLayoutsTests::CreateLayoutsTests() diff --git a/src/modules/partition/tests/PartitionJobTests.cpp b/src/modules/partition/tests/PartitionJobTests.cpp index 204819fef..57dc2579c 100644 --- a/src/modules/partition/tests/PartitionJobTests.cpp +++ b/src/modules/partition/tests/PartitionJobTests.cpp @@ -28,8 +28,7 @@ QTEST_GUILESS_MAIN( PartitionJobTests ) using namespace Calamares; -using CalamaresUtils::operator""_MiB; -using CalamaresUtils::Partition::isPartitionFreeSpace; +using namespace CalamaresUtils::Units; class PartitionMounter { @@ -104,7 +103,7 @@ static Partition* firstFreePartition( PartitionNode* parent ) { for ( auto child : parent->children() ) - if ( isPartitionFreeSpace( child ) ) + if ( CalamaresUtils::Partition::isPartitionFreeSpace( child ) ) { return child; }