summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt-mobility-1.2.0/fix-compile-error-no-bluez.patch
blob: 3f03cf7165ef7ba11e1ab6de915a3e15bd6c2e42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
From bb05733bd5a685b00f80ddc73a1b7a9a2ba0eb11 Mon Sep 17 00:00:00 2001
From: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Date: Thu, 12 May 2011 13:07:13 +1000
Subject: [PATCH] Fix compile error if bluez is not installed

Upstream-Status: Backport

Task-number: QTMOBILITY-1576
---
 src/connectivity/bluetooth/bluetooth.pri           |    1 +
 .../bluetooth/qbluetoothdevicediscoveryagent.h     |    2 +-
 .../bluetooth/qbluetoothdevicediscoveryagent_p.cpp |    2 +-
 .../bluetooth/qbluetoothdevicediscoveryagent_p.h   |    6 +++---
 .../bluetooth/qbluetoothlocaldevice_p.h            |    4 ++--
 .../bluetooth/qbluetoothservicediscoveryagent.h    |    2 +-
 .../bluetooth/qbluetoothservicediscoveryagent_p.h  |    8 ++++----
 .../bluetooth/qbluetoothserviceinfo_p.cpp          |    2 +-
 .../bluetooth/qbluetoothserviceinfo_p.h            |    4 ++--
 src/connectivity/bluetooth/ql2capserver.h          |    2 +-
 src/connectivity/bluetooth/ql2capserver_p.cpp      |    2 +-
 src/connectivity/bluetooth/ql2capserver_p.h        |    6 +++---
 src/connectivity/bluetooth/qrfcommserver.h         |    2 +-
 src/connectivity/bluetooth/qrfcommserver_p.cpp     |    2 +-
 src/connectivity/bluetooth/qrfcommserver_p.h       |    6 +++---
 tests/tests.pro                                    |    4 +++-
 16 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/src/connectivity/bluetooth/bluetooth.pri b/src/connectivity/bluetooth/bluetooth.pri
index 717a1ad..4fa2c15 100644
--- a/src/connectivity/bluetooth/bluetooth.pri
+++ b/src/connectivity/bluetooth/bluetooth.pri
@@ -103,6 +103,7 @@ symbian {
     }
 } else:contains(bluez_enabled, yes):contains(QT_CONFIG, dbus) {
     QT *= dbus
+    DEFINES += QTM_BLUEZ_BLUETOOTH
 
     include(bluez/bluez.pri)
 
diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h
index a95c467..00cfd14 100644
--- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h
+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h
@@ -101,7 +101,7 @@ private:
     Q_DECLARE_PRIVATE(QBluetoothDeviceDiscoveryAgent)
     QBluetoothDeviceDiscoveryAgentPrivate *d_ptr;
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     Q_PRIVATE_SLOT(d_func(), void _q_deviceFound(const QString &address, const QVariantMap &dict));
     Q_PRIVATE_SLOT(d_func(), void _q_propertyChanged(const QString &name, const QDBusVariant &value));
 #endif
diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
index 6edbd16..512002d 100644
--- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
@@ -69,7 +69,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
 void QBluetoothDeviceDiscoveryAgentPrivate::stop()
 {
 }
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &address,
                                                            const QVariantMap &dict)
 {
diff --git a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h
index 0e34e05..700e78d 100644
--- a/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h
+++ b/src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h
@@ -46,7 +46,7 @@
 
 #include <QVariantMap>
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 class OrgBluezManagerInterface;
 class OrgBluezAdapterInterface;
 class QDBusVariant;
@@ -80,7 +80,7 @@ public:
             QString errorDescription);
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_deviceFound(const QString &address, const QVariantMap &dict);
     void _q_propertyChanged(const QString &name, const QDBusVariant &value);
 #endif
@@ -100,7 +100,7 @@ private:
     bool pendingCancel;
     bool pendingStart;
 
-#if !defined(QT_NO_DBUS)
+#ifdef QTM_BLUEZ_BLUETOOTH
     OrgBluezManagerInterface *manager;
     OrgBluezAdapterInterface *adapter;
 #endif
diff --git a/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h b/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h
index 750c286..381d6b5 100644
--- a/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h
+++ b/src/connectivity/bluetooth/qbluetoothlocaldevice_p.h
@@ -51,7 +51,7 @@
 #include <btengsettings.h>
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 #include <QObject>
 #include <QDBusContext>
 #include <QDBusObjectPath>
@@ -68,7 +68,7 @@ QTM_BEGIN_NAMESPACE
 
 class QBluetoothAddress;
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 class QBluetoothLocalDevicePrivate : public QObject,
                                      protected QDBusContext
 {
diff --git a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h
index 6279432..7eeccfc 100644
--- a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h
+++ b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h
@@ -105,7 +105,7 @@ private:
     Q_PRIVATE_SLOT(d_func(), void _q_deviceDiscovered(const QBluetoothDeviceInfo &info))
     Q_PRIVATE_SLOT(d_func(), void _q_deviceDiscoveryFinished())
     Q_PRIVATE_SLOT(d_func(), void _q_serviceDiscoveryFinished())
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     Q_PRIVATE_SLOT(d_func(), void _q_discoveredServices(QDBusPendingCallWatcher*))
     Q_PRIVATE_SLOT(d_func(), void _q_createdDevice(QDBusPendingCallWatcher*))
 #endif
diff --git a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h
index 5e7da43..f25c293 100644
--- a/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h
+++ b/src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h
@@ -53,7 +53,7 @@
 #include <btsdp.h>
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 class OrgBluezManagerInterface;
 class OrgBluezAdapterInterface;
 class OrgBluezDeviceInterface;
@@ -99,7 +99,7 @@ public:
     void _q_deviceDiscoveryFinished();
     void _q_deviceDiscovered(const QBluetoothDeviceInfo &info);
     void _q_serviceDiscoveryFinished();
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_discoveredServices(QDBusPendingCallWatcher *watcher);
     void _q_createdDevice(QDBusPendingCallWatcher *watcher);
 #endif
@@ -123,7 +123,7 @@ private:
 #ifdef QTM_SYMBIAN_BLUETOOTH
     void startL(const QBluetoothAddress &address);
     void initL(const QBluetoothAddress &address);
-#elif !defined(QT_NO_DBUS)
+#elif defined(QTM_BLUEZ_BLUETOOTH)
     QVariant readAttributeValue(QXmlStreamReader &xml);
 #endif
 
@@ -153,7 +153,7 @@ private:
     TSdpAttributeID m_currentAttributeId;
 
     QStack<QVariant> m_stack;
-#elif !defined(QT_NO_DBUS)
+#elif defined(QTM_BLUEZ_BLUETOOTH)
     OrgBluezManagerInterface *manager;
     OrgBluezAdapterInterface *adapter;
     OrgBluezDeviceInterface *device;
diff --git a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp
index 814458c..dd96dcc 100644
--- a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp
+++ b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp
@@ -79,7 +79,7 @@ void QBluetoothServiceInfoPrivate::removeRegisteredAttribute(quint16 attributeId
     Q_UNUSED(attributeId);
 }
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 bool QBluetoothServiceInfoPrivate::registerService() const
 {
     return false;
diff --git a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h
index 5be7341..8e4254c 100644
--- a/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h
+++ b/src/connectivity/bluetooth/qbluetoothserviceinfo_p.h
@@ -72,7 +72,7 @@ public:
 
     bool ensureSdpConnection() const;
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     bool registerService() const;
 #endif
 
@@ -89,7 +89,7 @@ public:
     mutable TSdpServRecordHandle serviceRecord;
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     mutable OrgBluezServiceInterface *service;
     mutable quint32 serviceRecord;
     mutable bool registered;
diff --git a/src/connectivity/bluetooth/ql2capserver.h b/src/connectivity/bluetooth/ql2capserver.h
index 99c20a5..bed65a3 100644
--- a/src/connectivity/bluetooth/ql2capserver.h
+++ b/src/connectivity/bluetooth/ql2capserver.h
@@ -97,7 +97,7 @@ private:
     Q_PRIVATE_SLOT(d_func(), void _q_disconnected())
 #endif //QTM_SYMBIAN_BLUETOOTH
     
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     Q_PRIVATE_SLOT(d_func(), void _q_newConnection())
 #endif
 
diff --git a/src/connectivity/bluetooth/ql2capserver_p.cpp b/src/connectivity/bluetooth/ql2capserver_p.cpp
index 3a2199f..f19977e 100644
--- a/src/connectivity/bluetooth/ql2capserver_p.cpp
+++ b/src/connectivity/bluetooth/ql2capserver_p.cpp
@@ -101,7 +101,7 @@ QBluetooth::SecurityFlags QL2capServer::securityFlags() const
 
 
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QL2capServerPrivate::_q_newConnection()
 {
 }
diff --git a/src/connectivity/bluetooth/ql2capserver_p.h b/src/connectivity/bluetooth/ql2capserver_p.h
index b5e76d9..2823106 100644
--- a/src/connectivity/bluetooth/ql2capserver_p.h
+++ b/src/connectivity/bluetooth/ql2capserver_p.h
@@ -50,7 +50,7 @@
 #include <bt_sock.h>
 #endif //QTM_SYMBIAN_BLUETOOTH
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 QT_FORWARD_DECLARE_CLASS(QSocketNotifier)
 #endif
 
@@ -82,7 +82,7 @@ public:
     void _q_disconnected();
 #endif //QTM_SYMBIAN_BLUETOOTH
     
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_newConnection();
 #endif
 
@@ -103,7 +103,7 @@ protected:
     QL2capServer *q_ptr;
 
 private:
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     QSocketNotifier *socketNotifier;
 #endif
 };
diff --git a/src/connectivity/bluetooth/qrfcommserver.h b/src/connectivity/bluetooth/qrfcommserver.h
index 3f348dd..7974ba6 100644
--- a/src/connectivity/bluetooth/qrfcommserver.h
+++ b/src/connectivity/bluetooth/qrfcommserver.h
@@ -97,7 +97,7 @@ private:
     Q_PRIVATE_SLOT(d_func(), void _q_disconnected())
 #endif //QTM_SYMBIAN_BLUETOOTH  
     
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     Q_PRIVATE_SLOT(d_func(), void _q_newConnection())
 #endif
 };
diff --git a/src/connectivity/bluetooth/qrfcommserver_p.cpp b/src/connectivity/bluetooth/qrfcommserver_p.cpp
index f8145d9..eb14d64 100644
--- a/src/connectivity/bluetooth/qrfcommserver_p.cpp
+++ b/src/connectivity/bluetooth/qrfcommserver_p.cpp
@@ -90,7 +90,7 @@ quint16 QRfcommServer::serverPort() const
 }
 
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QRfcommServerPrivate::_q_newConnection()
 {
 }
diff --git a/src/connectivity/bluetooth/qrfcommserver_p.h b/src/connectivity/bluetooth/qrfcommserver_p.h
index da6e28b..af40df7 100644
--- a/src/connectivity/bluetooth/qrfcommserver_p.h
+++ b/src/connectivity/bluetooth/qrfcommserver_p.h
@@ -51,7 +51,7 @@
 #include <bt_sock.h>
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 QT_FORWARD_DECLARE_CLASS(QSocketNotifier)
 #endif
 
@@ -83,7 +83,7 @@ public:
     void _q_disconnected();
 #endif //QTM_SYMBIAN_BLUETOOTH
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_newConnection();
 #endif
 
@@ -102,7 +102,7 @@ protected:
     QRfcommServer *q_ptr;
 
 private:
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     QSocketNotifier *socketNotifier;
 #endif
 };
diff --git a/tests/tests.pro b/tests/tests.pro
index 2f2c355..4800e5e 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -16,7 +16,9 @@ contains(mobility_modules,systeminfo): SUBDIRS += sysinfo-tester
 contains(mobility_modules,connectivity) {
     SUBDIRS += nfctestserver
 
-    linux*:!linux-armcc: SUBDIRS += btclient
+    linux*:!linux-armcc:contains(bluez_enabled, yes):contains(QT_CONFIG, dbus) {
+        SUBDIRS += btclient
+    }
 }
 
 symbian {
-- 
1.7.1