[libcalamares] Add convenience backend() to KPMManager
This commit is contained in:
parent
d039f9bbb8
commit
d0d017f5fe
@ -115,6 +115,12 @@ KPMManager::operator bool() const
|
||||
return s_kpm_loaded;
|
||||
}
|
||||
|
||||
CoreBackend*
|
||||
KPMManager::backend() const
|
||||
{
|
||||
return s_kpm_loaded ? CoreBackendManager::self()->backend() : nullptr;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Partition
|
||||
} // namespace CalamaresUtils
|
||||
|
@ -50,6 +50,10 @@ public:
|
||||
|
||||
/// @brief Is KPMCore loaded correctly?
|
||||
operator bool() const;
|
||||
|
||||
/// @brief Gets the KPMCore backend (e.g. CoreBackendManager::self()->backend() )
|
||||
CoreBackend* backend() const;
|
||||
|
||||
private:
|
||||
std::shared_ptr< InternalManager > m_d;
|
||||
};
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
// CalaPM
|
||||
#include <backend/corebackend.h>
|
||||
#include <backend/corebackendmanager.h>
|
||||
#include <fs/filesystemfactory.h>
|
||||
|
||||
// Qt
|
||||
@ -198,8 +197,7 @@ void
|
||||
PartitionJobTests::refreshDevice()
|
||||
{
|
||||
QString devicePath = qgetenv( "CALAMARES_TEST_DISK" );
|
||||
CoreBackend* backend = CoreBackendManager::self()->backend();
|
||||
m_device.reset( backend->scanDevice( devicePath ) );
|
||||
m_device.reset( kpmcore->backend()->scanDevice( devicePath ) );
|
||||
QVERIFY( !m_device.isNull() );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user