diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/app.pri | 1 | ||||
-rw-r--r-- | app/app.pro | 16 | ||||
-rw-r--r-- | app/main.cpp | 32 |
3 files changed, 9 insertions, 40 deletions
diff --git a/app/app.pri b/app/app.pri deleted file mode 100644 index 5dad652..0000000 --- a/app/app.pri +++ /dev/null @@ -1 +0,0 @@ -DESTDIR = $${OUT_PWD}/../package/root/bin diff --git a/app/app.pro b/app/app.pro index fbe53a4..8889208 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,17 +1,11 @@ -TARGET = tbtnavi TEMPLATE = app +TARGET = tbtnavi QT = qml network quick positioning location widgets gui-private -PKGCONFIG += qtappfw-navigation qtappfw-signal-composer wayland-client +PKGCONFIG += qtappfw-navigation wayland-client CONFIG += c++1z link_pkgconfig wayland-scanner -CONFIG(release, debug|release) { - QMAKE_POST_LINK = $(STRIP) --strip-unneeded $(TARGET) -} - -include(app.pri) - SOURCES += \ main.cpp \ navigation_client.cpp \ @@ -37,3 +31,9 @@ RESOURCES += \ WAYLANDCLIENTSOURCES += \ protocol/agl-shell-desktop.xml + +target.path = /usr/bin +target.files += $${OUT_PWD}/$${TARGET} +target.CONFIG = no_check_exist executable + +INSTALLS += target 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"))); |