diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-05-20 19:31:41 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-05-20 19:31:41 +0200 |
commit | 9406019386448452982ef4dacdbe1d910e903cd1 (patch) | |
tree | 8044eef537043b4fd9e4efc5f2709e540a77d3f3 /src | |
parent | 266fdc0839eda6e6ba66d7e81aceaea32160bdee (diff) | |
parent | 5b548aa2ffe648810c487ecb895631da2be12a33 (diff) |
Merge 5.7 into 5.7.0
Change-Id: I5406c601fa05e347a7c7558e42fb05029799ff27
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/doc/qtbluetooth.qdocconf | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothtransfermanager.cpp | 2 | ||||
-rw-r--r-- | src/bluetooth/qleadvertiser_bluez.cpp | 10 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 15 | ||||
-rw-r--r-- | src/nfc/doc/qtnfc.qdocconf | 2 |
6 files changed, 25 insertions, 8 deletions
diff --git a/src/bluetooth/doc/qtbluetooth.qdocconf b/src/bluetooth/doc/qtbluetooth.qdocconf index a4b86e95..52061d7e 100644 --- a/src/bluetooth/doc/qtbluetooth.qdocconf +++ b/src/bluetooth/doc/qtbluetooth.qdocconf @@ -4,7 +4,7 @@ project = QtBluetooth description = Qt Bluetooth Reference Documentation version = $QT_VERSION -examplesinstallpath = qtconnectivity/bluetooth +examplesinstallpath = bluetooth qhp.projects = QtBluetooth diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp index d83731c2..b1cbdae5 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp @@ -279,7 +279,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::startLowEnergyScan() if (!leScanTimeout) { leScanTimeout = new QTimer(this); leScanTimeout->setSingleShot(true); - leScanTimeout->setInterval(10000); + leScanTimeout->setInterval(25000); connect(leScanTimeout, &QTimer::timeout, this, &QBluetoothDeviceDiscoveryAgentPrivate::stopLowEnergyScan); } diff --git a/src/bluetooth/qbluetoothtransfermanager.cpp b/src/bluetooth/qbluetoothtransfermanager.cpp index f4720564..7206dce6 100644 --- a/src/bluetooth/qbluetoothtransfermanager.cpp +++ b/src/bluetooth/qbluetoothtransfermanager.cpp @@ -45,8 +45,10 @@ #elif QT_OSX_BLUETOOTH #include "qbluetoothtransferreply_osx_p.h" #else +#if !defined(QT_ANDROID_BLUETOOTH) && !defined(QT_IOS_BLUETOOTH) #include "dummy/dummy_helper_p.h" #endif +#endif QT_BEGIN_NAMESPACE diff --git a/src/bluetooth/qleadvertiser_bluez.cpp b/src/bluetooth/qleadvertiser_bluez.cpp index 52f4dd73..ff00b2b1 100644 --- a/src/bluetooth/qleadvertiser_bluez.cpp +++ b/src/bluetooth/qleadvertiser_bluez.cpp @@ -162,6 +162,8 @@ void QLeAdvertiserBluez::setAdvertisingParams() // Spec v4.2, Vol 2, Part E, 7.8.5 AdvParams params; static_assert(sizeof params == 15, "unexpected struct size"); + using namespace std; + memset(¶ms, 0, sizeof params); setAdvertisingInterval(params); params.type = parameters().mode(); params.filterPolicy = parameters().filterPolicy(); @@ -283,7 +285,13 @@ void QLeAdvertiserBluez::setServicesData(const QLowEnergyAdvertisingData &src, A services32 << service32; continue; } - services128 << service.toUInt128(); + + // QBluetoothUuid::toUInt128() is always Big-Endian + // convert it to host order + quint128 hostOrder; + quint128 qtUuidOrder = service.toUInt128(); + ntoh128(&qtUuidOrder, &hostOrder); + services128 << hostOrder; } addServicesData(dest, services16); addServicesData(dest, services32); diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index adac55fc..d4fe0232 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -235,10 +235,14 @@ template<typename T> static void putDataAndIncrement(const T &src, char *&dst) template<> void putDataAndIncrement(const QBluetoothUuid &uuid, char *&dst) { const int uuidSize = getUuidSize(uuid); - if (uuidSize == 2) + if (uuidSize == 2) { putBtData(uuid.toUInt16(), dst); - else - putBtData(uuid.toUInt128(), dst); + } else { + quint128 hostOrder; + quint128 qtUuidOrder = uuid.toUInt128(); + ntoh128(&qtUuidOrder, &hostOrder); + putBtData(hostOrder, dst); + } dst += uuidSize; } template<> void putDataAndIncrement(const QByteArray &value, char *&dst) @@ -2925,7 +2929,10 @@ static QByteArray uuidToByteArray(const QBluetoothUuid &uuid) putBtData(uuid.toUInt16(), ba.data()); } else { ba.resize(16); - putBtData(uuid.toUInt128(), ba.data()); + quint128 hostOrder; + quint128 qtUuidOrder = uuid.toUInt128(); + ntoh128(&qtUuidOrder, &hostOrder); + putBtData(hostOrder, ba.data()); } return ba; } diff --git a/src/nfc/doc/qtnfc.qdocconf b/src/nfc/doc/qtnfc.qdocconf index 8b0ba092..61ed15b6 100644 --- a/src/nfc/doc/qtnfc.qdocconf +++ b/src/nfc/doc/qtnfc.qdocconf @@ -4,7 +4,7 @@ project = QtNfc description = Qt NFC Reference Documentation version = $QT_VERSION -examplesinstallpath = qtconnectivity/nfc +examplesinstallpath = nfc qhp.projects = QtNfc |