summaryrefslogtreecommitdiff
path: root/AudioManagerPoC/business_logic/src
diff options
context:
space:
mode:
Diffstat (limited to 'AudioManagerPoC/business_logic/src')
-rw-r--r--AudioManagerPoC/business_logic/src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/AudioManagerPoC/business_logic/src/main.cpp b/AudioManagerPoC/business_logic/src/main.cpp
index 3bdd518..9209586 100644
--- a/AudioManagerPoC/business_logic/src/main.cpp
+++ b/AudioManagerPoC/business_logic/src/main.cpp
@@ -2,7 +2,7 @@
* SPDX license identifier: MPL-2.0
*
* Copyright (C) 2011-2014, Wind River Systems
- * Copyright (C) 2014, GENIVI Alliance
+ * Copyright (C) 2014,2015, GENIVI Alliance
*
* This file is part of GENIVI AudioManager PoC.
*
@@ -25,6 +25,7 @@
* lock on the same file since the first instance
* owns it and it will quit with an appropriate
* message.
+ * 04.02.2015, Holger Behrens, add support for Wayland ivi-shell
*/
#include <QApplication>
@@ -43,8 +44,13 @@
#include "business_logic/include/volumechart.h"
#include "business_logic/include/audioManagerInterface.h"
+#define AM_POC_SURFACE_ID 20
+
int main(int argc, char *argv[])
{
+ setenv("QT_QPA_PLATFORM", "wayland", 1); // force to use wayland plugin
+ setenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1", 1);
+
QApplication app(argc, argv);
int pid_file = open("/var/run/AudioManager_PoC.pid", O_CREAT | O_RDWR, 0666);
if(pid_file != -1)
@@ -62,6 +68,7 @@ int main(int argc, char *argv[])
{
QQuickView view;
QMLButtonEventsReceiver rec(&view);
+ view.setProperty("IVI-Surface-ID", AM_POC_SURFACE_ID);
view.rootContext()->setContextProperty("QMLButtonEventsReceiver", &rec);
view.engine()->addImageProvider(QLatin1String("volumes"), new volumechart());
view.setSource(QUrl("qrc:/presentation_layer/main.qml"));