Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1
-
None
-
* Fedora 26 64 bit
* Qt 5.9.1
Description
An attempt to call the unpair request like:
QBluetoothLocalDevice::requestPairing(address, QBluetoothLocalDevice::Unpaired)
blocks within some seconds in case e.g. the obex session is active (in my case I periodically read a phoneboock asynchronously, using the separate DBus API). That leads, e.g. to freesing of a QML ui in an unpairing process.
E.g. this pseudo-code prints out:
static QElapsedTimer et; Foo:Foo() { connect(localDev, &QBluetoothLocalDevice::pairingFinished, []() { qDebud() << "Elapsed in slot:" << et.elapsed; } } void doUnpair() { et.start(); localDev->requestPairing(QBluetoothAddress(deviceAddress), QBluetoothLocalDevice::Unpaired); qDebug() << "PAIR: elapsed in end" << et.elapsed(); }
PAIR: elapsed in slot 2487 PAIR: elapsed in end 2498
As can be to see, the function is locked on ~2.5 seconds.
I mean, that requestPairing() should be asynchronous anyway in any case!