From 70dfe121582cda2c82c794e5af6550b5c1a237c4 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 7 Mar 2022 15:58:03 -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 "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 Change-Id: I9ea3b5aff37ad5013815afaab07823194350b26d --- app/main.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'app/main.cpp') 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 #include #include -#include #include #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 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"))); -- cgit 1.2.3-korg