From 7dde4db1a2f51532e0b5eafcc427213a50902ded Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 12 Nov 2019 17:41:48 -0800 Subject: tbtnavi: read missing qml signals/slots Connect libqtappfw provided events to qml via signals/slots Bug-AGL: SPEC-2880 Change-Id: Ib915195caf34ac94575bebd03bdd86fd848c36d6 Signed-off-by: Matt Ranostay (cherry picked from commit c5313bfa18ab0b0b8997c72473458e741857bc8a) --- app/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/main.cpp') diff --git a/app/main.cpp b/app/main.cpp index eb7f3f3..108ce08 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -88,10 +88,12 @@ int main(int argc, char *argv[]) context->setContextProperty("fileOperation", &file); Navigation *navigation = new Navigation(bindingAddress, context); - new navigation_client(navigation); engine.load(QUrl(QStringLiteral("qrc:qml/Main.qml"))); + QObject *root = engine.rootObjects().first(); + new navigation_client(navigation, root->findChild("mapwindow")); + QQuickWindow *window = qobject_cast(root); QObject::connect(window, SIGNAL(frameSwapped()), qwmHandler, SLOT(slotActivateWindow())); -- cgit 1.2.3-korg