diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-03-07 15:58:03 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-03-07 16:01:38 -0500 |
commit | 70dfe121582cda2c82c794e5af6550b5c1a237c4 (patch) | |
tree | 88a79bcac0e13f5165041217e2a324019b6fcaf3 /app/main.cpp | |
parent | 32596d1152e7a94bc62734dc222a3d99c14e1fe5 (diff) |
Update for app framework removalmarlin_12.93.0marlin/12.93.012.93.0
Changes:
- Remove the autobuild scripts and config.xml used by the app
framework widget build.
- Update the qmake files to just build a "tbtnavi" binary and
install it into /usr/bin by default.
- Remove the code in main.cpp that handled reading the WebSocket
command-line arguments and passing them to binding related
code.
- Removed signal-composer wrapper instantiation in main.cpp, but the
related QML has been left alone now, this will need to be revisited
once something else is in place for vehicle signals (e.g. perhaps
a simple VISS API wrapper in libqtappfw that leverages kuksa.val).
Bug-AGL: SPEC-4283
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I9ea3b5aff37ad5013815afaab07823194350b26d
Diffstat (limited to 'app/main.cpp')
-rw-r--r-- | app/main.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/app/main.cpp b/app/main.cpp index 645d2f7..1be4efa 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -8,7 +8,6 @@ #include <QtQml/QQmlContext> #include <QtQuick/QQuickWindow> #include <navigation.h> -#include <signalcomposer.h> #include <QScreen> #include "navigation_client.h" @@ -99,15 +98,6 @@ int main(int argc, char *argv[]) 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")); - parser.addHelpOption(); - parser.addVersionOption(); - parser.process(app); - QStringList positionalArguments = parser.positionalArguments(); - QUrl bindingAddress; - QPlatformNativeInterface *native = qApp->platformNativeInterface(); agl_shell_desktop = register_agl_shell_desktop(native); if (!agl_shell_desktop) { @@ -118,24 +108,6 @@ int main(int argc, char *argv[]) std::shared_ptr<struct agl_shell_desktop> shell{agl_shell_desktop, agl_shell_desktop_destroy}; Shell *aglShell = new Shell(shell, nullptr); - int port = 0; - QString token; - if (positionalArguments.length() == 2) { - port = positionalArguments.takeFirst().toInt(); - token = positionalArguments.takeFirst(); - 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); - } - fprintf(stderr, "[tbtnavi] app_name: %s, port: %d, token: %s.\n", - graphic_role.toStdString().c_str(), - port, - token.toStdString().c_str()); - /* inform the compositor that the window be placed on a different * output */ QScreen *screen_to_put = find_qscreen(OUTPUT_ID); @@ -160,9 +132,7 @@ int main(int argc, char *argv[]) File_Operation file; context->setContextProperty("fileOperation", &file); - Navigation *navigation = new Navigation(bindingAddress, context); - - context->setContextProperty("SignalComposer", new SignalComposer(bindingAddress, context)); + Navigation *navigation = new Navigation(context); engine.load(QUrl(QStringLiteral("qrc:qml/Main.qml"))); |