diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-03-23 16:34:48 +0100 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-03-24 14:27:32 +0000 |
commit | 4103cc487bb92c375fdf4c0b9ab064435320e0a5 (patch) | |
tree | 0b6ef0dccfb0b3e3211df2dfeb0d142c7dc13ef8 /src/bluetooth/osx/osxbtledeviceinquiry_p.h | |
parent | 0ae7051fbee32bc7bd2cbe452c78400ac7bb18d1 (diff) |
Bluetooth - LE device discovery agent, timer bug (OS X)
CBCentralManager does not have a timeout while scanning and we had
to use a delayed selector (via performSelector) to interrupt the scan. This is a bug in
the case we're in NSModalPanelRunLoopMode mode (for example) - selector
never gets performed (it waits for the default mode) or performed too late.
Found in our btchat example. Now we use external QTimer instead to
check if it's time to stop a scan.
Change-Id: I159bf5821398f3aa76f03a52a8334dea97cbf688
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/osx/osxbtledeviceinquiry_p.h')
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry_p.h b/src/bluetooth/osx/osxbtledeviceinquiry_p.h index 65005894..7e6d0c8f 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtledeviceinquiry_p.h @@ -36,6 +36,7 @@ #include "qbluetoothdevicediscoveryagent.h" +#include <QtCore/qdatetime.h> #include <QtCore/qglobal.h> #include <QtCore/qlist.h> @@ -88,8 +89,12 @@ QT_END_NAMESPACE bool cancelled; // scan actually started. bool isActive; + QTime startTime; } +// Inquiry length in milliseconds. ++ (int)inquiryLength; + - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth)::LEDeviceInquiryDelegate *)aDelegate; - (void)dealloc; @@ -99,6 +104,7 @@ QT_END_NAMESPACE - (void)stop; - (bool)isActive; +- (const QTime &)startTime; @end |