aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-12-16 16:26:47 -0500
committerScott Murray <scott.murray@konsulko.com>2021-12-16 16:28:51 -0500
commit227a373c6cdc30793b8890b001c6802cffaefc99 (patch)
treec9b24b212c54c23fb703c6db8993ede2454cb3cc /app
parentfa3bd315abd8a710d7493e6ffb7b54c521632202 (diff)
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 <scott.murray@konsulko.com> Change-Id: If3eca7b12c3ac2605c32f9832220dc58406f7b4b
Diffstat (limited to 'app')
-rw-r--r--app/app.pri3
-rw-r--r--app/app.pro22
-rw-r--r--app/main.cpp32
-rw-r--r--app/navigation.qml2
4 files changed, 14 insertions, 45 deletions
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 <string>
#include <QtCore/QDebug>
-#include <QtCore/QCommandLineParser>
#include <QtCore/QUrlQuery>
#include <QtCore/QSettings>
#include <QtGui/QGuiApplication>
@@ -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")