summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
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);