summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into ↵v5.15.4-lts-lgplTarja Sundqvist2022-04-075-11/+23
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I86f7492c32a43094f37cfb9b21ad1066aa49ba68
| * Always call setOpenMode before setSocketStateAndreas Buhr2021-03-233-6/+8
| | | | | | | | | | | | | | | | | | | | | | setSocketState emits signals and should thus be called last. I most code, setOpenMode is called before setSocketState. But in some occasions, setSocketState was called before setOpenMode. This patch introduces a consistent call order: setOpenMode before setSocketState. Change-Id: I07f33511c76fbd08c79050a3fcbc1e1dd72fff04 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 62da7abae76b78fdc9385a0d997f3483057cf37c)
| * Fix bug: Let QBluetoothsocket::close emit disconnected only onceAndreas Buhr2021-03-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QBluetoothSocket::close emitted "disconnected" twice on macOS. The first emit is by setSocketState(UnconnectedState). This patch fixes the behavior to only emit it once. Fixes: QTBUG-91164 Change-Id: I7147a28b40c49db947ee97a4f1a14f319da341d1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 2a6ab855c2a4ffc5253126d53bc667b0076dd9c9) Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Change tst_qlowenergycontroller to wait for disconnectsAndreas Buhr2021-02-262-0/+6
| | | | | | | | | | | | | | | | | | | | | | Many occurrences in tst_qlowenergycontroller exist where disconnectFromDevice() is called but the code did not wait for the disconnect to happen. This patch changes this. Change-Id: I1df4e68136b8a83640af1fc50298e559d983cc9a Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 180f895023f136a694738667a73674968964bafc) Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
| * Correct error handling in QLowEnergyControllerPrivateBluezDBUSAndreas Buhr2021-02-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a DBUS interface was removed for a device, error handling just assumed it was the org.bluez.Device1 interface, without checking. This lead to errors on disconnection if the device has a battery service: The code sends a disconnection request, then an InterfaceRemoved event for org.bluez.Battery1 occurs. This was interpreted as a removal of org.bluez.Device1 which in turn led to the controller going into UnknownRemoteDeviceError error state. This patch adds a check whether it is really org.bluez.Device1 which is removed. Change-Id: I449b29cb9528cda23ce972f36f716a8774f01fe5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit af5f801c6b8de0bf0d21798bddef54cb14759ecd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-24314-6461/+6461
|/ | | | | | | | | | | This reverts commit 0db3b38521e11147cb802798a2cb7811a96029a9. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: Ie82dac4e6a4e2e0e1207d17a10c09701871d6875 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Fix error handling in BlueZ connectToServiceHelperAndreas Buhr2021-02-122-5/+20
| | | | | | | | | | | | | | QBluetoothSocketPrivateBluezDBus uses asynchronous calls, then blocking waits for the result and then does error handling. The blocking wait was missed in one place, rendering the following error handling code dysfunctional. This patch adds the required blocking wait. Fixes: QTBUG-82407 Change-Id: Ia45372e3b6cce3617d6c985fe1800a33631bc0fc Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 7aa19c8a512fdceac12cf4ee6587626e3de61c25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add server role to BlueZ service registrationAndreas Buhr2021-02-121-0/+1
| | | | | | | | | | | | | | | In service registration, a profile is created. This profile had no clien/server flag. If two profiles with the same UUID are created (one for server side, one for client side) this led to the wrong profile being used in connection setup. This patch marks the profile which is created in registerService() as a server profile which prevents it from being used by BlueZ in a client context. Change-Id: I95b22657a7c7e45b334476a8513d79920ba9cc96 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit e74cb54a4cbc8aba188ea48ae3effcf10432df11) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2021-02-02314-6461/+6461
| | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtconnectivity. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in test. Task-number: QTQAINFRA-4159 Change-Id: Icf450df25282ffadf5bcd0950753d17ba6ab57e3 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* QLowEnergyController (Darwin) - restore the logic we had in 5.12Timur Pocheptsov2020-09-091-4/+9
| | | | | | | | | | | | | where serviceDiscovered was invoked via QueuedConnection and the controller was in the correct state for details discovery in case an application wants to discover details in the slot, attached to the serviceDiscovered signal. Change-Id: I3cbd0a0fa9913003d7b1c388a1c3653e04a505b0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 7ff8f2d0546262816ab94684a992428cc2cb8a9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move the check for relevant NFC intents to the MainNfcNewIntentListenerLars Schmertmann2020-07-312-4/+5
| | | | | | | | | | | | | | The MainNfcNewIntentListener registers itself in QtAndroidPrivate from qtbase to listen for intents. Every listener only needs to return true, if the intent contains expected data. This will cause QtAndroidPrivate to stop notify other listeners. So we need to move the check from QNearFieldManagerPrivateImpl::onTargetDiscovered to MainNfcNewIntentListener::handleNewIntent. Change-Id: Ib5001a4d3746782d7162e02a0ffeee6c370a8826 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 8bc3fb29cbc6a49fdff22915081d356d4d6abfa9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Emit requestCompleted only one time on AndroidLars Schmertmann2020-06-171-1/+1
| | | | | | | | | | | NearFieldTarget::sendCommand used handleResponse that delegates the call to setResponseForRequest with emitRequestCompleted = true. But sendCommand also emits requestCompleted by its own. Change-Id: I7121c6149e98af61eb27fc00504ffe12023eb4d4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 19d244a483b8c22f94b61c6a17e5d5d199050aa2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Make `Just Works` bonding really workKonstantin Ritt2020-06-041-0/+66
| | | | | | | | | | | | | | In case bond state has been changed due to access to a restricted handle, Android never completes the operation which triggered the devices to bind and thus never fires on(Characteristic|Descriptor)(Read|Write) callback, causing TimeoutRunnable to interrupt pending job, albeit the read/write job hasn't been actually executed by the peripheral; re-add the currently pending job to the queue's head and re-run it. Change-Id: Idd69c885a439a26e2819746d703a92778370e4ba Reviewed-by: Evgeniy Gagarin <eeiaao@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit b7b40e4222999be5eed5da3239886329c84bf731)
* Update connects to QSocketNotifier::activatedv5.15.0-rc2v5.15.0-rc1v5.15.0Mårten Nordheim2020-04-292-5/+5
| | | | | | | | The int-overload produces a warning Task-number: QTBUG-70441 Change-Id: I1c787e0a5852388d5a08630a51189f9c0661968e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15.0Qt Forward Merge Bot2020-04-273-19/+30
|\ | | | | | | Change-Id: Iab21a9155cd4b1cba4c65332fff02df9c149f57a
| * Fix the documentation for QtNFC in services on AndroidLars Schmertmann2020-04-081-2/+13
| | | | | | | | | | | | | | | | It is already possible to use QtNFC in Android services since Qt 5.9. Fixes: QTBUG-57646 Change-Id: Ib3d8a8101982cd9bf5e7c529d45491b49fede96d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * QLowEnergyControllerPrivateWinRT::connectToDevice: Return early if LE device ↵Oliver Wolff2020-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | cannot be found If the host does not support BTLE, connectToDevice will fail and mDevice will be zero. The return in this case was missing so that we tried to access a null pointer and caused an exception. Change-Id: Iba973f3980a2ecbb82d2cb6dd8d0f60a5bdf4890 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Android: Re-use `pendingJob` storage introduced by 962f282d21e62b8dKonstantin Ritt2020-03-241-16/+14
| | | | | | | | | | | | | | | | to make the code less error prone Change-Id: I429bf367c9d44f24356f4ee70c0f6045b0557604 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Android: Fix out-of-sync access introduced by 962f282d21e62b8dKonstantin Ritt2020-03-241-1/+2
| | | | | | | | | | | | Change-Id: Id45e5ed41bf97dc9940c5047e4e7a046e65d62bd Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta4v5.15.0-beta3v5.15.0-beta2Qt Forward Merge Bot2020-03-075-39/+152
|\| | | | | | | Change-Id: I037246140f5c52dde3335952d4bf77e43b1c3503
| * support building with clang and libc++Denis Pronin2020-03-051-0/+1
| | | | | | | | | | | | | | fixed undefined errno when compiling with clang++ and libc++ Change-Id: I30be6e2da36f9189261535f103ce689462634f49 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Also add a response for a request if reportError is calledLars Schmertmann2020-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | When using QNearFieldTarget::sendCommand on Android an exception can occur. In this case reportError is called and handleResponse is omitted. A call to QNearFieldTarget::waitForRequestCompleted will result in a full usage of the specified timeout, even if the exception occurred. To avoid this behavior also add an (invalid) response in reportError. Change-Id: Id80b7a97da5628d229b942803ec1a2fb13536d99 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix a race condition between a write and an incoming changeThiemo van Engelen2020-03-031-36/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android API that is available to write to a characteristic requires the user to first set the new value of the characteristic and then tell Android to write the value to the device. If the phone processes an incoming change for this same characteristic in between the setting of the value and the actual write, it could happen that the characteristic gets the incoming value and that incoming value is then sent to the connected device. Something similar could occur for the incoming change as the received value is not passed in the callback but it is set on the characteristic and the user is expected to read the received value from the characteristic. To prevent these problems, a new connectGatt function that takes a Handler as extra argument was added to SDK v26. The callbacks are then always executed via this handler and thus on the associated handler thread. If the user also performs all writes on this thread, the described race condition can no longer occur. This could have solved the problems, but Android 8.0 contained a race condition in the callback part because it set the value of the characteristic before passing the callback to the handler, still allowing the same race condition for incoming changed. This was fixed in Android 8.1. This commit causes the code to use a Handler and the new connectGatt function if it is running on SDK >= 27, which is associated with Android 8.1. For older SDK versions, a different solution is implemented. In this case, a temporary BluetoothGattCharacteristic is instantiated that can hold the value to be written. This way, the write can no longer interfere with changes that are being received. To instantiate the BluetoothGattCharacteristic, a private constructor is invoked using reflection. This private constructor is needed as only this constructor allows to create an instance that has the required information for Android to be able to write to the charatceristic (such as the associated service and instanceId). This is also the reason why this solution cannot be used on newer SDK's as this constructor is blacklisted and a warning box will be shown when reflection is used to get a reference to it. Because a temporary BluetoothGattCharacteristic is instantiated that holds the written value, it is necessary to store the value that was written and pass that in the callback. More information on these Android issues and solution direction can be found here: https://stackoverflow.com/questions/38922639/how-could-i-achieve-maximum-thread-safety-with-a-read-write-ble-gatt-characteris https://medium.com/@martijn.van.welie/making-android-ble-work-part-3-117d3a8aee23 Change-Id: I5a9eda501a20933e37f758a3114bf71ec3e7cfd4 Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Fix case of setupapi.h for mingw-w64Marius Kittler2020-03-031-1/+1
| | | | | | | | | | Change-Id: I9ddb290a10a620334abaf0500dd7b280e86b3a03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Support characteristic Write Without Response on BlueZ 5.50+Alex Blasche2020-03-031-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | BlueZ 5.50 adds support for this feature. This patch was provided by David Lechner via QTBUG-81696. Fixes: QTBUG-81696 Change-Id: I2a73b173821e36534b3848f7d0e35df16f118011 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-291-0/+2
|\| | | | | | | Change-Id: I5fe705f8a5f375ae44169a465515bb2c54cf6393
| * Android: Ensure that LE errors are forwarded from JNI to QtAlex Blasche2020-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to detect the error existed on the Java/JNI side. The code to handle and report the error was available on the Qt side. Unfortunately the essential signal and slot connection was never made though. This lead to [ChangeLog][QtBluetooth][Android] Fixed the missing QLowEnergyService::error() signal emission if the error was detected on the Java side. This probably cut 50% of all errors out. Change-Id: I6ee4d7605a1d1e61b920da56d7f67373fb7f5be5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-271-2/+2
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I2de4dcdb43a3ac6640f07fba463462e58fa16000 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Update plugins.qmltypes for 5.15Jani Heikkinen2020-02-252-2/+2
| | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: Ib0520ec5348f4bc2875f12514e56322a114c8018 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-223-9/+62
|\| | | | | | | Change-Id: Iea61654bd94c9bb4be0736a5d5512fb42d845488
| * Grant ACCESS_FINE_LOCATION to QtBluetoothAlex Blasche2020-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since Android 10(SDK v29+) all types of Bluetooth device discovery require ACCESS_FINE_LOCATION. This is highlighted by https://developer.android.com/about/versions/10/privacy/changes#location-telephony-bluetooth-wifi Fixes: QTBUG-81875 Change-Id: Icaecca1f72a994dc774dc2b90194da15cc0787b0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Ensure that a failing classic discovery doesn't prevent LE scanAlex Blasche2020-02-211-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the classic scan does not start properly we immediately error out. If the user has requested LE discovery in addition to the classic discovery, we should continue with LE discovery. By convention, we only bother the user with an error signal if none of the two methods succeed. Task-number: QTBUG-81875 Change-Id: Id867892210fbef6da0e4937c2aef20f726ba9a2a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Add location-turned-on check before starting device discoveryAlex Blasche2020-02-211-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The location permission and a running location service have been a prerequisite for a successful LE scan since Android v23. While the permission has always been checked before doing a bluetooth scan, the state of the location service was not checked. LE discovery without location turned on does not error out. It just reports zero discoveries. Starting with Android SDK v29, a classic Bluetooth discovery requires a running Location service too. Due to BluetoothAdapater.startDiscovery() returning an error code when location is turned off, it was time to check the location service before triggering the discovery to simplify the error handling for the API user. This patch ensures that location is turned on before any type of device discovery is started and the API reports an error reflecting this problem. Task-number: QTBUG-81875 Change-Id: Id51fd502ae24cbadbc704451fdf49d999224c16f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Catch turned off Bluetooth adapter when stopping LE discoveryAlex Blasche2020-02-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | Calling stopLeScan() causes a runtime exception. The patch prevents a crash due to the exception and progresses as if nothing has happened. An action that turned off the internal Bluetooth device has stopped a runnung discovery anyway. Fixes: QTBUG-67482 Change-Id: Iff377884c50cafa1f74dafe73e0acbb31b13e9bb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-152-15/+39
|\| | | | | | | Change-Id: I3d82c91d19f6caf5d5acad492b3531b098d1d256
| * winrt: Avoid possible hang in QBluetoothServer::hasPendingConnectionsOliver Wolff2020-02-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We have to unlock the mutex locker after the pending connection is handled in QBluetoothServerPrivate::handleClientConnection. Otherwise the application will hang, if the slot that is connected to QBluetoothServer::newConnection calls QBluetoothServer::hasPendingConnections as this functions also tries to lock the mutex. Fixes: QTBUG-81827 Change-Id: I40632d0c1e4a6cf4436f6471e5a0933c53dda9f1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: set proper state on service detail discovery failOliver Wolff2020-02-061-15/+38
| | | | | | | | | | | | | | | | | | | | | | If the service detail discovery fails, we do not only have to set a proper error but the service state also has to be set accordingly. Task-number: QTBUG-80770 Change-Id: I6abc28875c998b60efcfc513542765a52e19df90 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QBluetoothDeviceDiscoveryAgent/Windows: Fix deprecation warningsFriedemann Kleint2020-01-291-5/+8
| | | | | | | | | | | | | | | | | | | | Change the code merging the Uuid sets to use QVector, fixing: qbluetoothdevicediscoveryagent_win.cpp:546:58: warning: 'QSet<T> QList<T>::toSet() const [with T = QBluetoothUuid]' is deprecated: Use qbluetoothdevicediscoveryagent_win.cpp:548:54: warning: 'QList<T> QSet<T>::toList() const [with T = QBluetoothUuid]' is deprecated: Use values() instead. [-Wdeprecated-declarations] Change-Id: I0e0780ef0b120318fe356cd58113a746adeff8a5 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QLowEnergyController/Windows: Fix warning about ignored qualifiersFriedemann Kleint2020-01-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT by const BLUETOOTH_GATT_VALUE_CHANGED_EVENT *, fixing: qlowenergycontroller_win.cpp: In function 'void eventChangedCallbackEntry(BTH_LE_GATT_EVENT_TYPE, PVOID, PVOID)': qlowenergycontroller_win.cpp:521:94: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] reinterpret_cast<const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT>(eventOutParameter)); Fix the spelling error in the class name on this occasion. Change-Id: Idff4eba4ba8cac74002be9fa54594f96393fa3fa Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QNearFieldTarget: Fix deprecation warningFriedemann Kleint2020-01-291-1/+1
| | | | | | | | | | | | | | | | Use QBasicAtomicInteger::loadRelaxed(), fixing: nearfieldtarget.cpp:229:28: warning: 'T QBasicAtomicInteger<T>::load() const [with T = int]' is deprecated: Use loadRelaxed [-Wdeprecated-declarations] Change-Id: Id46694c459d6e0ce923ceccf48067347067e1756 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | QBluetoothDeviceInfo: Use a QMultiHash internallyFriedemann Kleint2020-01-293-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, this fixes the warning qbluetoothdeviceinfo.cpp:705:57: warning: 'QHash<K, V>::iterator QHash<K, V>::insertMulti(const Key&, const T&) [with Key = short unsigned int; T = QByteArray]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations] Returning a QHash still works in Qt 5 due to the inheritance. In Qt 6, the return type needs to be adapted since QMultiHash and QHash will be split. Change-Id: I876fce5d61cacdc84db5b9f72b78ee7608385c6c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-286-11/+16
|\| | | | | | | Change-Id: I8b1897b0c5254604c5720c7dd08362493a7ca4bc
| * Merge remote-tracking branch 'origin/5.14.1' into 5.14Qt Forward Merge Bot2020-01-276-11/+16
| |\ | | | | | | | | | Change-Id: I0c9cb5225aea489c789a4e40abd164bebff0c73d
| | * Fix up broken PropertiesChanged connectionsv5.14.1Alex Blasche2020-01-146-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change b7b979d1735764930cc6f736cfa8e22b71547ea8 introduced a slightly modified version of the OrgFreedesktopDBusPropertiesInterface::PropertiesChanged signal. This signal was taken into use in one case but all other instances of this signal were not modified and broken. This patch modifies the remaining cases and converts the connect statements to function pointer syntax. This forces the compiler to check that signal and slot parameters match. Change-Id: I41b45f7e2f7b66ff29f321acc38ff2ce1c81864e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thiemo van Engelen <tvanengelen@victronenergy.com>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-181-2/+2
|\| | | | | | | | | | | Change-Id: I4579c24569c9d30896026703df85cb3eeafa945d
| * | Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-171-2/+2
| |/ | | | | | | | | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: I79bf1dc18c45dbdfe6e246e396adcf856dfee63f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-141-1/+3
|\| | | | | | | Change-Id: I2906aaa474060889fa2dfb6243932d280360f0a9
| * Android: Fix failing re-addvertisement of BTLE service after disconnectAlex Blasche2019-12-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The BTLE server can disconnect by own choice and by remotely initiated disconnect. Often the app might want to readvertise the same service right after the disconnect. Such a readvertisement fails when the BluetoothGattServer instance is not recreated, before calling BluetoothGattServer.addService(). In the case of remote disconnects we never recreated the BluetoothGattServer instance therefore the readvertisement always failed. This patch fixes the issue by ensureing the previous instance is properly discarded. Change-Id: I39380ee6f1f39bd71a5b73ec82bb786b3e199665 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-075-19/+33
|\| | | | | | | Change-Id: I4fb1628743f0e4fe6042e49efa27a7b6b8f68e5b
| * Fix warning in QBluetoothServer on LinuxAlex Blasche2019-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from qbluetoothserver_bluez.cpp:41:0: qbluetoothserver_p.h: In constructor ‘QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol, QBluetoothServer*)’: qbluetoothserver_p.h:128:29: warning: ‘QBluetoothServerPrivate::m_lastError’ will be initialized after [-Wreorder] QBluetoothServer::Error m_lastError; ^~~~~~~~~~~ qbluetoothserver_p.h:125:23: warning: ‘QBluetoothServer* QBluetoothServerPrivate::q_ptr’ [-Wreorder] QBluetoothServer *q_ptr; ^~~~~ qbluetoothserver_bluez.cpp:69:1: warning: when initialized here [-Wreorder] QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType, ^~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I4fca28f8f2974cb6a336b6fac1e06469edceb80c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>