update: method to check if container is installed

This commit is contained in:
MrMirDan
2026-06-09 17:12:09 +03:00
parent 583f058dd9
commit 3c49622683
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -120,6 +120,11 @@ bool ContainersModel::isServiceContainer(const int containerIndex)
return qvariant_cast<ServiceType>(data(index(containerIndex), ServiceTypeRole) == ServiceType::Other); return qvariant_cast<ServiceType>(data(index(containerIndex), ServiceTypeRole) == ServiceType::Other);
} }
bool ContainersModel::isContainerInstalled(const int containerIndex)
{
return qvariant_cast<bool>(data(index(containerIndex), IsInstalledRole));
}
bool ContainersModel::hasInstalledServices() bool ContainersModel::hasInstalledServices()
{ {
for (const auto &container : m_containers.keys()) { for (const auto &container : m_containers.keys()) {
+1
View File
@@ -71,6 +71,7 @@ public slots:
bool isSupportedByCurrentPlatform(const int containerIndex); bool isSupportedByCurrentPlatform(const int containerIndex);
bool isServiceContainer(const int containerIndex); bool isServiceContainer(const int containerIndex);
bool isContainerInstalled(const int containerIndex);
bool hasInstalledServices(); bool hasInstalledServices();
bool hasInstalledProtocols(); bool hasInstalledProtocols();