summaryrefslogtreecommitdiffstats
path: root/launcher/src/main.cpp
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-03-27 16:36:08 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-03-27 16:36:31 +0000
commit5462c15547825c18139c69dc0b10b02d04bf9f10 (patch)
treeb95353d406460a1d8ada07727b77e1551efd3074 /launcher/src/main.cpp
parenta33e4f67abb380cf39e1f4e455c7a0df109865ba (diff)
Revert "Start app and get runnables list by homescreen"
https://gerrit.automotivelinux.org/gerrit/#/c/20559/ and https://gerrit.automotivelinux.org/gerrit/#/c/20223/ caused the launcher not to display any icons. Reverting until resolved. This reverts commit 607fdc0374e76a272455cc010f35693ba8b6894b. Change-Id: I3040f0a44b8cfc449e57c27e32ed631fc98b34fd
Diffstat (limited to 'launcher/src/main.cpp')
-rw-r--r--launcher/src/main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp
index e56ff5a..291e9d5 100644
--- a/launcher/src/main.cpp
+++ b/launcher/src/main.cpp
@@ -29,7 +29,7 @@
#include "applicationmodel.h"
#include "appinfo.h"
#include "afm_user_daemon_proxy.h"
-#include "homescreenhandler.h"
+#include "qlibhomescreen.h"
#include "hmi-debug.h"
// XXX: We want this DBus connection to be shared across the different
@@ -93,6 +93,7 @@ int main(int argc, char *argv[])
qDBusRegisterMetaType<AppInfo>();
qDBusRegisterMetaType<QList<AppInfo> >();
+ QLibHomeScreen* homescreenHandler = new QLibHomeScreen();
ApplicationLauncher *launcher = new ApplicationLauncher();
QLibWindowmanager* layoutHandler = new QLibWindowmanager();
if(layoutHandler->init(port,token) != 0){
@@ -120,8 +121,12 @@ int main(int argc, char *argv[])
HMI_DEBUG("launch", "surface %s Event_Invisible", label);
});
- HomescreenHandler* homescreenHandler = new HomescreenHandler();
- homescreenHandler->init(port, token.toStdString().c_str(), layoutHandler, myname);
+ homescreenHandler->init(port, token.toStdString().c_str());
+
+ homescreenHandler->set_event_handler(QLibHomeScreen::Event_ShowWindow, [layoutHandler, myname](json_object *object){
+ qDebug("Surface %s got Event_ShowWindow\n", myname);
+ layoutHandler->activateWindow(myname);
+ });
QUrl bindingAddress;
bindingAddress.setScheme(QStringLiteral("ws"));
@@ -150,7 +155,6 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty(QStringLiteral("launcher"), launcher);
engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo);
engine.load(QUrl(QStringLiteral("qrc:/Launcher.qml")));
- homescreenHandler->getRunnables();
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);