diff --git a/src/modules/partition/tests/CreateLayoutsTests.cpp b/src/modules/partition/tests/CreateLayoutsTests.cpp index dab49c2b0..6bfc8caee 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.cpp +++ b/src/modules/partition/tests/CreateLayoutsTests.cpp @@ -125,6 +125,7 @@ CreateLayoutsTests::testMixedSizePartition() QCOMPARE( partitions[2]->length(), ((5_GiB - 5_MiB)/2)/LOGICAL_SIZE ); } +#ifdef WITH_KPMCORE4API // TODO: Get a clean way to instanciate a test Device from KPMCore class DevicePrivate { @@ -143,3 +144,9 @@ TestDevice::TestDevice(const QString& name, const qint64 logicalSectorSize, cons : Device (std::make_shared(), name, QString( "node" ), logicalSectorSize, totalLogicalSectors, QString(), Device::Type::Unknown_Device) { } +#else +TestDevice::TestDevice(const QString& name, const qint64 logicalSectorSize, const qint64 totalLogicalSectors) + : Device (name, QString( "node" ), logicalSectorSize, totalLogicalSectors, QString(), Device::Type::Unknown_Device) +{ +} +#endif