Compile time checks (SDK version) are not sufficient, add runtime checks
also.
Change-Id: I4214d0a32544883d07da06a2ce2db24ea42678cf
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Add runtime version checks, compile time can be not enough.
Change-Id: If59131b3a9039a7fe15ccba0346fa71d58f36736
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Add OS X version check, compile time check is not enough if Qt is built
for older versions.
Change-Id: Ieebd3f05f0fd9942516ea1d9b40ee929905cb799
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Add runtime checks, compile time is not enough.
Change-Id: I1821c9718d4e4af1e2d7989bd1ee7a1f11d5c051
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Compile time check of SDK version is not sufficient if Qt is build
for older device.
Change-Id: I0e4d0baf903c6291e67462890107b0e5cc30e7c4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Add notes about handles on OS X and iOS and their meaning(less).
Change-Id: I61fda1de27d194bd904b88536c180a2acf376690
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
In certain situations internal java objects of QBluetoothSocket
cannot be deleted fast enough. This causes a crash when the local
reference table exceeds its maximum size of entries.
This patch converts the pure JNI code to a QAndroidJniObject based
version. It ensures faster cleanup of local jobject references
and improves readability too.
[ChangeLog][Platform Specific Changes][Android] Fixed leaking
of java objects when calling QBluetoothSocket::connectToService() on
Android.
Task-number: QTBUG-44164
Change-Id: Iaa696bfeee69c6a79f3aeddec262ae34d8891743
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
There have been no new additions in Qt 5.5 so far.
Change-Id: Ib6c0d7b333bba327942fc48737f9762079062e7b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
NearField QML type introduces a new revision which must be registered.
Change-Id: Icc8499380babff5060548c1d25bd9cd67c5229df
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This enables proper versioning.
Change-Id: Iae3e54ed91a7fa78ba6b978cb4c5194f4e1e105a
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
The required API became public in Android v19 which is what was used as
check so far. However the same API was already privately provided
since Android v15. THis patch ensures that older Android versions
can create pairing requests too.
This patch was provided by George Najarian.
Task-number: QTBUG-43757
Change-Id: I0f38e538a972341a6acf719098f1010e52b639b7
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
The example immidiately destroys the QBluetoothServiceDiscoveryAgent
when the user selects a remote chat service from the remote selector
dialog. This may happen even when the scheduled QtConcurrent call
to runSdpScan() was still pending. The subsequent signal callback into
the deleted parent caused a crash.
Unfortunately QtConcurrent::run() returns a QFuture which does not
permit stopping the pending thread execution. Therefore the runSdpScan()
had to be rewritten using QProcess to properly destruct pending
calls.
Change-Id: I1ed5e147feb94a26240901a02d836056eddabbf6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This reduces the number of registration calls since a
QBluetoothTransferManager is created once or twice whereas
multiple QBluetoothTransferReply instances are common.
Change-Id: I14bc636cb91d9bd399d8dae55140808ec6bf7fe5
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This is much safer and cleaner.
[ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE
added for QBluetoothServiceDiscoveryAgent::Error,
QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and
QBluetoothDeviceInfo. This breaks source compatibility if application
code has defined the above metatypes already. The applications
Q_DECLARE_METATYPE must be removed to fix the compile error.
Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
With -no-c++11,
- Enum type names cannot be used as namespaces. Use old style naming.
- For errno, errno.h must be included.
- stdint.h must be included to use uint*_t types. Use quint*
equivalents instead.
Change-Id: I992f531a46cfc997df0aa6fc7ff6bf75fb750fc6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Workaround for CoreBluetooth's limitation (no addresses, only 'uuids').
Change-Id: I9ab83a403d4643df11320185eb473818ef798d70
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Based on Bluetooth spec Vol3 PartB 5.1.7 the BrowseGroupList consists
of a data element sequence. The current approach was not correct.
This was discovered because Bluez5 doesn't add a custom service to the
Extended Inquiry Response (EIR) unless it is in a sequence. If the
service is not part of the EIR other platforms such as Windows report
an error or won't simply see the service.
This was not a problem when using Bluez4 because it was more
tolerant towards such mistakes and added the custom service to the EIR
anyway.
Task-number: QTBUG-43806
Change-Id: Ib0ca59005c940249fb6aefd8ecafe5b2ceff3878
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Invalid request implies that the platform doesn't support writing
of NDEF messages. This case does not trigger an error() signal though.
That's why we have to trigger the error handling code manually.
Change-Id: I0b95fddfe30052f1c7baa566ebc099998854146d
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
The write operation has to be delayed since neard isn't able
to write to tags immediately after tag detection.
Change-Id: I177cc700d0688e23909b9b2751a0d11f163a5499
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
It becomes more obvious on platforms which do not support Bluetooth
that the example will not work.
Change-Id: Ia6d249a4a891f93abf29910500ba164662308889
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Q_FUNC_INFO in messages/(Q)asserts.
Change-Id: I12285bf97ac766964b656090980858f3fd5de2da
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Replace handwritten function names with Q_FUNC_INFO.
Change-Id: Ia12728eb53dc63ac1ca0d2a76bbf2baa06db0ea0
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Use Q_FUNC_INFO in asserts/messages.
Change-Id: Ic8659a8e2ea427a53ba4d1308ab9f2e7b6fbf939
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Use Q_FUNC_INFO instead of handwritten 'signatures' in asserts/messages.
Change-Id: I639b4293b86120ddc260d3c9e85fd50340afbf60
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Use Q_FUNC_INFO in asserts/messages.
Change-Id: Ie766016a36c3cc47d4561a74ed8bf179357a19df
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Use Q_FUNC_INFO in asserts/messages.
Change-Id: I2d9429cff0b1cd5d28a04fe50328289a891d04f5
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Change-Id: I09f087d84641447fcb5e9e906f3d665ed86102e3
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
So far, Size, Action and MimeType were not read when detecting a
smartposter tag.
Change-Id: Ica283eac8248ef5ed73f8538eac76050b1310eef
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
We need to write the entire URL and not just the path which would
be empty in cases such as http://www.qt.io.
Change-Id: I3529e200088cc9192fa16626cb21fffcca7f26c5
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
1.) The z order of the sticky notes and the corkboard image
was totally off. Most likely this is due to a bug in QtQuick's
ListView implementation. Now we have a strict parent child relationship
which seems to work.
2.) The tag content was always empy. This was due to incorrect usage
of QML NdefRecord API usage.
Change-Id: I67e9e42e842f1cb051ef62d481b99b3c7b97718c
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Change-Id: I7c6127b6f941bd5623cb6e01bd9db9063afaedd6
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
All examples have used message handler registration so far. That's
not always supported on all platforms. Neard is one of those
platforms against which this this was verified.
This patch converts some examples to use manual target detection
if handler registration fails.
Change-Id: Icfd8b7c695e63351a45b867fd69e9fc5fefb9360
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Change-Id: I704d0f10f152b0ac23175728e3e15b6e43d48793
Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Fix asserts/messages to use Q_FUNC_INFO + fix .pro file not to
print 'unsupported platform'.
Change-Id: Iac33812212643229195a504d44c15bf9a56d16ba
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Ajust the test to make it also work with Core Bluetooth:
with Core Bluetooth we do not have device address, we have only
uuids (Apple's unique NSUUIDs generated for LE peripherals),
this patch mainly addresses this issue - controller has to be
created with LE device info, not QBluetoothAddress.
Change-Id: I236cd55bfc41a8333fce663fb3b780ee219f8cec
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Get rid of all 'hand-written' function/method signatures in qCWarnings
and Q_ASSERTS, use Q_FUNC_INFO instead. Fix error function for
characteristic/descriptor write errors - remove unused parameter.
Change-Id: I4f3f7c6c6a06802135f47a4b5cbb7c4313af4f34
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
While writing with response, Core Bluetooth does not
update characteristic/descriptor values in write notifications.
I have to 'cache' this values and report them back.
Also this patch fixes minor bugs in '-performNextWriteRequest':
while handling errors it's not enough just to call 'performNextWriteRequest:'
again, it must be in return statement or followed by 'return'.
Change-Id: I6e7ab7fe6f63ea84268bf6c7ea67e2939d524f91
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Several problems found by qlowenergycontroller auto test:
- Core Bluetooth in its didWriteCharacteristicValue callback
does not have this new updated value, but the old one,
to avoid additional characteristic read I have to cache this
value in writeCharacteristic and report it later from the callback
as it's already done for client characteristic configuration.
- writeDescriptor with state != ServiceDiscovered (can happen after disconnectFromDevice)
should set an error.
- setNotifyValue did not check that value has the wrong length ( > 2 bytes) -
this also should be an error.
- Fix a key mismatch - in setNotifyValue remember descrptor's handle, not
the characteristic's handle.
- Remove annoying qCWarnings from didUpdateNotifyValue - it happens
very often that we set this value in 'automatic' mode, without 'writeDescriptor'
request.
Change-Id: If3955f0e1364587b96403d23f2f8da28e6723e87
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>