[partition] [fsresizer] Adjust to new #define
- Using KPMCORE4API is clearer than just relying on a version number
This commit is contained in:
parent
9159761171
commit
c0710cabe4
@ -120,7 +120,7 @@ ResizeFSJob::PartitionMatch
|
||||
ResizeFSJob::findPartition( CoreBackend* backend )
|
||||
{
|
||||
using DeviceList = QList< Device* >;
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) );
|
||||
#else
|
||||
DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true );
|
||||
|
@ -107,7 +107,7 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize )
|
||||
bool writableOnly = (which == DeviceType::WritableOnly);
|
||||
|
||||
CoreBackend* backend = CoreBackendManager::self()->backend();
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) );
|
||||
#else
|
||||
DeviceList devices = backend->scanDevices( /* excludeReadOnly */ true );
|
||||
|
@ -33,7 +33,7 @@ class Partition;
|
||||
class PartitionNode;
|
||||
class PartitionRole;
|
||||
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x
|
||||
#define KPM_PARTITION_STATE(x) Partition::State::x
|
||||
#define KPM_PARTITION_FLAG_ESP PartitionTable::Flag::Boot
|
||||
|
@ -683,7 +683,7 @@ PartitionCoreModule::scanForLVMPVs()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
VolumeManagerDevice::scanDevices( physicalDevices );
|
||||
|
||||
for ( auto p : LVM::pvList::list() )
|
||||
@ -724,7 +724,7 @@ PartitionCoreModule::scanForLVMPVs()
|
||||
if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV )
|
||||
m_lvmPVs << p;
|
||||
}
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
else if ( p->fileSystem().type() == FileSystem::Type::Luks2 )
|
||||
{
|
||||
// Encrypted LVM PVs
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
#include <kpmcore/core/device.h>
|
||||
#include <kpmcore/core/partition.h>
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
#include <kpmcore/core/softwareraid.h>
|
||||
#endif
|
||||
|
||||
@ -1224,7 +1224,7 @@ ChoicePage::setupActions()
|
||||
bool atLeastOneIsMounted = false; // Suppress 'erase' if so
|
||||
bool isInactiveRAID = false;
|
||||
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
if ( currentDevice->type() == Device::Type::SoftwareRAID_Device &&
|
||||
static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive )
|
||||
{
|
||||
|
@ -49,7 +49,7 @@
|
||||
// KPMcore
|
||||
#include <kpmcore/core/device.h>
|
||||
#include <kpmcore/core/partition.h>
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
#include <kpmcore/core/softwareraid.h>
|
||||
#endif
|
||||
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
|
||||
@ -162,7 +162,7 @@ PartitionPage::updateButtons()
|
||||
{
|
||||
createTable = true;
|
||||
|
||||
#ifdef WITH_KPMCOREGT33
|
||||
#ifdef WITH_KPMCORE4API
|
||||
if ( device->type() == Device::Type::SoftwareRAID_Device &&
|
||||
static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user