From e3bf9fc2204427b1a2060043d6919aa001f15326 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 21 Sep 2018 16:19:05 -0400 Subject: [PATCH] [partition] Fix build with KPMCore <= 3.3.0 - Reported by Philip Mueller --- src/modules/partition/gui/ChoicePage.cpp | 4 ++++ src/modules/partition/gui/PartitionPage.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 17f0a95ea..abe7795c0 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -48,7 +48,9 @@ #include #include +#ifdef WITH_KPMCOREGT33 #include +#endif #include #include @@ -1185,9 +1187,11 @@ ChoicePage::setupActions() bool atLeastOneIsMounted = false; // Suppress 'erase' if so bool isInactiveRAID = false; +#ifdef WITH_KPMCOREGT33 if ( currentDevice->type() == Device::Type::SoftwareRAID_Device && static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive ) isInactiveRAID = true; +#endif for ( auto it = PartitionIterator::begin( currentDevice ); it != PartitionIterator::end( currentDevice ); ++it ) diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index f23eecd6e..9d972c8fd 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -48,7 +48,9 @@ // KPMcore #include #include +#ifdef WITH_KPMCOREGT33 #include +#endif #include #include @@ -168,11 +170,14 @@ PartitionPage::updateButtons() { createTable = true; +#ifdef WITH_KPMCOREGT33 if ( device->type() == Device::Type::SoftwareRAID_Device && - static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive ) { + static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive ) + { createTable = false; create = false; } +#endif } else {