diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-05-14 01:31:58 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-06-24 17:34:14 +0300 |
commit | ff773d5e1a12f7962afe19659e24ba8a6ce0ab82 (patch) | |
tree | d36e840d3774df60d90a5bf3f4cf388c29c2ee82 /app/main.cpp | |
parent | 09c3584104d55206738741f79a279ae5f330effb (diff) |
app/main: Remove libhomescreen and libwindowmanager code and dependencykoi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish_9.99.1jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.2jellyfish/9.99.19.99.49.99.39.99.29.99.110.93.010.92.010.91.0
Bug-AGL: SPEC-3447
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ibf45b2aa8f0b1df38a36a468a566e5483ba1228a
Diffstat (limited to 'app/main.cpp')
-rw-r--r-- | app/main.cpp | 36 |
1 files changed, 5 insertions, 31 deletions
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(); } |