aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/main.cpp
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2017-05-26 11:09:59 +0900
committerTasuku Suzuki <tasuku.suzuki@qt.io>2017-05-26 11:13:16 +0900
commitda726aa2bdb0aa4bad33c2cfbdefa46f90fb6c17 (patch)
tree7e8a4bcc648ce2286bab13e082d6608a610624b8 /homescreen/src/main.cpp
parentfbdd80c3c6fd9b27ce1cbe21941baa8a643050fe (diff)
PoC: Qt Compositor-ized homescreensandbox/tasuku/qt-compositor-ized
Change-Id: Icec91030f8f4a8bf001b30ba9b7547751abfafed Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Diffstat (limited to 'homescreen/src/main.cpp')
-rw-r--r--homescreen/src/main.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp
index 215e7c6..7eba5bb 100644
--- a/homescreen/src/main.cpp
+++ b/homescreen/src/main.cpp
@@ -52,7 +52,11 @@ void noOutput(QtMsgType, const QMessageLogContext &, const QString &)
int main(int argc, char *argv[])
{
- QGuiApplication a(argc, argv);
+ qputenv("QT_QPA_PLATFORM", "eglfs");
+ qputenv("QT_QPA_EGLFS_INTEGRATION","eglfs_kms");
+ qputenv("QT_QPA_EGLFS_KMS_CONFIG","/home/root/kmsconfig");
+
+ QGuiApplication app(argc, argv);
QScopedPointer<org::AGL::afm::user, Cleanup> afm_user_daemon_proxy(new org::AGL::afm::user("org.AGL.afm.user",
"/org/AGL/afm/user",
@@ -72,7 +76,7 @@ int main(int argc, char *argv[])
QCommandLineOption quietOption(QStringList() << "q" << "quiet",
QCoreApplication::translate("main", "Be quiet. No outputs."));
parser.addOption(quietOption);
- parser.process(a);
+ parser.process(app);
if (parser.isSet(quietOption))
{
@@ -118,5 +122,6 @@ int main(int argc, char *argv[])
// Initalize PA client
client->init();
- return a.exec();
+ QObject::connect(&engine, &QQmlApplicationEngine::quit, &app, &QGuiApplication::quit);
+ return app.exec();
}