onscreenapp: Initial clean-up in code
[apps/onscreenapp.git] / app / main.cpp
index 007711c..381b9a2 100644 (file)
@@ -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()));