--- src/connectivity/bluetooth/bluetooth.pri	2011-05-10 10:06:10.000000000 +0200
+++ src/connectivity/bluetooth/bluetooth.pri	2011-08-10 15:44:24.000000000 +0200
@@ -103,6 +103,7 @@
     }
 } else:contains(bluez_enabled, yes):contains(QT_CONFIG, dbus) {
     QT *= dbus
+    DEFINES += QTM_BLUEZ_BLUETOOTH
 
     include(bluez/bluez.pri)
 
--- src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothdevicediscoveryagent.h	2011-08-10 15:24:12.000000000 +0200
@@ -101,7 +101,7 @@
     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
--- src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.cpp	2011-08-10 15:24:12.000000000 +0200
@@ -69,7 +69,7 @@
 void QBluetoothDeviceDiscoveryAgentPrivate::stop()
 {
 }
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &address,
                                                            const QVariantMap &dict)
 {
--- src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothdevicediscoveryagent_p.h	2011-08-10 15:24:46.000000000 +0200
@@ -46,7 +46,7 @@
 
 #include <QVariantMap>
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 class OrgBluezManagerInterface;
 class OrgBluezAdapterInterface;
 class QDBusVariant;
@@ -80,7 +80,7 @@
             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 @@
     bool pendingCancel;
     bool pendingStart;
 
-#if !defined(QT_NO_DBUS)
+#ifdef QTM_BLUEZ_BLUETOOTH
     OrgBluezManagerInterface *manager;
     OrgBluezAdapterInterface *adapter;
 #endif
--- src/connectivity/bluetooth/qbluetoothlocaldevice_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothlocaldevice_p.h	2011-08-10 15:24:12.000000000 +0200
@@ -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 @@
 
 class QBluetoothAddress;
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 class QBluetoothLocalDevicePrivate : public QObject,
                                      protected QDBusContext
 {
--- src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothservicediscoveryagent.h	2011-08-10 15:24:12.000000000 +0200
@@ -105,7 +105,7 @@
     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
--- src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothservicediscoveryagent_p.h	2011-08-10 15:25:39.000000000 +0200
@@ -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 @@
     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 @@
 #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 @@
     TSdpAttributeID m_currentAttributeId;
 
     QStack<QVariant> m_stack;
-#elif !defined(QT_NO_DBUS)
+#elif defined(QTM_BLUEZ_BLUETOOTH)
     OrgBluezManagerInterface *manager;
     OrgBluezAdapterInterface *adapter;
     OrgBluezDeviceInterface *device;
--- src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothserviceinfo_p.cpp	2011-08-10 15:24:12.000000000 +0200
@@ -79,7 +79,7 @@
     Q_UNUSED(attributeId);
 }
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 bool QBluetoothServiceInfoPrivate::registerService() const
 {
     return false;
--- src/connectivity/bluetooth/qbluetoothserviceinfo_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qbluetoothserviceinfo_p.h	2011-08-10 15:24:12.000000000 +0200
@@ -72,7 +72,7 @@
 
     bool ensureSdpConnection() const;
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     bool registerService() const;
 #endif
 
@@ -89,7 +89,7 @@
     mutable TSdpServRecordHandle serviceRecord;
 #endif
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     mutable OrgBluezServiceInterface *service;
     mutable quint32 serviceRecord;
     mutable bool registered;
--- src/connectivity/bluetooth/ql2capserver.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/ql2capserver.h	2011-08-10 15:24:12.000000000 +0200
@@ -97,7 +97,7 @@
     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
 
--- src/connectivity/bluetooth/ql2capserver_p.cpp	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/ql2capserver_p.cpp	2011-08-10 15:24:12.000000000 +0200
@@ -101,7 +101,7 @@
 
 
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QL2capServerPrivate::_q_newConnection()
 {
 }
--- src/connectivity/bluetooth/ql2capserver_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/ql2capserver_p.h	2011-08-10 15:24:12.000000000 +0200
@@ -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 @@
     void _q_disconnected();
 #endif //QTM_SYMBIAN_BLUETOOTH
     
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_newConnection();
 #endif
 
@@ -103,7 +103,7 @@
     QL2capServer *q_ptr;
 
 private:
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     QSocketNotifier *socketNotifier;
 #endif
 };
--- src/connectivity/bluetooth/qrfcommserver.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qrfcommserver.h	2011-08-10 15:24:12.000000000 +0200
@@ -97,7 +97,7 @@
     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
 };
--- src/connectivity/bluetooth/qrfcommserver_p.cpp	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qrfcommserver_p.cpp	2011-08-10 15:24:12.000000000 +0200
@@ -90,7 +90,7 @@
 }
 
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
 void QRfcommServerPrivate::_q_newConnection()
 {
 }
--- src/connectivity/bluetooth/qrfcommserver_p.h	2011-05-10 10:06:11.000000000 +0200
+++ src/connectivity/bluetooth/qrfcommserver_p.h	2011-08-10 15:24:12.000000000 +0200
@@ -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 @@
     void _q_disconnected();
 #endif //QTM_SYMBIAN_BLUETOOTH
 
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     void _q_newConnection();
 #endif
 
@@ -102,7 +102,7 @@
     QRfcommServer *q_ptr;
 
 private:
-#ifndef QT_NO_DBUS
+#ifdef QTM_BLUEZ_BLUETOOTH
     QSocketNotifier *socketNotifier;
 #endif
 };