summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-04-13 13:39:04 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-04-13 17:25:03 +0300
commit69ab2870ea1fbac6808dac791e141f3009e98724 (patch)
tree66977de488cdddaea73c0d39f127e142bafdc8be /app/main.cpp
parentbd47464dafd7110586163bbd6dc89a30fccd6a26 (diff)
onscreenapp: Initial clean-up in code
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 007711c..381b9a2 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -31,12 +31,18 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
+#if 0
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("Onscreenapp");
QCoreApplication::setApplicationVersion("0.1.0");
+#endif
- QQuickStyle::setStyle("AGL");
+ // this is necessary to identify app, setApplicationName is only for the
+ // title
+ app.setDesktopFileName(APP_ID);
+
+ //QQuickStyle::setStyle("AGL");
QCommandLineParser parser;
parser.addPositionalArgument("port", app.translate("main", "port for binding"));
@@ -69,6 +75,7 @@ int main(int argc, char *argv[])
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
+
QObject::connect(eventHandler, SIGNAL(updateModel(QVariant)), window, SLOT(setOnScreenModel(QVariant)));
QObject::connect(eventHandler, SIGNAL(showOnScreen()), window, SLOT(showOnScreen()));
QObject::connect(eventHandler, SIGNAL(hideOnScreen()), window, SLOT(hideOnScreen()));