diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-08 15:57:44 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-08 15:57:44 +0200 |
commit | 5be60cd11d0d9dbde8ca67f0ec88e10540c490db (patch) | |
tree | 8eefd6268215c271bf8b69723bf5b331bfdef842 /src | |
parent | 29478a265060c578290eca9e5c43b164aee33267 (diff) | |
download | RWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.tar.gz RWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.tar.bz2 RWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.zip |
Refresh hosts every 10 seconds.
Diffstat (limited to 'src')
-rw-r--r-- | src/main_qmladaptor.cpp | 4 | ||||
-rw-r--r-- | src/main_qmladaptor.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main_qmladaptor.cpp b/src/main_qmladaptor.cpp index 2dec33c..6684d13 100644 --- a/src/main_qmladaptor.cpp +++ b/src/main_qmladaptor.cpp @@ -34,6 +34,10 @@ MainQMLAdaptor::MainQMLAdaptor(QObject *parent, QQmlApplicationEngine* engine, _engine = engine; _dbus_api = dbus_api; _rwaHostModel = new QList<QObject*>; + + QTimer *timer = new QTimer(this); + connect(timer, &QTimer::timeout, _dbus_api, QOverload<>::of(&DBusAPI::get_web_app_hosts_request)); + timer->start(10000); } void MainQMLAdaptor::onRwaHostSelected(QString host_uuid) { diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h index 48923d5..d928acd 100644 --- a/src/main_qmladaptor.h +++ b/src/main_qmladaptor.h @@ -35,6 +35,7 @@ #include <QJsonObject> #include <QJsonDocument> #include <QJsonArray> +#include <QTimer> #include "RWAHost.h" #include "DBusAPI.h" |