summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Do not handle PAIRING_VARIANT_PINAlex Blasche2019-07-173-13/+11
| | | | | | | | | | | | | | | The user has to enter a pin in such cases. Since QBluetoothLocalDevice does not have an API to return a pin it makes no sense for QtBluetooth to handle this type of request. Android will provide its own fall back form. This patch is mostly a revert of f8c0572ddcd. Fixes: QTBUG-76565 Task-number: QTBUG-70295 Change-Id: I61062ac84ce508f3b82c7359a60d5c9c5bba86a4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Do not try to delete nullptr workerOliver Wolff2019-07-171-3/+1
| | | | | | | | | | | When calling QBluetoothDeviceDiscoveryAgentPrivate::stop the worker pointer is cleared in disconnectAndClearWorker so there is no need to call deleteLater (which will just result in a warning). Change-Id: I2713474833b61a12018ecfa6f9eb11618ed025a7 Task-number: QTBUG-75089 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix compilation with C++20Marc Mutz2019-07-161-2/+2
| | | | | | | | | Implicit capture of 'this' in [=] is deprecated in C++20. Fix by using explicit capture. Change-Id: I96132d83d87ae61986ba1b1ea3f9cf8e50059f1f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Core/IO/Bluetooth - fix ambiguous conversionsTimur Pocheptsov2019-07-053-8/+8
| | | | | | | | | | ... somewhat prospective fix (I do not have the new iOS yet), so far build never failed with my current SDK. Fixes: QTBUG-76847 Change-Id: Iab75c3cd47144cd83b679b1dbf82339e29c07bd1 Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* BlueZ: Fix leaking client socket when running QLEController Peripheral modeAlex Blasche2019-05-082-0/+11
| | | | | | | | | | | | | In fact there are two socket leaks. The first is the socket for the incoming l2cp connection from the central device and the second one is allocated in the ctor of QBluetoothSocket. When QBluetoothSocket::setSocketDescriptor is called the previously ctor allocated socket was simply ignorred. This patch closes both socket. Fixes: QTBUG-75278 Change-Id: Ia483e3c2a04bec3a53ddf744c22b794941edf848 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Bluetooth: Compare the server channel when checking for duplicatesAndy Shaw2019-05-101-1/+2
| | | | | | | | | It is possible that the service will appear to be the same but have different server channels. So these services should not be seen as duplicates as a result. Change-Id: I36f9c376fcfd9378f4f18c639e87e1a7aad1815b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* CoreBluetooth: add a missing -peripheral:didModifyServices: methodTimur Pocheptsov2019-04-164-0/+43
| | | | | | | | | | | | | | | | | With some peculiar device we suddenly (during the service details discovery) got a crash with CBDescriptor suddenly becoming something else - NSString, NSMutableArray etc. - meaning the object was deleted and its memory re-used. It would appear, CBPeripheral can suddenly change it's services tree and it informs its delegate (aka 'us') about this change using the (previously) missing method. In this method we cannot do much, due to the specificity of our public API that allows concurrent discoveries, it's 'non-monolitic' (in several steps) discoveries etc. etc. So the only thing we can do - stop everything, remove all services, transition to QLowEnergyController::ConnectedState and wait for a user to re-discover services. Fixes: QTBUG-75043 Change-Id: Ie98d90aea112e40b4c6771e3f7315772dfd92b39 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Fix reading of descriptor valuesOliver Wolff2019-04-151-8/+12
| | | | | | | | | | We have to access the service data instead of relying on passed references as these references might have run out of scope and thus might not be valid any more. Fixes: QTBUG-75070 Change-Id: I02ad0fef2337488c926fb950ddf2da6eda56a396 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Don't create QBluetoothServiceInfo when uuid is nullAlex Blasche2019-04-121-1/+4
| | | | | | | | Sometimes Android returns a null uuid as SDP result. There is no point processing them further. Change-Id: I07b52e79a31becda72452e3446aca9ea4933968b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Android: Don't filter SPP uuidAlex Blasche2019-04-121-11/+12
| | | | | | | | | | Even though it is not recommended to listen on reserverd BT UUIDs, there are SPP services which do not advertise with a custom uuid or the custom uuid is not an SPP service. In such cases we want a BluetoothServiceInfo instance that advertises SPP as serviceUuid(). Change-Id: Ic54d663392f8f8b2ba5684c57216bf2b69aca477 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Streamline QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServicesAlex Blasche2019-04-101-32/+33
| | | | | | | | | The changes are of cosmetic or code optimization nature. The functionality is not changed at all. Change-Id: Ideb63d87ed07201024b73e2f40d33393b68963bc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Android: Increase chance of establishing serial connection w/o SPP uuidAlex Blasche2019-04-102-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | SDP discovery on Android only returns a flat list of uuids. It mixes service class uuid and service uuids. Furthermore it is unable to detect whether a serial connection uses rfcomm or l2cp as base protocol. The last limitation is the fact that serial sockets can only be established using rfcomm (no l2cp). This poses a serious challenge because there is no way to say whether a given custom service uuid is indeed an SPP based service or whether it uses rfcomm. The only way to know for sure is to connect and check whether it succeeds. This also means QBluetoothServiceInfo instances returned by QBluetoothServiceDiscoveryAgent may or may not mark a serial service with SPP uuid or rfcomm protocol tag. Currently, it guess that that a custom uuid together with SPP uuid implies an rfcomm setup. If the SPP uuid was not found, rfcomm is never set (but is a requirement for QBluetoothSocket). This patch makes QBluetoothSocket on Android a bit more forgiving by assuming every given QBluetoothServiceInfo instance requires rfcomm. After all that's the only supported protocol on Android. Fixes: QTBUG-75035 Change-Id: I498ac5acd2a394b198a113fd23d750bbf17a7f7b Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix clang-cl errors about narrowing conversionsKai Koehne2019-04-081-1/+1
| | | | | | | | | | | | | Force value to be a DWORD (unsigned long) instead of HRESULT (signed long). Fixes bluetoothsocket_winrt.cpp(770,10): error: case value evaluates to 2147952460, which cannot be narrowed to type 'long' [-Wc++11-narrowing] Change-Id: I4f1eb75807d4783b835094ad1b33e56f601ffb39 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Use QAndroidJniExceptionCleaner instead of QAndroidJniEnvironmentBogDan Vatra2019-04-051-11/+4
| | | | | Change-Id: I357091799f04a3ef1c8df78960eb63a46e2b3d6c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix possible leakBogDan Vatra2019-04-051-2/+1
| | | | | Change-Id: Ide883a3c354eb42ea0017e1d623843967b522083 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Check the reverted UUID when filteringBogDan Vatra2019-04-053-25/+33
| | | | | Change-Id: Idb12d3bb116d6c5b34f1ca145f473b118b58d5ee Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Ensure DBus based QBluetoothSocket emits bytesWritten() signalAlex Blasche2019-03-251-0/+2
| | | | | | | | | [ChangeLog][QtBluetooth][Linux/BlueZ] Fixed missing emission of QBluetoothSocket::bytesWritten() signal on Bluez v5.46+. Fixes: QTBUG-74513 Change-Id: I93cb5abe65e13f6a5cc5bb195cc98526a507916a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qlowenergycontroller_android_p.h: Remove unrelated preprocessor blocksOliver Wolff2019-03-251-16/+0
| | | | | Change-Id: I964806ccdb3bd39a33b860d496ef05f8b96135db Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Address compile error on gcc 4.8Alex Blasche2019-03-193-6/+12
| | | | | | | | | | | | | | | | This partly reverts b3b387698e8f685e8bd4f4843a170da40e17249b. The global static connect was not correct. Furthermore the new global static variable was triggering src/nfc/qnearfieldtarget_emulator_p.h:125:31: warning: 'globalTagActivator' defined but not used [-Wunused-variable] The global static variable is shifted to no longer require exposure inside the header file. Fixes: QTBUG-74538 Change-Id: Ic5e8211d358bae9c2ed0418aec5c4316fb249c98 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* LE/Android: add consistency check in method called from Qt APIKonstantin Ritt2019-03-191-0/+3
| | | | | | | | Call to includedServices() from Qt side after unexpected disconnection leads to NullPointerException due to unchecked member access. Fix that! Change-Id: Iae89801d7af86d5a3f34ebba9eb2ea12da252cd2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bluez-DBus: Fix crash at calling disconnect while not connectedChristian Wassmuth2019-03-051-0/+3
| | | | | | | | | | | Calling disconnectFromDevice() while not connected or in ClosingState caused a crash on accessing device which is null. [ChangeLog][QtBluetooth][Bluez-DBus] Fix crash at calling QLowEnergyController::disconnectFromDevice while not connected Change-Id: I5979e3e5fca62c4a1469014e4f553c7db24f8dac Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Ensure signed int are written in base 10 notationAlex Blasche2019-02-151-3/+3
| | | | | | | | | | | The code was converting signed ints/chars/shorts to hex notation without prepanding the '0x'. This led to Bluez reading the value as base 10 value and created the problem that values containing letters were improperly parsed. Fixes: QTBUG-73330 Change-Id: I9407a82495761b2e541e13b282ad6ccdb7cdd84a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Cleanup QBluetoothServiceInfo xml stream writer on BluezAlex Blasche2019-02-151-11/+3
| | | | | Change-Id: Iad66628307a2167cdd6c64080457c670697bd1f7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Ensure SDP records can be byte arrays/hex encodedAlex Blasche2019-02-154-33/+60
| | | | | | | | | | | | | | This addresses the issue on Bluez only. macOS ignore such attribute values and WinRT implicitly converts them to hex strings. The macOS debug stream operator produced slightly different output compared to the other platforms. The output between the platforms must match though. Therefore, the general version was copied over to macOS. Task-number: QTBUG-73328 Change-Id: Ieea2a3a559b5686f7f7d16d5c75dd9ef2782cdf5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix unit test failure on AndroidAlex Blasche2019-02-081-11/+31
| | | | | | | | | | | | | | | | | | | | | It fixes the following failure FAIL! : tst_QBluetoothServiceDiscoveryAgent::tst_invalidBtAddress() Compared values are not the same Actual (discoveryAgent->error()) : InvalidBluetoothAdapterError Expected (QBluetoothServiceDiscoveryAgent::NoError): NoError This behavior was caused by the fact that the InvalidBluetoothAdapterError was already triggered in the QBluetoothServiceDiscoveryAgent ctor whereas convention for this class states that the error is set when QBluetoothServiceDiscoveryAgent::start() is called. The fix detects whether the requested local adapter address matches the existing local adapter address. If there is no match Invalid adapter error is thrown. Task-number: QTBUG-73571 Change-Id: I3216e1609820a66893768b33f0fc695fbad6966a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add Android exclamation to QBluetoothServiceDiscoveryAgent ctor docsAlex Blasche2019-02-081-0/+5
| | | | | | | | | Passing the local address does not work because the passed address cannot be matched against the local adapter address. For privacy reasons this is not possible anymore since Android 6.0. Change-Id: Iacc632dda4af83265bdc3a062c0eba6c31cfa596 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix potential bug in osxbtcentralmanagerTimur Pocheptsov2019-02-081-1/+3
| | | | | | | | | | Similar to the problem found in osxbtleinquiry - 'timers' waiting to fire on "qt-LE-queue" know nothing about us, potentially deleting the delegate object in response to Bluetooth switched off. Task-number: QTBUG-73140 Change-Id: I1a39a1ca02d019f90a1b4214cdbbb76e26b9eea0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bluetooth LE scan - fix a crash (CoreBluetooth)Timur Pocheptsov2019-02-071-30/+57
| | | | | | | | | | | | | | | 1. When the central's state changes to powered off, we emit PoweredOffError and QBluetoothDeviceDiscoveryAgent deletes Obj-C instance - a delegate for CBCentralManager. But we can still have GDC timer waiting in a queue and triggering the crash while using a dangling pointer. So we have to properly cancel the timer. 2. CoreBluetooth under debugger warns about API misuse - calling stopScan, apparently, is not allowed if CBCentralManager is in a state different from 'powered on'. Change-Id: Ib218105735995dc7988751fa04a6c76cab10cba8 Fixes: QTBUG-73140 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Fix link error to \macosNico Vertriest2019-02-071-1/+1
| | | | | Change-Id: I82d691667232bebf7fed2cf9b24b234289e6d258 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* LE/Android: fix crash when destroying DiscoveryAgent during scanKonstantin Marchenko2019-01-252-0/+6
| | | | | | | happens due to accessing already destroyed receiver from the queued call Change-Id: Ibc4a9abbb8c00ef9c8985f481b70db36fa508df8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* LE/Android: trivial typo fixesKonstantin Ritt2019-01-251-2/+2
| | | | | Change-Id: I2202fa305f4c50e97ae7701096b2f8e0bb9b3daf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Check for system feature PackageManager.FEATURE_NFCAndré Klitzing2019-01-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method enableForegroundDispatch and disableForegroundDispatch is not implemented on some WearOS devices and will throw an exception. Let's check if the NFC feature exists. java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegateMethod(QtApplication.java:157) at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegate(QtApplication.java:146) at org.qtproject.qt5.android.bindings.QtActivity.onResume(QtActivity.java:626) at com.governikus.ausweisapp2.MainActivity.onResume(MainActivity.java:139) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355) at android.app.Activity.performResume(Activity.java:7117) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1638) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.UnsupportedOperationException at android.nfc.NfcAdapter.enableForegroundDispatch(NfcAdapter.java:1315) at org.qtproject.qt5.android.nfc.QtNfc$1.run(QtNfc.java:135) at android.app.Activity.runOnUiThread(Activity.java:6184) at org.qtproject.qt5.android.nfc.QtNfc.start(QtNfc.java:111) at org.qtproject.qt5.android.QtNative.updateApplicationState(Native Method) at org.qtproject.qt5.android.QtNative.setApplicationState(QtNative.java:260) at org.qtproject.qt5.android.QtActivityDelegate.onResume(QtActivityDelegate.java:1098) ... 16 more See: https://stackoverflow.com/questions/48437854/huawei-watch-2-nfc-feature-not-available-android-wear-2-0 Change-Id: I0e2cad3dce1c3c0a2ea2545fcc6731e2621cdc38 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Ensure custom uuids are returned by QBluetoothServiceInfo::serviceUuid()Alex Blasche2019-01-091-1/+17
| | | | | | | | | | | | | | | | | | QBluetoothServiceDiscoveryAgent::start(FullDiscovery) uses an external tool called sdpscanner to perform the SDP inquiry. The tool uses Bluez's own API to perform the task and is GPL. In case a remote device offers a custom service the service uuid is returned as serviceClassUuid. QBluetoothServiceInfo::serviceUuid() remains empty although it should be populated as per API contract. This patch ensures that the first custom uuid is shifted from the serviceClassUuid list to serviceUuid(). The fix is limited because it picks the first custom uuid and does not consider a secondary custom uuid. Such a case is extremely unlikely though and I have not come across it. Fixes: QTBUG-72800 Change-Id: I7256440bcb1c9b0b2fb75249f977c43fecf1d910 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Don't reverse uuids which are derived from Bluetooth's base uuidAlex Blasche2019-01-081-1/+1
| | | | | | | | The related bug only happens for custom uuids. Fixes: QTBUG-72681 Change-Id: I22d87b84bf3958ecce9b6020e3323f1e6c6a9255 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add missing dbus registrations and change documentationAlex Blasche2019-01-042-2/+9
| | | | | | | | | | | | | | | | | | | | | | Qt DBus registration for Bluez specific types was done by isBluez5(). However Qt 5.12 introduced bluetoothdVersion() which is a bit more precise. It became necessary because runtime decisions based on exact minor release versions of Bluez became necessary. Therefore some code paths (depending on the user's use case) never called isBluez5() anymore. Subsequently the dbus registrations were missed out on. In the future isBLuez5() should be replaced by bluetoothdVersion(). QBluetoothSocket changed its underlying implementation when addressing QTBUG-68550. It uses dbus sockets to establish rfcomm socket connections to remote devices. The QBluetoothSocket::connectToService() overload that expects a port number is no longer possible as Bluez DBus API does not support connection establishment based on port numbers. Fixes: QTBUG-72742 Change-Id: If6adb391b0524cabc3a702d761e0cbd263508396 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CoreBluetooth - fix warnings ('-Wobjc-interface-ivars')Timur Pocheptsov2018-12-1820-98/+97
| | | | | | | Move all i-vars into implementation part of declaration. Change-Id: I9ee71bc85308d899871dc680d438c504e591b091 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix broken timeout handling in osxbtcentral managerTimur Pocheptsov2018-12-185-101/+136
| | | | | | | | | | | Trying to do several things (for example, discovering chars on several services) in non-sequential manner is allowed but will result in the broken 'object under watch' logic and thus a failure to report some operation finished. Task-number: QTBUG-72487 Change-Id: I9674f93e0c4d5cbfd50ac2f828d0d650031e056c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* GCD timer - refactor and fix warningsTimur Pocheptsov2018-12-175-29/+70
| | | | | | | | | | | 1. We move the logic 'object we are watching after and the query's type' into the GCD timer, since we'll need several timers in osxbtcentralmanager (and after all it's not a timer really, it's 'a timeout watchdog' more like. 2. Move i-vars into the implementation to suppress compiler warnings. Task-number: QTBUG-72487 Change-Id: I090e4cc2e0e747211aae8ec91c4e0ff4a53f570b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix use of the wrong constant: m_maximum should be INT_MAXThiago Macieira2018-12-121-1/+1
| | | | | | | | Found by ICC: warning #68: integer conversion resulted in a change of sign Change-Id: I4ac1156702324f0fb814fffd156f81e163e3d4d2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* qnearfieldmanager_emulator: Use Q_GLOBAL_STATIC for tag activatorOliver Wolff2018-12-063-12/+6
| | | | | | | | | | | Using a Q_GLOBAL_STATIC here fixes an issue in the auto tests for winrt. If we use a static object that is created before the QCoreapplication has been created, TagActivator's timer will complain, that it was not created inside a QThread. By postponing the creation until first usage we can avoid that problem. Change-Id: I9beca89930bfca2c71e0fce3d9c000dfcb71f431 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Prepare tst_qnearfieldmanager for configurations with builtin_testdataOliver Wolff2018-12-061-0/+4
| | | | | | | | We have to add relevant test data to TESTDATA and use them from the created qrc file. Change-Id: I72ed86e09caf518f3f1b830ab4fec104a81313e6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QQmlNdefRecord: port to QRegularExpressionSamuel Gaist2018-12-031-3/+3
| | | | | | | | | This patch updates the QQmlNdefRecord code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: Ibfbab39ca84f9e89d6f6bd2e15000359a4218234 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix compilation with gcc 4.8Ville Voutilainen2018-12-031-1/+0
| | | | | | | GCC 4.8 doesn't like duplicate friend declarations. Change-Id: I2ec48ca7415b9fd7fe1c24f390519833b7d1f0aa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Android: Emit deviceDiscovered before deviceUpdatedAndrew Dolby2018-11-211-11/+19
| | | | | | | | And continue to update device info when continuous scanning (lowEnergyDiscoveryTimeout <= 0). Task-number: QTBUG-46008 Change-Id: I019c540205ae39c60deac165def7d0da572ae291 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Small code cleanupOliver Wolff2018-11-161-2/+1
| | | | | | | | Remove unnecessary break and correct one of bufferFromAttribute's return values. Change-Id: I6d4d74318f2eee1ed89f2e2f95909978fd8b4733 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Clarify situation of ServiceClassIds and ProtocolDescriptorListOliver Wolff2018-11-161-0/+4
| | | | | Change-Id: I355f7b5d83b925af785a35ca27cc0943f346665e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Document necessity of pairing devices before discoveryOliver Wolff2018-11-161-0/+3
| | | | | | | | Prebuilt packages do not use the newer BTLE backend so by default BT devices have to be paired before they can be found on Windows. Change-Id: I128b319b95c49ec8eab4a221927712bae5253327 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* qbluetoothlocaldevice_p.cpp: Make sure d_ptr is initializedOliver Wolff2018-11-152-25/+10
| | | | | | | | | | | | Backends that still use qbluetoothlocaldevce_p.cpp (namely ios and winrt) overload QBluetoothLocalDevicePrivate::isValid. While it does not make a difference for ios (as false is returned if no d_ptr is initialized) local device will be seen as invalid on winrt if there is no d_ptr. Fixes: QTBUG-67090 Change-Id: I82dfa4563be0ed4800f0a8dd2a9ccfc3fe313e3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Ensure QObject context is retained to avoid crashesv5.12.0-beta4Alex Blasche2018-10-315-17/+20
| | | | | | | | | | | If the public class is deleted pending lambda invocation can cause crashes unless QObject context is provided. This fixes a regression introduced by 819bb06c2cb3372cb1bb9ddd7f3a504f78d3452d. This was discovered while investigating QTBUG-71479. Change-Id: I3a49916ce6d9425c684863bb0b04a10bd3e652b9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix regression not updating the device info during BTLE discoveryAlex Blasche2018-10-311-1/+1
| | | | | | | | | | | | | This is a regression introduced by 819bb06c2cb3372cb1bb9ddd7f3a504f78d3452d. The object context was missing and subsequent calls to QObject::sender() failed. As a consequence the signalling for the device updates never happened. Fixes: QTBUG-71479 Change-Id: I6f057912a9321969b59ded8b0a3e5602653e5f2e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>