summaryrefslogtreecommitdiffstats
path: root/launcher/src/main.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-02-20 17:08:32 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2019-03-22 17:14:29 +0800
commit607fdc0374e76a272455cc010f35693ba8b6894b (patch)
tree869ca0dfd686e92251b947677c32f9cdfd77fc0b /launcher/src/main.cpp
parente8d1f16f785cc176a82a9b46e08e13eb89899437 (diff)
Start app and get runnables list by homescreen
1.only call showWindow when start application. 2.get runnalbes list from homescreen-service. 3.subscribe and deal with Event_AppListChanged. 4.move LICENSE file to top-level directory. Bug-AGL: SPEC-2188 Change-Id: If0ce87a2f770b1a06ba72fdb087a24719d92d124 Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Diffstat (limited to 'launcher/src/main.cpp')
-rw-r--r--launcher/src/main.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp
index 291e9d5..e56ff5a 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 "qlibhomescreen.h"
+#include "homescreenhandler.h"
#include "hmi-debug.h"
// XXX: We want this DBus connection to be shared across the different
@@ -93,7 +93,6 @@ 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){
@@ -121,12 +120,8 @@ int main(int argc, char *argv[])
HMI_DEBUG("launch", "surface %s Event_Invisible", label);
});
- 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);
- });
+ HomescreenHandler* homescreenHandler = new HomescreenHandler();
+ homescreenHandler->init(port, token.toStdString().c_str(), layoutHandler, myname);
QUrl bindingAddress;
bindingAddress.setScheme(QStringLiteral("ws"));
@@ -155,6 +150,7 @@ 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);