summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix L2CP socket connectionsv5.3.2Alex Blasche2014-08-271-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | L2CP's psm (the RFCOMM port equivalent) was never published via SDP. Therefore the service client could not get the required information to connect to the server. After this patch Qt properly publishes the psm. Also, QBluetoothSocket::connect() initiated a service discovery to obtain the missing psm. Since the published SDP entry didn't contain one, protocolServiceMultiplexer() always returned 0 and another service discovery was initiated. This caused a crash inside QBluetoothSocket because the 1st QBluetoothServiceDiscoveryAgent instance was deleted in favor of the 2nd. The patch changes the client behavior such that it doesn't crash if the service discovery didn't turn up a valid psm/port. It improves the robustness in case of an error and avoids a second service discovery (which wouldn't turn up more information anyway). The bug only affected Bluez as it is the only platform supporting pure L2CP sockets. Last but not least a capability to test L2CP sockets was added to bttestui. Change-Id: I46c88a67c2baa4782ea908e645dcd4db9422dbba Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Add code to test service discovery on specific remote deviceAlex Blasche2014-07-153-0/+26
| | | | | Change-Id: I548d17928fb371ba7dbf2010efb6995bc6f5ff2d Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Add ability to abort server sockets via bttestuiAlex Blasche2014-07-021-0/+6
| | | | | | | | | This equalizes the behavior of the Close and Abort button. Abort will disconnect the local client socket as well as all sockets which were established via the listening server socket. Change-Id: I68d3d7190641aab44612fa3fc00b38fdc31799a3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix crash in bttestui when using default backendAlex Blasche2014-06-251-0/+2
| | | | | | | The cause are uninitialized pointers. Change-Id: I4ba5f79dbda3e20361fc1127fa08e93a2b7ce80e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Improve BtTestUI device and service discovery outputAlex Blasche2014-03-071-2/+13
| | | | | | | | This was recently used to debug Androids buggy discovery code. Change-Id: I6c3eca85a650d6fbb853d2cfc8ee73b434b5e7a9 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove insignificant flag from working unit test.Alex Blasche2014-03-041-1/+0
| | | | | | | | | This was missed during the earlier fixes to this test. Task-number: QTBUG-22017 Change-Id: Ica5bac09b565439bd65bfc42e9614544a21a0637 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Create QBluetoothServer unit test from QRfcommServer/QL2CAPServer testsAlex Blasche2014-03-0310-804/+16
| | | | | | | Task-number: QTBUG-22017 Change-Id: I3e5613153d2496567f7afd87c8a0a44c1067a4e7 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-033-7/+7
| | | | | | Change-Id: Idd8127e577be7381e170dab296d8f0564c478020 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix qrfcomm unit testAlex Blasche2014-03-012-199/+105
| | | | | | | | | | The patch also aligns the error behavior of QBluetoothServer::listen() across the various platforms. Task-number: QTBUG-22017 Change-Id: Ic81808c94d060ca07bd125afa842452e53efaec7 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Remove btclientAlex Blasche2014-02-277-646/+0
| | | | | | | | | | It is replaced by bttestui which runs on any platform and is the official test tool for a variety of other tests too. Task-number: QTBUG-22017 Change-Id: Ia675876375901a0f19d1820e2167729aa863bd34 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix qbluetoothsocket unit testAlex Blasche2014-02-273-439/+152
| | | | | | | Task-number: QTBUG-22017 Change-Id: I876b8a052873d198e8991b7eab3ca70714eb0dcc Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add copy operator to QBluetoothHostInfo.Alex Blasche2014-02-271-0/+18
| | | | | | | | The QBluetoothSocket unit test was sometimes failing because of it. Change-Id: I6071902e1aaa9e1138f071b7f2ce2a8ccb436789 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add extensive test application for QtBluetoothAlex Blasche2014-02-159-0/+1285
| | | | | | | This application can be used to manually test most Bluetooth features. Change-Id: Ib7101ff2f5334026c67c2e00a852d6b10d4674e8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Merge branch 'stable' into devAlex Blasche2014-02-071-0/+23
|\ | | | | | | Change-Id: I8765fee07cec0588a0336178300129b75c13c30a
| * Fix broken QBluetoothServiceInfo::serviceClassUuids() callAlex Blasche2014-02-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix MSVC-warnings about truncation of constant value in ↵Friedemann Kleint2014-01-241-4/+4
| | | | | | | | | | | | | | tst_qnearfieldtagtype2.cpp. Change-Id: I07b915ed029fc1389b57a024dad31dd287c75240 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | whitespace fixesOswald Buddenhagen2014-01-201-6/+6
| | | | | | | | | | | | | | remove trailing whitespace, expand tab Change-Id: I3361c6c431231c7463bb1dc9b53268935b22a72b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Check the local adapter's BluetoothAdress before doing the discoveryFabian Bumberger2013-12-202-0/+39
|/ | | | | | | | Task-number: QTBUG-35571 Change-Id: I8f2eea7a8437787d61a238c760e948f45738618a Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Simplify QBluetoothTransferManager autotestFabian Bumberger2013-10-111-66/+6
| | | | | | | | | | | I don't think the service discovery in there does anything valuable. Basically every device has a OPP service running. Like this it is just time consuming and error-prone. It would also be good to have a tool that automatically accepts the transfer on the testserver so that we can actually execute the test automatically. Change-Id: I93b3bab32cecb8a3005cecb95a69a40813663e4d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve handling of invalid Bt address by QBluetoothTransferManagerAlex Blasche2013-10-111-5/+4
| | | | | | | | | Some minor unit test improvements Task-number: QTBUG-33801 Change-Id: Idc98bf8928ced0f9e01b24668edf7c32172d2fd1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Rename QDeclarativeNdefRecord -> QQmlNdefRecordSze Howe Koh2013-10-041-24/+24
| | | | | | | | | | | The QDeclarative* class prefix is associated with the now-deprecated Qt Declarative module (a.k.a. Qt Quick 1). In Qt Quick 2, all QDeclarative* classes have been renamed to QQml* or QQuick* Also rename the example, QDeclarativeNdefFooRecord -> QQmlNdefFooRecord Change-Id: Ie81a9ea2fdda145ad749afb07ef758f791b278d0 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Alter the way type and TNF are treated in the qml APIFabian Bumberger2013-09-301-37/+54
| | | | | Change-Id: Iff972e1645447a57eb72e3006318a9dd5b2d5c9b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Error handling for QBluetoothServerFabian Bumberger2013-09-202-3/+18
| | | | | | Task-number: QTBUG-32669 Change-Id: I0f12b19f7989972b7c8305f6e11a95f7f25a281d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enumFabian Bumberger2013-09-207-42/+42
| | | | | Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Changing the way nfc target detection worksFabian Bumberger2013-09-194-9/+7
| | | | | | | | | On Android and BB10 the target detection does not distinguish between NFC tag types when it comes to target detection but rather between the protocols the tags use. This patch removes the parameters used for target detection. Change-Id: I4609cde61d34159bc66b29a27f8d76df816e2c23 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove LLCP from the public APIFabian Bumberger2013-09-162-2/+2
| | | | | | | QLLCPServer does not work properly yet on BlackBerry so I would want to wait committing to this API till we have a backend that is working properly. Change-Id: I62cbe9dae00ed47377086e4c8522298b4c9fa5a4 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Clean up QBluetoothDeviceInfoFabian Bumberger2013-09-101-12/+0
| | | | | | | This patch removes "ManufacturerSpecificData" because it is not implemented and some dead code. Change-Id: I95a142280835addf65fbedd4a26f3266c7dc0838 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove QtBluetooth and QtNfc namespace.Alex Blasche2013-09-0922-23/+21
| | | | | | | | This is based on namespace discussions on the Qt project dev mailing list. We continue to use the Qt namespace. Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make Bluetooth adapter choosable for device and service searchNedim Hadzic2013-09-052-4/+114
| | | | | | | | | | | | | | | | | In case there are more Bluetooth adapter, device and service search might give different results. Addition to Change-Id: Ideddb39460985c18547baec986b15e43946c85de - added option for setting the device adapter for service search. QBluetoothLocalDevice was used in both classes (device and service search) for passing an argument for setting adapter. The reason for this to keep the same approach, because in QBluetoothServiceDiscoveryAgent class there is already a constructor with QBluetoothAddress argument. Auto tests and examples updated. Change-Id: Ib5d7ff23e4846d9d42dae68d8d424031748811e5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update cmake auto test.Stephen Kelly2013-09-044-73/+12
| | | | | | | | Use the test generator to simplify the test, and add test for the QtNfc module. Change-Id: I6775407740572223b4cc8ff5373a49f8933641e5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge QRfcommServer and QL2capServer to QBluetoothServerFabian Bumberger2013-08-292-12/+12
| | | | | | | Task-number: QTBUG-32722 Change-Id: Ia75ad5af2f81b737a8cca09dba919a7dc0fa0f8a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QBluetoothServiceDiscovery auto test fixAlex Blasche2013-08-133-33/+37
| | | | | Change-Id: I4e20a50549f69367652bd6881a3c541aa283c128 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Add unit test for QNdefNfcSmartPosterRecordStuart Burge2013-08-133-1/+563
| | | | | | | Task-number: QTBUG-31738 Change-Id: I153c3ea4b03edc0e699596a30f395bfe5cab9d16 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Extend and improve the unit test for QBluetoothServiceInfoAlex Blasche2013-08-121-1/+86
| | | | | | | | | | | | | | Note that this change causes a behavior change. If a service object is a copy of antoher one they both share the same data and behavior. Changing one will affect the copy in the same way. No automatic detach will happen. THis is a much more expected behavior and avoids issues where one service info copy was not able to deregister the service anymore. Change-Id: I0b10688a5ef55e8c1dd9f5ccbf090336e3f635ad Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve QBluetoothTransferManager unit testAlex Blasche2013-08-093-94/+223
| | | | | | | | | and fix some minor issues during the process. Task-number: QTBUG-22017 Change-Id: Iff1adde28ba818c3ed0511cb5d45404f05d7c36f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* The QBluetoothDeviceDiscoveryAgent test is not longer insignificantAlex Blasche2013-08-061-1/+0
| | | | | | | Task-number: QTBUG-22017 Change-Id: I83f1d88ddd6255693f4aa8a2993cd1a818981a75 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix bluetooth device discovery testAlex Blasche2013-07-311-129/+166
| | | | | | | | The Bluez and Generic backends were failing. Change-Id: Id4a55a43432a9ad198d36062a1e4e23a54b658ec Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Don't hardcode the test device's Bt address in the unit test.Alex Blasche2013-07-291-7/+14
| | | | | | | | | | | Ensure that all signals emitted during a pairing request are queued via the event loop. The exact reason for doing this is unknown however such a change was done on purpose in QtMobility. We keep the behavior to be on the safe side. Change-Id: I666c5b2c25a0c80df634f7b6643bd08126812b65 Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com> Reviewed-by: Alex <alexander.blasche@digia.com>
* Don't export QNearFieldTagType* classes.Alex Blasche2013-07-252-2/+2
| | | | | | | | | | | | There is no implementation for them at this stage. Hence we remove them from the committed API. They remain enabled via auto tests to ensure that the code keeps working. Task-number: QTBUG-32306 Change-Id: I5312e8436a99be4e24311bea4c92718239178ef4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Improve and fix the qbluetoothlocaldevice testAlex Blasche2013-07-151-49/+127
| | | | | | | | The Bluez code was not passing the test. Task-number: QTBUG-22017 Change-Id: I0bc2fca7ec9d352481eea24c75b902c21b4fc0da Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Add unit test and signal for/to QDeclarativeNdefRecordAlex Blasche2013-07-101-0/+126
| | | | | Change-Id: Ifbfb2e11b072610b3f2c140a469ed73e110c2eca Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fixing QNearFieldTarget::waitForRequestCompletedFabian Bumberger2013-07-101-7/+7
| | | | | | | | | | | | The current implementation is not waiting at all. Adjust the waiting time for the tagtype1 unit test to avoid 30min runtime. Change-Id: Ied9cff72456b964af9224362f47113a7e2c792ae Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex <alexander.blasche@digia.com>
* Re-enable qnearfieldtagtype* auto test.Alex Blasche2013-07-012-6/+0
| | | | | | | | | The tests don't crash on platforms I can test with. Retrigger CI on it to validate crash. Change-Id: Ieac67a891a946ca15c9e23be773f2371043230a6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fix broken QBluetoothLocalDevice::isValid() behaviorAlex Blasche2013-06-282-8/+26
| | | | | | | | | | | | | | | The Bluez and QNX backend always returned true. They should only return true if the local device is truly available or if the passed QBluetoothAddress is indeed one of the local bluetooth devices. The related unit test was extended to ensure common bahvior of invalid QBluetoothLocalDevice instance on all platforms. Task-number: QTBUG-32068 Change-Id: I40ab4db48dc82ba0d1c0bb5275e96a3ee812b01a Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex <alexander.blasche@digia.com>
* Export qHash(QNdefRecord)Alex Blasche2013-06-271-0/+6
| | | | | | | | | | | | | The symbol is used by the library itself. We may as well export it for wider use. The patch adds qHash usage to the unit tests to confirm the export of the function and to ensure catch changes of the hashing algorithm. Task-number: QTBUG-31951 Change-Id: Ic6e6e2a0cf7ee5aa9f5bd6c91a8a6c31030c5848 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Enable Qt NFC in the CI system.Alex Blasche2013-06-264-16/+7
| | | | | | | | | | | | | | | | | | Don't require CONFIG+=nfc to build QtNfc lib. This prevents proper test execution and there is no API commitment until the API is offcially released anyway. Excludes three auto tests from -developer-build builds as they require Q_AUTOTEST_EXPORT. Fixes compile errors associated to namespace'd builds of Qt. Revert "Remove not needed symbol 'qHash(const QNdefRecord&)'" The symbol is needed during compilation by Windows. This reverts commit 39901af48f40f0672731a1f62dc003c4b37d1fec. Change-Id: I61c644bbfc4906729e6d2b9deb741989030c8624 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix parsing of QNdefMessage::fromByteArray()Alex Blasche2013-06-251-0/+40
| | | | | | | | | | | | Multiple NdefRecords were parsed incorrectly because the to-be-added record was never reset when reading the next entry. The added unit test fails without the fix. Task-number: QTBUG-31950 Change-Id: I2f1335b7e2d43000f55dc429524c5b8b87f868d2 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex <alexander.blasche@digia.com>
* Update Copyright headersAlex Blasche2013-06-2529-82/+84
| | | | | | | | | - Update Digia's copyright year - Add copyright to files without it - Convert old BSD to new LGPL license for auto test code Change-Id: I47f5c871c436f9c2731b235026434448719cc671 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Add QBluetoothDeviceInfo::operator!= which was missing.Milian Wolff2013-03-281-3/+3
| | | | | | | | The code just forwards to operator==, as is done as well by e.g. QBluetoothTransferRequest. Change-Id: I4db523124b6bd88bcb1f129d0742fc8ef376c61b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Rename NFC and Bluetooth namespace macros.Aaron McCarthy2013-02-1420-20/+20
| | | | | | | | Renamed to the namespace macros to follow what syncqt expects. This fixes missing namespace macro warnings printed by syncqt. Change-Id: I7be5a700e8435a559cb4c2e74938851233095887 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>