[libcalamares] Add query for kpmcore status

This commit is contained in:
Adriaan de Groot 2019-06-13 21:54:03 +02:00
parent 7adbc8cda6
commit 1674c81e9c
2 changed files with 9 additions and 1 deletions

View File

@ -44,7 +44,6 @@ static bool s_kpm_loaded = false;
static bool s_loaded = false; static bool s_loaded = false;
static std::shared_ptr< InternalManager > s_backend; static std::shared_ptr< InternalManager > s_backend;
InternalManager::InternalManager() InternalManager::InternalManager()
{ {
Q_ASSERT( !s_loaded ); Q_ASSERT( !s_loaded );
@ -100,5 +99,11 @@ KPMManager::KPMManager()
KPMManager::~KPMManager() {} KPMManager::~KPMManager() {}
KPMManager::operator bool() const
{
return s_kpm_loaded;
}
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace CalamaresUtils

View File

@ -48,8 +48,11 @@ public:
KPMManager(); KPMManager();
~KPMManager(); ~KPMManager();
/// @brief Is KPMCore loaded correctly?
operator bool() const;
private: private:
std::shared_ptr< InternalManager > m_d; std::shared_ptr< InternalManager > m_d;
}; };
} // namespace Partition } // namespace Partition