aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/src-cpp')
-rw-r--r--src-qt5/src-cpp/framework-OSInterface.h2
-rw-r--r--src-qt5/src-cpp/framework-OSInterface_private.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/src-qt5/src-cpp/framework-OSInterface.h b/src-qt5/src-cpp/framework-OSInterface.h
index debc6c05..7f51764b 100644
--- a/src-qt5/src-cpp/framework-OSInterface.h
+++ b/src-qt5/src-cpp/framework-OSInterface.h
@@ -60,6 +60,7 @@ class OSInterface : public QObject{
//Updates
Q_PROPERTY( QString updateStatus READ updateStatus NOTIFY updateStatusChanged)
Q_PROPERTY( QString updateIcon READ updateIcon NOTIFY updateStatusChanged)
+ Q_PROPERTY( bool updateInfoAvailable READ updateInfoAvailable NOTIFY updateStatusChanged)
//Power options
Q_PROPERTY( bool canReboot READ canReboot NOTIFY powerAvailableChanged)
@@ -111,6 +112,7 @@ public:
// = Updates =
Q_INVOKABLE bool updatesSupported(); //is thie subsystem supported for the OS?
Q_INVOKABLE QString updateStatus(); //Current status ["","available","running","finished"]
+ Q_INVOKABLE bool updateInfoAvailable();
Q_INVOKABLE QString updateIcon();
Q_INVOKABLE QString updateStatusInfo(); //Extra information corresponding to the current status
Q_INVOKABLE QString updateDetails(); //Information about any available updates
diff --git a/src-qt5/src-cpp/framework-OSInterface_private.cpp b/src-qt5/src-cpp/framework-OSInterface_private.cpp
index 96356268..15ee6f8e 100644
--- a/src-qt5/src-cpp/framework-OSInterface_private.cpp
+++ b/src-qt5/src-cpp/framework-OSInterface_private.cpp
@@ -625,6 +625,9 @@ QString OSInterface::updateStatus(){
if(INFO.contains("updates/status")){ return INFO.value("updates/status").toString(); }
return "";
}
+bool OSInterface::updateInfoAvailable(){
+ return !updateStatus().isEmpty();
+}
QString OSInterface::updateIcon(){
if(INFO.contains("updates/icon")){ return INFO.value("updates/icon").toString(); }
bgstack15