aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3339840..b85c3fc 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,6 +39,7 @@
#include "RWADBusAdaptor.cpp"
#include "session.h"
#include "scenes/add_server_wizard/add_server_wizard.h"
+#include "RWAHostModel.h"
#include "RWAHost.h"
#define BUILD_TIME __DATE__ " " __TIME__
@@ -86,6 +87,13 @@ int main(int argc, char *argv[]) {
// Make mainqmladaptor available to QML
engine.rootContext()->setContextProperty("mainqmladaptor", main_gui.data());
+ QScopedPointer<DBusAPI> _dbus_api (new DBusAPI());
+ QObject::connect(_dbus_api.data(),
+ SIGNAL(serviceGetWebAppHostsResponse(QJsonDocument*)),
+ main_gui.data(),
+ SLOT(get_web_app_hosts_response(QJsonDocument*)));
+ _dbus_api.data()->get_web_app_hosts_request();
+
engine.load(QUrl(QStringLiteral("qrc:/src/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
@@ -102,9 +110,13 @@ int main(int argc, char *argv[]) {
engine.rootObjects().takeFirst(),
SLOT(showWindow()));
- QScopedPointer<Add_Server_wizard> wizard (new Add_Server_wizard(&app));
+ QObject::connect(engine.rootObjects().takeFirst()->findChild<QObject*>("sidebar_drawer"),
+ SIGNAL(rwaHostSelected(QString)),
+ main_gui.data(),
+ SLOT(onRwaHostSelected(QString)));
// Make add_server_wizard available to QML
+ QScopedPointer<Add_Server_wizard> wizard (new Add_Server_wizard(&app, main_gui.data()));
engine.rootContext()->setContextProperty("add_server_wizard", wizard.data());
return app.exec();