summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Renaming QLowEnergyServiceInfo methodsNedim Hadzic2014-02-214-24/+15
| | | | | | | | | Ensures that QLowEnergyServiceInfo and QBluetoothServiceInfo are more alike. Tests and examples updated as well. Change-Id: I0f6a97900891a9673f99578bdc8d156a8c403513 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix some BTLE service discovery issuesAlex Blasche2014-02-202-1/+14
| | | | | | | | | | | | | 1.) In Bluez avoid incomplete and/or premature finish of service discovery process. 2.) Add Testcode for QBluetoothServiceInfo::serviceDiscovered(QLowEnergyServiceInfo) to bttestui application Change-Id: I037a6303862dcf2e29aef4b761731b13c85b29aa Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix broken QBluetoothDeviceInfo unit test.Alex Blasche2014-02-201-1/+3
| | | | | | Change-Id: I1252a0c78f2b7026041a992bdb1deec3391386cc Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'dev' into btleAlex Blasche2014-02-1714-10/+1357
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * 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>
* / Implemented Bluetooth Low Energy: autotestsNedim Hadzic2013-11-2810-27/+864
|/ | | | | | | Autotests added for new Bluetooth LE classes. Change-Id: I31742786104df2aa9ec68ec9a82606f1e227c198 Reviewed-by: Alex Blasche <alexander.blasche@digia.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>
* Fix building of NFC tests.Aaron McCarthy2013-02-083-0/+3
| | | | | | | | | The tests qnearfieldmanager, qnearfieldtagtype1 and qnearfieldtagtype2 pull in shared code from the NFC library source. Set VPATH so that these source files can be found. Change-Id: Ie095b4d55b06cb364c697b944f9a4aca9e6fbb93 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-042-4/+4
| | | | | | Change-Id: I810dc7b5863c1674390a7e471845f1779cbba98c Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove obsolete DEPENDPATH assignmentsOswald Buddenhagen2012-12-166-7/+0
| | | | | | | | qmake now add CONFIG+=depend_includepath by default, making manual DEPENDPATH setup unnecessary. Change-Id: I51dd08d4a1a9a383296ce4331b843bc5e6375871 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-161-1/+0
| | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf, and console is added one line below. Change-Id: I69345d5cd2cfcb9726cdd4c21874381463e51c2c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix QBluetoothDeviceInfo testLiang Qi2012-11-221-4/+2
| | | | | | | | | Correct the test data, and for the 0-1 bits in address, they are unused and should be set to 0. Task-number: QTBUG-25453 Change-Id: I958da212528a0d61c1404f7bb9e6c8ae6c4730de Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fix qnearfieldmanager test.Aaron McCarthy2012-10-281-2/+0
| | | | | | | Test was crashing due to dereferencing an invalid iterator. Change-Id: I912acc970de6859501e6d692a98d4c81c9673e79 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Further porting of NFC module from mobility to Qt 5.Aaron McCarthy2012-10-018-49/+115
| | | | | | | | | | | | | | | | | | | Includes the following changes: * Conditionally enables building of the NFC module when qmake is run with CONFIG+=nfc. * Correctly build within the QtNfc namespace. * Fix compile errors in examples, enable building of NFC examples. * Fix compile errors in tests, enable building of NFC tests. Mark the some NFC tests as insignificant as they currently crash. Notably does not enable NFC documentation generation. Task-number: QTBUG-22015 Change-Id: I9ff170c45848c8f0215e9427797922f840c2f015 Reviewed-by: Alex <ablasche@gmail.com>