Merge PR #252: Update the app properly when the core system capabilities change

This commit is contained in:
Jenkins nymea 2019-10-28 12:23:23 +01:00
commit 69ca3c7416

View File

@ -227,6 +227,12 @@ void SystemController::notificationReceived(const QVariantMap &data)
} else if (notification == "System.RepositoryRemoved") {
QString repositoryId = data.value("params").toMap().value("repositoryId").toString();
m_repositories->removeRepository(repositoryId);
} else if (notification == "System.CapabilitiesChanged") {
m_powerManagementAvailable = data.value("params").toMap().value("powerManagement").toBool();
m_updateManagementAvailable = data.value("params").toMap().value("updateManagement").toBool();
qWarning() << "System capabilites changed: power management:" << m_powerManagementAvailable << "update management:" << m_updateManagementAvailable;
emit powerManagementAvailableChanged();
emit updateManagementAvailableChanged();
} else {
qWarning() << "Unhandled System Notification" << data.value("notification");
}