From 227a373c6cdc30793b8890b001c6802cffaefc99 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 16 Dec 2021 16:26:47 -0500 Subject: Update for app framework removal Changes: - Remove the autobuild scripts and config.xml used by the app framework widget build. - Update the qmake files to just build a "navigation" binary and install it into /usr/bin by default. Also update the jtalk and flite script installation. - Remove the code in main.cpp that handled reading the WebSocket command-line arguments and passing them to binding related code. Bug-AGL: SPEC-4182 Signed-off-by: Scott Murray Change-Id: If3eca7b12c3ac2605c32f9832220dc58406f7b4b --- app/app.pri | 3 --- app/app.pro | 22 +++++++++++----------- app/main.cpp | 32 ++------------------------------ app/navigation.qml | 2 +- 4 files changed, 14 insertions(+), 45 deletions(-) delete mode 100644 app/app.pri (limited to 'app') diff --git a/app/app.pri b/app/app.pri deleted file mode 100644 index f22f540..0000000 --- a/app/app.pri +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = app - -DESTDIR = $${OUT_PWD}/../package/root/bin diff --git a/app/app.pro b/app/app.pro index 750e2f0..b1f49c8 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,29 +1,29 @@ +TEMPLATE = app TARGET = navigation -QT = quick qml -PKGCONFIG += qtappfw-navigation - -QT += positioning -QT += core +QT = core qml quick positioning CONFIG += c++11 link_pkgconfig -CONFIG(release, debug|release) { - QMAKE_POST_LINK = $(STRIP) --strip-unneeded $(TARGET) -} +PKGCONFIG += qtappfw-navigation HEADERS += \ markermodel.h \ guidance_module.h \ file_operation.h -SOURCES += main.cpp \ +SOURCES += \ + main.cpp \ file_operation.cpp RESOURCES += \ navigation.qrc \ images/images.qrc -include(app.pri) +target.path = $${PREFIX}/usr/bin +target.files += $${OUT_PWD}/$${TARGET} +target.CONFIG = no_check_exist executable + +INSTALLS += target + -DISTFILES += diff --git a/app/main.cpp b/app/main.cpp index 8a11239..62fe415 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -34,9 +33,6 @@ 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"); @@ -45,13 +41,6 @@ int main(int argc, char *argv[]) app.setDesktopFileName(graphic_role); - QCommandLineParser parser; - parser.addPositionalArgument("port", app.translate("main", "port for binding")); - parser.addPositionalArgument("secret", app.translate("main", "secret for binding")); - parser.addHelpOption(); - parser.addVersionOption(); - parser.process(app); - // Load qml QQmlApplicationEngine engine; QQmlContext *context = engine.rootContext(); @@ -59,26 +48,9 @@ int main(int argc, char *argv[]) File_Operation file; context->setContextProperty("fileOperation", &file); - QStringList positionalArguments = parser.positionalArguments(); - if (positionalArguments.length() == 2) { - port = positionalArguments.takeFirst().toInt(); - token = positionalArguments.takeFirst(); - QUrl bindingAddress; - bindingAddress.setScheme(QStringLiteral("ws")); - bindingAddress.setHost(QStringLiteral("localhost")); - bindingAddress.setPort(port); - bindingAddress.setPath(QStringLiteral("/api")); - QUrlQuery query; - query.addQueryItem(QStringLiteral("token"), token); - bindingAddress.setQuery(query); + Navigation *navigation = new Navigation(context); + context->setContextProperty("navigation", navigation); - Navigation *navigation = new Navigation(bindingAddress, context); - context->setContextProperty("navigation", navigation); - } - fprintf(stderr, "[navigation] app_name: %s, port: %d, token: %s.\n", - graphic_role.toStdString().c_str(), - port, - token.toStdString().c_str()); MarkerModel model; context->setContextProperty("markerModel", &model); diff --git a/app/navigation.qml b/app/navigation.qml index b98508f..d8f56a1 100644 --- a/app/navigation.qml +++ b/app/navigation.qml @@ -18,7 +18,6 @@ import QtQuick 2.6 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 -import QtWebSockets 1.0 import QtLocation 5.9 import QtPositioning 5.6 import QtQuick.Window 2.11 @@ -26,6 +25,7 @@ import QtQuick.Window 2.11 ApplicationWindow { id: root visible: true + flags: Qt.FramelessWindowHint width: Window.width height: Window.height title: qsTr("navigation") -- cgit 1.2.3-korg