[partition] Fix build with KPMCore <= 3.3.0
- Reported by Philip Mueller
This commit is contained in:
parent
3f09857cb7
commit
e3bf9fc220
@ -48,7 +48,9 @@
|
|||||||
|
|
||||||
#include <kpmcore/core/device.h>
|
#include <kpmcore/core/device.h>
|
||||||
#include <kpmcore/core/partition.h>
|
#include <kpmcore/core/partition.h>
|
||||||
|
#ifdef WITH_KPMCOREGT33
|
||||||
#include <kpmcore/core/softwareraid.h>
|
#include <kpmcore/core/softwareraid.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
@ -1185,9 +1187,11 @@ ChoicePage::setupActions()
|
|||||||
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
||||||
bool isInactiveRAID = false;
|
bool isInactiveRAID = false;
|
||||||
|
|
||||||
|
#ifdef WITH_KPMCOREGT33
|
||||||
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
||||||
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
||||||
isInactiveRAID = true;
|
isInactiveRAID = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( auto it = PartitionIterator::begin( currentDevice );
|
for ( auto it = PartitionIterator::begin( currentDevice );
|
||||||
it != PartitionIterator::end( currentDevice ); ++it )
|
it != PartitionIterator::end( currentDevice ); ++it )
|
||||||
|
@ -48,7 +48,9 @@
|
|||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/device.h>
|
#include <kpmcore/core/device.h>
|
||||||
#include <kpmcore/core/partition.h>
|
#include <kpmcore/core/partition.h>
|
||||||
|
#ifdef WITH_KPMCOREGT33
|
||||||
#include <kpmcore/core/softwareraid.h>
|
#include <kpmcore/core/softwareraid.h>
|
||||||
|
#endif
|
||||||
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
||||||
#include <kpmcore/ops/removevolumegroupoperation.h>
|
#include <kpmcore/ops/removevolumegroupoperation.h>
|
||||||
|
|
||||||
@ -168,11 +170,14 @@ PartitionPage::updateButtons()
|
|||||||
{
|
{
|
||||||
createTable = true;
|
createTable = true;
|
||||||
|
|
||||||
|
#ifdef WITH_KPMCOREGT33
|
||||||
if ( device->type() == Device::Type::SoftwareRAID_Device &&
|
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;
|
createTable = false;
|
||||||
create = false;
|
create = false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user