summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'dev' into btleAlex Blasche2014-02-17109-513/+6655
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/bluetooth/bluetooth.pro src/bluetooth/doc/src/examples.qdoc src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothservicediscoveryagent_p.h src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d
| * Merge "Merge remote-tracking branch 'gerrit/stable' into dev" into ↵Alex Blasche2014-02-154-5/+3
| |\ | | | | | | | | | refs/staging/dev
| | * Merge remote-tracking branch 'gerrit/stable' into devAlex Blasche2014-02-144-5/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothserver.cpp src/bluetooth/qbluetoothserver.h Change-Id: Ia99c341ab6b4fb30d9ceb9e4516c7083eed1c547
| | | * Fix missing QBluetoothSocket::state update after unsuccessful SDP searchold/5.2Alex Blasche2014-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connectToService() triggers an SDP discovery the search may fail. At the beginning of the discovery the socket state was set to ServiceLookupState. This patch ensures that the socket state resets to Unconnected if the SDP discovery failed. Currently only Bluez uses this discovery mechanism and therefore is the only affected platform. Change-Id: I982dafc1f5466071bbf910ed3cf7cf7abda14fe4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Fix interaction with Android devicesAlex Blasche2014-02-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom uuid of a Serial port profile must be part of the service class property. This enables Android to find the custom uuid. Change-Id: Ibe0bfcfe6ba7fa6b72a979153afccf17d6b4eb83 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Reduce debug output on BluezAlex Blasche2014-02-111-2/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I82459078c0510d27ae3611e2914b0ec36ff625ed Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | | * Explicitly declare the parameter type of QBluetoothServer::error().Alex Blasche2014-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The connect signal has trouble deciding on the error type. Change-Id: I6efde7629af832f394b2ae9ba5a266e281a4a1aa Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * | | Fix namespaced buildsAlex Blasche2014-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems the logging frameworks function pointer creates errors on some compilers. Change-Id: I35d9b2bbc9817789bfd1eafa9c62d19ca72eda8c Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * | | QNX: Config test for libbb2Fabian Bumberger2014-02-141-11/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libbb2 is not available in a public NDK yet. In order to be able to compile NFC for BlackBerry 10 with a public NDK the BB10 implementation for the QNearfieldShareManager is only built if libbb2 is detected. Change-Id: Idd11d4584215fade91db9f79895f901547bce3ef Reviewed-by: Stuart Burge <sburge@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
| * | Fix qmake and compiler warningsAlex Blasche2014-02-142-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Public headers should not include local header files (qmake warning) and fix warning about unused parameter. Change-Id: Id12d2255f6011507649b25ed2bc74356e0f4538e Reviewed-by: Stuart Burge <sburge@blackberry.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * | Adjust strings for translationAlex Blasche2014-02-138-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | This includes unification of error messages, fixes for spelling mistakes, hints for translators and other forms of simplifications. Change-Id: Idd0e01614b24ff2d19133f0d19d49649d59e3f57 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Port QtBluetooth to AndroidAlex Blasche2014-02-1347-64/+4017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a feature merge to dev targeting Qt 5.3. Known issues: -QTBUG-36754: QBluetoothServer::close() crashes -QTBUG-36763: QBluetothTransferManager port to Android not possible -QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices() -QTBUG-36810: Remove direct use of Android action strings The above issues and some other minor TODO's will be addressed until final release time. Task-number: QTBUG-33792 [ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to Android. Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Add support for NFC file and data sharingStuart Burge2014-02-1317-8/+1778
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide ability to allow NFC enabled devices to exchange file and data content using a high-level API. [ChangeLog][QtNfc][General] A new NFC share API was added. The API provides sharing of NDEF messages and arbitrary files via NFC and may potentially use other communication protocols such as wifi or Bluetooth as part of its implementation. Change-Id: I878df1702ce4164384096d00e53dcd354d1bfafc Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Merge branch 'stable' into devAlex Blasche2014-02-075-27/+64
| |\| | | | | | | | | | Change-Id: I8765fee07cec0588a0336178300129b75c13c30a
| | * QBluetoothServer fixesAlex Blasche2014-02-073-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) If QBluetoothServer::listen(QBluetoothUuid,QString) fails during service registration we have to ensure that the Server doesn't remain in listening state. 2.) 29de876f55dc96748fdca8dd3fef0c873791796f sets the socket descriptor to -1 when closing the QBluetoothSocket. QBluetothServer treats a value of -1 as error and aborts any call to listen(). This implies that any call to listen() after the first close() would always fail. This patch adds some redundancy and first tries to recreate the socket and only if the re-creation failed exists with an error. 3.) Catch case when user calls listen() on an already listening server. Documentation has been updated to document the behavior. Change-Id: I2df13500e74a9741017f7404f0e0c477c96d5356 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | * Fix broken QBluetoothServiceInfo::serviceClassUuids() callAlex Blasche2014-02-072-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It never returned a valid entry due to wrong QVariant conversion. The patch changes the public header with a potential to break BC. A formerly inline function was reimplemented and is no longer inline. This should be safe though as older header versions can still use the previous implementation. Change-Id: If786a366e625a56810b8d4cc682b25d07f72f4e5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Merge "Merge remote-tracking branch 'gerrit/stable' into dev" into ↵Alex Blasche2014-02-0610-88/+138
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'gerrit/stable' into devAlex Blasche2014-02-0310-88/+138
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothservicediscoveryagent.cpp Change-Id: I52831fc8c69062e90c003836fd9402f19d6a0ba5
| | | * Use qt_error_string rather than strerror.Alex Blasche2014-01-303-9/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: Ide3f00cacd7a42e99823441a45609f8e50063fce Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Synchronize setting of QBluetoothSocket's error string, code and signalAlex Blasche2014-01-303-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few cases where errorString, error signal and error code where out of sync because one was set but not the other. This was addressed by unifying the usage pattern for error activation to a pattern where errorString is set and setSocketError() is called afterwards. Change-Id: Ibfb04772cf560936aa4ce8ea9643d6a410cc9ee2 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Don't cache the QBluetoothSocket::localName() & peerName()Alex Blasche2014-01-293-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affects Bluez only. The other platforms don't use this feature. The problem was triggered when connecting, disconnecting and connecting again to another device. localName() might change due to a different local Bluetooth adapter being used and peerName() is different anyway in such cases. Change-Id: I8983a355832cf4f4d9a654971c54f5624be288e6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| | | * Refine documentation for QBluetoothSocket::localXYZ() functions.Alex Blasche2014-01-281-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bluez never returns anything until the connection has been established. BlackBerry and the future Android port are much quicker. Change-Id: Ic465a9b68176e7fff5f0c88b4fb602f8665f7197 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Initialize QBluetoothSocket::socketError properly.Alex Blasche2014-01-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the initial value is compiler dependent. In most cases this meant it was set to 0. However 0 is not even a valid QBluetoothSocket::SocketError enum value. The NoSocketError value is -2. Change-Id: Ieee4f7bd1c97d758295f4d0cc1297f62c114f4f3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Fix crash in Bluez implementation for QBluetoothSocketAlex Blasche2014-01-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal socket was closed but not reset to -1 after calling close() or abort(). As a consequence the subsequent connect() call crashed since internal socket notifier were invalid [ChangeLog][QtBluetooth][QBluetoothSocket] Fixed a crash in Bluez part of QBluetoothSocket() which was caused when triggered when calling the sequence connect() - abort() - connect(). Change-Id: I21b779c7808d0a5211df9e2481da28e2e9753ca9 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Fix broken SDP discovery on QBluetoothSocketAlex Blasche2014-01-282-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ThHis is only used on Bluez at this stage. THe SDP agent was initialized with the local adapter being the remote address of the remote service. This could never work. The remote address is now properly set (being the handed over bt address to QBluetoothSocket::connectToService()). [ChangeLog][QtBluetooth][QtBluetoothSocket] Fixed incorrect invocation of QBluetoothDiscoveryAgent where the remote service address was incorrectly assumed to be the local Bt adapter address. This prevented the detection of the remote service. This bug only affects the Bluez backend. Change-Id: Ice2b9c351bfd42f1f4398b14ac68f76315f01fa8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Fix crash during SDP discovery on BluezAlex Blasche2014-01-241-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stopping the discovery during an ongoing SDP search may cause a crash because discoveredDevices has been cleared although we still access the list later on. Even if list access wouldn't be required anymore there is no reason to continue the discovery. Entry guards for the involved slots were added. Additionally it revealed a memory leak which has been fixed Change-Id: I3fd3c99a82a9d7b61e853a3f9f3877b8ad7f6d41 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| | | * Stop SDP search if QML Model is turned offAlex Blasche2014-01-222-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we only ever disabled the device search. If a SDP discovery was running and we changed to device discovery the SDP discovery kept running in the background. Change-Id: I5f2cf88ecf7f9b5cfe2608e0ceda366b552982e5 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Add missing documentation for QQmlNdefRecord::Unknown enum value.Alex Blasche2014-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ida3f7816340f9379629e653abc5ef89f5aa38486 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | | * Do not clear result lists while the SDP search is ongoing.Alex Blasche2014-01-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or bad things will happen... Change-Id: I7df3925ff5d15f3f904f4dd38e24b247ec151fd1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | | * Improve QBluetoothServiceDiscoveryAgent documentationAlex Blasche2014-01-201-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth][QBluetoothServiceDiscoveryAgent] The QBluetoothServiceDiscoveryAgent class documentation has been improved. Change-Id: I5472e9ceda45d9bcf0634b5bf2cecf265986bc10 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | | * Cleanup dead code in Bluez SDP discovery backendAlex Blasche2014-01-201-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change tweaks the discovery debug output log too. Change-Id: I4ef3e2e8ebaf0d9e593eee35a669641e3914da01 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | | * Fix memory leaks in Bluez specific device and SDP discovery classes.Alex Blasche2014-01-202-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth][Platform Specific Changes] Memory leaks fixed in Bluez device and service discovery implementations. Change-Id: Ibc7c883d42d81a97310ff44ba40ffa94c71f611f Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | Normalize signal & slot signatures in connectionThiago Macieira2014-02-034-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I50c4f66f30debd49c37109dd2460925dc22af605 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * | | Misc fixes for the new corkboard exampleAlex Blasche2014-02-032-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The example was hooked into the build system. - The display location of notes on the display was optimized to reduce overlapping with the bottom and right corner. - A documentation page was added for the example. - example binary added to git ignore list - Fix license headers Change-Id: Ib18433c2a7dd68a3573c62ff3215fa0e69954f95 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Add documentation for picture transfer example and minor QML fixesAlex Blasche2014-01-282-1/+5
| | | | | | | | | | | | | | | | | | Change-Id: I8ef9e19de9f48797034fd186dff4b0e096748b1d Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Suppress warning from QObject attempting to connect null objectAlex Blasche2014-01-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | This can happen when QBluetoothLocalDevice(some_invalid_bt_address) was called. Change-Id: I8d547dc802b79ffd5cf8349fec6334177e8c4421 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Remove const modifier from QBluetoothLocalDevice signals.Alex Blasche2014-01-242-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those signals were added in 5.3 and therefore it is still possible to change them. At the same time fix the documentation for the signals and its related function Change-Id: Ide0f7b07cf624f9692f830a2534b224212da223a Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Don't stop Bt discoveries while we have InvalidBluetoothAdapterErrorAlex Blasche2014-01-202-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change complements 23a3863de809a4051ae6db4942145cb0cb624d6c. The discovery process should not stop when the passed local adapter address is invalid. While the first change ensures that start() cannot be called stop() was still callable. The platform specific implementations potentially set lastError to something else und thus would permit a call to start() later on. This may lead to invalid internal states. Change-Id: Ibfd87374bf712614fad90172894ea2e009ba198a Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | whitespace fixesOswald Buddenhagen2014-01-2014-18/+18
| | | | | | | | | | | | | | | | | | | | | remove trailing whitespace, expand tab Change-Id: I3361c6c431231c7463bb1dc9b53268935b22a72b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-172-18/+5
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I7295292bb7d9b5fc7eba8f099f4592b70de80d11
| | * Cleanup more duplicated code in SDP discovery class.Alex Blasche2014-01-171-16/+5
| | | | | | | | | | | | | | | Change-Id: I4b6be592204cc435bfec508725d64cb8f7529a3b Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | * Reduce SDP discovery debug output on BluezAlex Blasche2014-01-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Printing the entire SDP xml is just too verbose. This reduces the output by multiple pages. Change-Id: I08ffb7799f3c9f5a61de224e58e565719d44b81b Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Emit PoweredOffError if required during device discovery start on BluezAlex Blasche2014-01-161-0/+12
| | | | | | | | | | | | | | | | | | Change-Id: I12406b2a0fef831ed2e96340fac73156dfa71848 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Reset QML Bluetooth discovery model if an error occurred during device discoveryAlex Blasche2014-01-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is due to a behavior difference of the finished() signal between service and device discovery. Change-Id: I59d6358171275987f07f86a6da80e8435445fd0e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Document a somewhat peculiar signal behavior mismatch during Bt discoveryAlex Blasche2014-01-152-3/+9
| | | | | | | | | | | | | | | Change-Id: I8f9ac85e7753a9d6142bbefcd0e4bcda09e0f3d8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-108-25/+34
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: Ic9e5cb3989426b90f6dad58d53dba366638ff35f
| | * Use QLoggingCategory in Bluetooth QML import plugin.Alex Blasche2014-01-084-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | Add some minor include cleanups as well. Task-number: QTBUG-32253 Change-Id: I2ccb813a9dd85ca16c1ed8aab962418df8157890 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | * Fix remaining compiler warnings in QtConnectivity moduleFabian Bumberger2014-01-073-4/+3
| | | | | | | | | | | | | | | Change-Id: Iafadb39642c6b2944e8a873bdee49fb87e3ed5e9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| | * Don't set the internal service discovery state twice to the sameAlex Blasche2014-01-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The first call is not necessary as nothing has changed in the meantime. Change-Id: I8db51fd725dd210b3d5c7b01d399d24877bf9b2f Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | BlackBerry: Fix compilationSergio Ahumada2014-01-082-8/+8
| | | | | | | | | | | | | | | | | | | | | qBBBluetoothDebug was removed by 94f862e2 Change-Id: I85eca3bfbec2190f8a7413ec708d5bf99bc6998a Reviewed-by: Fabian Bumberger <fbumberger@rim.com>