From 06fe7e6ad7b8e2443b0ccf4a5b488a0e556cf8e2 Mon Sep 17 00:00:00 2001
From: El Mehdi Fekari <mfekari@rim.com>
Date: Thu, 11 Apr 2013 11:09:07 +0200
Subject: [PATCH] Fix for build break on QNX

Disable the camera part as it's using APIs not supported for the PlayBook

Change-Id: I4e06a74e8a9e5a00e19e443b8aa304cf2bce2216
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
---
 src/plugins/blackberry/bbserviceplugin.cpp | 8 +++++++-
 src/plugins/blackberry/blackberry.pro      | 6 +++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/plugins/blackberry/bbserviceplugin.cpp b/src/plugins/blackberry/bbserviceplugin.cpp
index 90364f3f8..0a9abd71d 100644
--- a/src/plugins/blackberry/bbserviceplugin.cpp
+++ b/src/plugins/blackberry/bbserviceplugin.cpp
@@ -40,9 +40,11 @@
 ****************************************************************************/
 #include "bbserviceplugin.h"
 
+#ifndef Q_OS_BLACKBERRY_TABLET
 #include "bbcameraservice.h"
-#include "bbmediaplayerservice.h"
 #include "bbvideodeviceselectorcontrol.h"
+#endif
+#include "bbmediaplayerservice.h"
 
 #include <QDebug>
 
@@ -54,8 +56,10 @@ BbServicePlugin::BbServicePlugin()
 
 QMediaService *BbServicePlugin::create(const QString &key)
 {
+#ifndef Q_OS_BLACKBERRY_TABLET
     if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
         return new BbCameraService();
+#endif
 
     if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
         return new BbMediaPlayerService();
@@ -102,7 +106,9 @@ QString BbServicePlugin::deviceDescription(const QByteArray &service, const QByt
 
 void BbServicePlugin::updateDevices() const
 {
+#ifndef Q_OS_BLACKBERRY_TABLET
     BbVideoDeviceSelectorControl::enumerateDevices(&m_cameraDevices, &m_cameraDescriptions);
+#endif
 
     if (m_cameraDevices.isEmpty()) {
         qWarning() << "No camera devices found";
diff --git a/src/plugins/blackberry/blackberry.pro b/src/plugins/blackberry/blackberry.pro
index 806f20333..5684645fb 100644
--- a/src/plugins/blackberry/blackberry.pro
+++ b/src/plugins/blackberry/blackberry.pro
@@ -11,7 +11,11 @@ HEADERS += bbserviceplugin.h
 SOURCES += bbserviceplugin.cpp
 
 include(common/common.pri)
-include(camera/camera.pri)
+
+!blackberry-playbook {
+    include(camera/camera.pri)
+}
+
 include(mediaplayer/mediaplayer.pri)
 
 OTHER_FILES += blackberry_mediaservice.json
-- 
GitLab