aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-08 15:57:44 +0200
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-07-08 15:57:44 +0200
commit5be60cd11d0d9dbde8ca67f0ec88e10540c490db (patch)
tree8eefd6268215c271bf8b69723bf5b331bfdef842
parent29478a265060c578290eca9e5c43b164aee33267 (diff)
downloadRWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.tar.gz
RWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.tar.bz2
RWA.Support.DesktopApp-5be60cd11d0d9dbde8ca67f0ec88e10540c490db.zip
Refresh hosts every 10 seconds.
-rw-r--r--src/main_qmladaptor.cpp4
-rw-r--r--src/main_qmladaptor.h1
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"