Commit Graph

1198 Commits

Author SHA1 Message Date
Alex Blasche 6909acfd09 Add changelog for 5.6.1 release
Change-Id: If81642830835e45a7465d9872413d1e94953319e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-19 05:56:21 +00:00
Alex Blasche 300c8b03d8 Fix iOS compilation
Fix missing symbol problem on iOS and Android.

Change-Id: I055e0b9db8757ab0e92c640736e9bdb9de48e726
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-19 05:56:16 +00:00
Topi Reinio 711e67b2ef Doc: Remove repository name from examplesinstallpath
Examples in binary packages now directly match the install path.

Change-Id: I8fc41af85033c88d6a3129efdb616dac6d99866d
Task-number: QTBUG-52953
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
2016-05-12 11:46:47 +00:00
Alex Blasche 54c9cd9e28 Add a runtime warning when dummy QtBluetooth backend is running
There have been plenty of bugs where QtBluetooth was compiled
with the dummy backend and the API user reported bugs against it. So far
debug output was not able to identify the dummy backend which made
debugging of customer code more difficult.

This patch prints the name of the backend once shortly after the
application startup. The other backends like Bluez do that already.

Change-Id: I86353ef3c9c99cafac38805f253e20a3ad3e10a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-04 10:24:25 +00:00
Alex Blasche 3e7befcd58 Bluez5: Fix serial service discovery inside QBluetoothSocket
QBluetoothSocket::connectToService() performs its own service discovery
if the remote RFCOMM channel is not known. This may happen if the passed
in BluetothServiceInfo object was obtained via a minimal service
discovery (which does not perform a channel discovery) or if the

connectToService(const QBluetoothAddress &address, const QBluetoothUuid
        &uuid, OpenMode openMode = ReadWrite);

overload was called.

This was not an issue with Bluez4 as every type of discovery
provided the RFCOMM channel id.

The internal discovery required at least the service's ServiceId to be
known. However a lot of SerialPort profiles do not set a custom service
uuid as ServiceId nor do they set the SerialPort UUID as ServiceId. Often they
provide the SerialPort uuid via the ServiceClassIds only.

This patch ensures that the internal service discovery is started if the
ServiceId is known or if the ServiceClassIds contains the SerialPort
uuid.

Furthermore the internal discovery did not apply the complete uuid filter.
If a ServiceClassId was added then the ServiceId was discarded which
could lead to services not being found.

Task-number: QTBUG-47593
Change-Id: Ia6e52d1a9def0f770080fd70e2b6deb40e69fa69
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-29 20:21:27 +00:00
Alex Blasche 4a6c2b9fd6 Fix QBluetoothServiceInfo QDebug operator
qDebug() << foobar << QBluetoothServiceInfo()

The above statement produced output where the QBluetoothServiceInfo
content was printed before foobar. This patch fixes the issue. The debug
operator uses the passed in debug object rather than creating a new
one when printing.

Change-Id: Ic92ca341baa8b4bce934a3895d2da77a2e17b5c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-29 11:16:51 +00:00
Oswald Buddenhagen aac156966a fix example installs
Change-Id: I8fb3a8f61a7007dec6935eee3bd5ff25cd756395
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-28 18:48:25 +00:00
Oswald Buddenhagen 7f5fb3f412 purge unreferenced .ui file
Change-Id: Iacc97b5b32d6ad77e02a65c7597310116efdeeec
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-28 18:48:16 +00:00
Alex Blasche 934f5c522e Increase test coverage in bttestui
QBluetoothSocket::connectDevice(QBluetoothServiceInfo, OpenMode)
was not used so far. This call is even more efficient as it can avoid
a complete service discovery. In summary quicker testing can be
achieved.

Change-Id: I6f9ef9eec6b773b9b90bf46e24a07878d81633cd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-28 12:42:08 +00:00
Alex Blasche 5d0f3f8b1f Improve QBluetoothServiceDiscoveryAgent::setUuidFilter() docs
Better explains that the uuid filter is applied against two service
attributes rather than only one. The ServiceId and the ServiceClassIds
are used for matching purposes.

Change-Id: Ib301e438c27977288c56a2bb9dfe68e2d3f2a10d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-27 10:33:32 +00:00
Alex Blasche 1e30c5b90a Peripheral Privacy Flag (0x2A02) may not be writable on some platforms
Change-Id: Ic80fe48fb192ee66f87aabcebc2b84e4ed3049a0
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-27 05:32:43 +00:00
Alex Blasche ff632b6696 Improve QBluetoothUuid(QString) ctor documentation
It highlights the optional curly braces and the connection to QUuid.

Task-number: QTBUG-52685
Change-Id: Iebfa84dc7f83fd2ef0aa02cb5e21b3f62de84d24
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-04-26 09:21:28 +00:00
Alex Blasche dedff12a89 Fix typo in Android permission name
Task-number: QTBUG-52530
Change-Id: I6ae41b3f8998ffc18d8b8205c6bbe788e8c4898b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-04-13 13:05:55 +00:00
Alex Blasche 9e58b52f6b Android: Suppress failed connect/close attempts due to targetLost detection
Android does not provide an API to detect when an NFC tag is removed
from the vincinity. To detect such a case the Android implementation
uses active polling. During each polling cycle the implementation
connects and disconnects from the tag. If it failed, the tag is assumed
to have been removed from the vincinity.

Such failed attempts cause an IOException which are printed to stderr. This
is confusing as the developer might mistake them for some other serious
problem. This change suppresses all related warnings.

Change-Id: I95cf57076139e7d0a5ad31d4cc770a81ced12242
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Peter Rustler <peter.rustler@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-13 07:47:14 +00:00
Alex Blasche aecf140855 Fix Annotated URL Example on Android
QNearFieldManager::registerNdefMessageHandler() is supposed to register
the current app as platform handler for certain tag types. The example
is written around this concept and doesn't start the target detection
when such a registration succeeded.

Unfortunately the Android implementation does something completely
different. Therefore the startTargetDetection() and connect() calls
after the current return is necessary to make the example useful.
For now we simply ignore the feature and always start target
detection. Since neither NEARD/Linux nor Android (the only two
supported platforms) have an implementation for the feature
the modified example works as expected.

Considering the current state it should be considered to remove
this NDEF message registration feature in Qt 6 altogether. The only platform
which ever supported the feature was BB10 and its implementation was
removed a long time ago.

Task-number: QTBUG-52154
Change-Id: Ibef9e77ac33b9629b6d81aa70eaa01ab1702cfcb
Reviewed-by: Peter Rustler <peter.rustler@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-13 07:46:59 +00:00
Alex Blasche 20b0a09547 Android: Ensure Bluetooth device discovery finds remote devices
Since Android 6.0 Bluetooth device discovery requires
new permissions (ACCESS_FINE_LOCATION or ACCESS_COURSE_LOCATION).
Otherwise non-BTLE devices will no show up anymore. This patch adds the
required permissions to QtBLuetooth.

For details see
http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id

Task-number: QTBUG-52530
Change-Id: I7b64ab57c5c9ee2e08308eaa58d33708c5e31244
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-04-13 07:45:44 +00:00
Alex Blasche b869626b9d Document changed behavior of QBLD::address() on Android 6.0
The address was fixed for privacy reasons.

Change-Id: Ifbdcb88d84215601bd202c0835237bb1c3100ca3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-04-13 07:45:33 +00:00
Timur Pocheptsov 1f83f647a6 OSXBTCentralManager - fix details discovery (iOS/OS X)
-serviceForUUID: fails to find included service and returns a nil
for a valid service previously discovered.

Task-number: QTBUG-52324
Change-Id: I9f4f8b1f3d3a78879344ace0170e23c03921d648
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-04-04 13:49:40 +00:00
Frank Meerkoetter 80b6557be3 Spelling fix
Change-Id: I4bcaa2d27d0ac4c9d3ed5fc3800392ba73e77a89
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-03-23 13:51:37 +00:00
Edward Welbourne cd151c723f Purge sRGB chunks from PNGs in documentation.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce -force

Change-Id: I621cb2437578c3f8a658e7c26a4de045825147ce
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-22 12:10:12 +00:00
Edward Welbourne 08d32d1819 Purge sRGB chunks from PNGs in examples.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce

Change-Id: I2b8810829f1b91033539229a6d4b3e505b8730ea
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-22 12:10:05 +00:00
Timur Pocheptsov 97194a4b72 Nfc - guarantee statics initialization order
Use Q_GLOBAL_STATIC instead of simple static QMap object to avoid problems with
undefined initialization order for 'statics' from different translation units.

Task-number: QTBUG-51860
Change-Id: I6ce48f3c0770dc0ff125b443816f6b3b23ae809e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-03-18 08:40:44 +00:00
Marc Mutz 03e694e270 Add explicit and make public headers compile with -Wzero-as-null-pointer-constant
... or equivalent.

QtBase 5.6 headers already compile that way, so let the other
modules follow suit.

Added explicit where it was missing. This is not a source-
incompatible change, because code that breaks by this is
a bug. Let's not have this sitting around in an LTS.

Task-number: QTBUG-45291
Change-Id: I375361699615d0fc874e0b96a84543e233eff5f0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-03-15 17:50:55 +00:00
Oswald Buddenhagen c25d62cc83 don't over-expose private dependencies
Change-Id: Ida2256e88c7ebe698f8b4734afc504dcef2da2d2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-25 16:51:14 +00:00
Oswald Buddenhagen 6b2f3cbde6 consistently put {qt,qml}_{module,plugin} at the end of project files
this fixes static builds by ensuring that all dependencies are exported.

Task-number: QTBUG-51071
Change-Id: I3cdb59c65dbbf2b536ee927dd912349b4ceca335
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-25 16:51:09 +00:00
Liang Qi c87458961f Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: Iabf0939a5f23c5da85de3a73545cd8abdc9a3e65
2016-02-15 08:08:28 +01:00
Alex Blasche dec32076b9 Update gitnignore following recent changes in the build system
The build system generates wrapper scripts for direct host tool calls.
This scripts should not be tracked by git.

Change-Id: I9b2c9521c2c12e38f32ae69621d72e18eb33945b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-02-10 12:57:59 +00:00
Oswald Buddenhagen 532dc8b90a Bump version
Change-Id: Ie993ef22029b1d05f39e4edc8f859841790ca6a6
2016-02-08 14:55:51 +01:00
Alex Blasche 8b550f0a75 Update qml types for QtConnectivity 5.6.0 release
Change-Id: Iadd9905f4129ede5f0c06b1e1a88a8f932c37c70
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-05 09:04:20 +00:00
Oswald Buddenhagen c2b7f094e7 Merge 5.6 into 5.6.0
Change-Id: I25358eae40c07d8e5ba1224b3508c5fee95d3a85
2016-02-02 13:12:37 +01:00
Oleksii Serdiuk d1a07d8609 Not all descriptors where discovered in some cases
While discovering descriptors, when handles are not numbered
sequentially, the discovery stopped as soon as "no attribute in given
range found" error is received. However, there could be more
characteristics pending. As a result, descriptors for those
characteristics where never discovered.

Change-Id: Iad9d7203020b0787f1d4571fc7063ef390448ce9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-02-02 08:56:54 +00:00
Alex Blasche f29aa5e960 Add changelog for QtBluetooth/QtNfc 5.6.0 release
Change-Id: I1422ab23ef1abd812eb5523105cbadc8ef1aa015
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-26 14:17:29 +00:00
Christian Kandeler 0b0d7ee34f Bluetooth: Do not assert on remote data.
Otherwise, a malicious device could crash our application.

Change-Id: I427eb1ff88b08710d5c74230f5877b0c59b6fb0f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-22 16:22:58 +00:00
Alex Blasche 46d727097c Document QtBluetooth and QtNfc logging categories
Change-Id: Ib5a9f4e5c0eef85a1acd93454d842bbb0d615751
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-15 14:28:57 +00:00
Alex Blasche ad431bbfc1 Fix qdoc warning about missing dtor documentation in QQmlNdefRecord
Change-Id: Ic1f3ca5075174addfbc6d76f31d9b89d2c654d19
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-15 13:12:37 +00:00
Christian Kandeler 3ebb79fbb6 Bluetooth: Fix mapping of device address to HCI id.
The previous code always returned the id of the first device in the
list.

Change-Id: I6f3cde2405d53eab009d7409d9e3c6b47d97e53b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-15 12:35:30 +00:00
Christian Kandeler 4a44e0b404 Bluetooth LE: Fix premature initialization of HCI manager.
The private class used a member in its constructor that was only set
afterwards.

Change-Id: I19b7ca2a5048771a447d63a56ad10ad56c311e91
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-15 09:42:48 +00:00
Andy Shaw 6b3ef05861 Fix typo regarding requires
Change-Id: I59c6344b1c1ab0c892d8c66a7348f8321e3a603e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-08 14:38:52 +00:00
Alex Blasche 348e5f9dd9 Android: Fix QBluetoothSocket::bytesAvailable()
Task-number: QTBUG-50345
Change-Id: I721b98f9b6ccff2a987a6c477d08902332ce848c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-07 13:27:42 +00:00
Timur Pocheptsov aea5e39719 Remove yet another implementation of AutoreleasePool's RAII
Now we have this class in QtCore, no need in my "home-made" version anymore.

Change-Id: Id26944dd6970cc2a8ac9d02675f8af9adecc3d44
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2016-01-05 08:46:51 +00:00
Alex Blasche 9d3e7e9c2e Bluez5: Sanitize app name to be valid DBus object path name
This may happen when the app name contains for example a dash ('-').

Task-number: QTBUG-49402
Change-Id: I04b289b0723e2979a67c93e335205556bf1eb30e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-23 14:05:48 +00:00
Alex Blasche 3954571fa0 Handle undefined QLowEnergyController error cases as Unknown error
This is important on Android as not all error conditions are exposed
via QLowEnergyController::Error enum.

Change-Id: I442ecffcadc01e1a2b60ae17dc6e63e08e5f4149
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-23 13:12:58 +00:00
Erik Verbruggen b4db7cd219 Fix inconsistent use of 'override'.
Change-Id: I3addd4258e3bbb5aaa6eca21af338aab57b9cf33
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-23 10:16:29 +00:00
Erik Verbruggen 3a81039eb7 Remove deprecated 'register' storage class specifier.
Change-Id: Iec9163b25f961a5f7371150aba17a892e5fac305
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-23 10:16:16 +00:00
Alex Blasche 31c2c24030 Android: Invalidate services after a disconnect from the peripheral side
So far, invalidation only took place when the local/central side
disconnected the connection.

Task-number: QTBUG-50125
Change-Id: Ic01725d1b83e49ad7df6971d980b480f839d550b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-23 10:07:26 +00:00
Alex Blasche 2fc3593703 Remove unused isConnecting member variable in QLECPrivateOSX
Most likely it was used before some changes rendered it unused.
At this point the variable was initialized to false and never ever
set to true.

Change-Id: I5b60cf83bc362ff53f8ce276c16392aada9efc69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-23 09:42:06 +00:00
Alex Blasche 5e2856bcbe OSX/iOS: Invalide QTLE services when remote device disconnects
So far, only a local disconnect triggered the invalidation process.

Task-number: QTBUG-50125
Change-Id: I324e01c86eb0c7cc820e91a6f6d6d01fb23170ab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-23 09:42:02 +00:00
Erik Verbruggen 0e00dff963 Fix namespaced build on OSX.
Change-Id: I0baa4bbbc5d398f388a1e0aff9ba88f82a23c1cc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-23 09:16:42 +00:00
Oswald Buddenhagen f6c982457c disable build on android if androidextras is absent
Change-Id: Iefea81376d0486aead874dad985e55f0b0af5d27
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-21 07:37:26 +00:00
Frank Meerkoetter cd05e804d2 Properly initialize the m_manager pointer.
Fixes coverity CID22012.

Change-Id: Ifdadf0330c277aeea6f87bacd986ec15d5a0c144
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-12-18 08:18:45 +00:00