summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-05-14 01:31:58 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-24 17:34:14 +0300
commitff773d5e1a12f7962afe19659e24ba8a6ce0ab82 (patch)
treed36e840d3774df60d90a5bf3f4cf388c29c2ee82
parent09c3584104d55206738741f79a279ae5f330effb (diff)
Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ibf45b2aa8f0b1df38a36a468a566e5483ba1228a
-rw-r--r--app/app.pro2
-rw-r--r--app/main.cpp36
-rw-r--r--package/config.xml2
3 files changed, 6 insertions, 34 deletions
diff --git a/app/app.pro b/app/app.pro
index 41566ec..750e2f0 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -1,6 +1,6 @@
TARGET = navigation
QT = quick qml
-PKGCONFIG += qlibhomescreen qlibwindowmanager qtappfw-navigation
+PKGCONFIG += qtappfw-navigation
QT += positioning
QT += core
diff --git a/app/main.cpp b/app/main.cpp
index b2b9185..8a11239 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -15,8 +15,6 @@
* limitations under the License.
*/
-#include <qlibwindowmanager.h>
-#include <qlibhomescreen.h>
#include <string>
#include <QtCore/QDebug>
#include <QtCore/QCommandLineParser>
@@ -37,11 +35,16 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QString graphic_role = QString("navigation");
int port = 1700;
+
QString token = "hello";
+
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName(graphic_role);
QCoreApplication::setApplicationVersion("0.1.0");
+
+ app.setDesktopFileName(graphic_role);
+
QCommandLineParser parser;
parser.addPositionalArgument("port", app.translate("main", "port for binding"));
parser.addPositionalArgument("secret", app.translate("main", "secret for binding"));
@@ -76,32 +79,6 @@ int main(int argc, char *argv[])
graphic_role.toStdString().c_str(),
port,
token.toStdString().c_str());
-
- // QLibWM
- QLibWindowmanager* qwmHandler = new QLibWindowmanager();
- int res;
- if((res = qwmHandler->init(port,token)) != 0){
- fprintf(stderr, "[navigation] init qlibwm err(%d)\n", res);
- return -1;
- }
- if((res = qwmHandler->requestSurface(graphic_role)) != 0) {
- fprintf(stderr, "[navigation] request surface err(%d)\n", res);
- return -1;
- }
- qwmHandler->set_event_handler(QLibWindowmanager::Event_SyncDraw,
- [qwmHandler, &graphic_role](json_object *object) {
- qwmHandler->endDraw(graphic_role);
- });
-
- // QLibHS
- QLibHomeScreen* qhsHandler = new QLibHomeScreen();
- qhsHandler->init(port, token.toStdString().c_str());
- qhsHandler->set_event_handler(QLibHomeScreen::Event_ShowWindow,
- [qwmHandler, &graphic_role](json_object *object){
- qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str());
- qwmHandler->activateWindow(graphic_role);
- });
-
MarkerModel model;
context->setContextProperty("markerModel", &model);
@@ -109,9 +86,6 @@ int main(int argc, char *argv[])
context->setContextProperty("guidanceModule", &guidance);
engine.load(QUrl(QStringLiteral("qrc:/navigation.qml")));
- QObject *root = engine.rootObjects().first();
- QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
- QObject::connect(window, SIGNAL(frameSwapped()), qwmHandler, SLOT(slotActivateSurface()));
return app.exec();
}
diff --git a/package/config.xml b/package/config.xml
index 4f3f2ca..b1fbd40 100644
--- a/package/config.xml
+++ b/package/config.xml
@@ -7,8 +7,6 @@
<author>Qt</author>
<license>APL 2.0</license>
<feature name="urn:AGL:widget:required-api">
- <param name="windowmanager" value="ws"/>
- <param name="homescreen" value="ws"/>
<param name="navigation" value="ws"/>
</feature>
<feature name="urn:AGL:widget:required-permission">