summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-01-09 22:12:53 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2018-01-09 22:12:53 +0000
commit997ff3705532f62bd5b8948b2d00ffc1fffe6b7c (patch)
tree9f25bb4a64713bef08b020d090075c5f06cc7924 /app/main.cpp
parentd084bc1f764833566f3e8eafc9fc297c3fa9ee08 (diff)
parent4b7d58e71e8864a90d3b567f21029968d6e8edef (diff)
Merge "Add basic translation support"
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/main.cpp b/app/main.cpp
index b793ef3..211f52b 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -22,6 +22,8 @@
#include <QtQml/QQmlContext>
#include <QtQuick/QQuickWindow>
+#include "translator.h"
+
#ifdef HAVE_LIBHOMESCREEN
#include <libhomescreen.hpp>
#endif
@@ -46,13 +48,17 @@ int main(int argc, char *argv[])
parser.process(app);
QStringList positionalArguments = parser.positionalArguments();
+ qmlRegisterType<Translator>("Translator", 1, 0, "Translator");
+
QQmlApplicationEngine engine;
QQmlContext *context = engine.rootContext();
QUrl bindingAddress;
+ int port;
+ QString secret;
if (positionalArguments.length() == 2) {
- int port = positionalArguments.takeFirst().toInt();
- QString secret = positionalArguments.takeFirst();
+ port = positionalArguments.takeFirst().toInt();
+ secret = positionalArguments.takeFirst();
bindingAddress.setScheme(QStringLiteral("ws"));
bindingAddress.setHost(QStringLiteral("localhost"));
bindingAddress.setPort(port);