summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_FOREACH with ranged for loopsJuha Vuolle2021-06-084-14/+11
| | | | | | Task-number: QTBUG-92505 Change-Id: I1e8334473c883f76285736f6a26138ea882f5351 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix tst_qsensor autotestcase to pass on android deviceJuha Vuolle2021-06-032-10/+7
| | | | | | | | | | | | | | | The main issue with running the autotests on an Android device is that the device has real sensors too and the test case is not prepared for that. This commit addresses this by allowing additional available sensors as well as specifying more specifically which sensor IDs to use for testing. Task-number: QTBUG-73617 Task-number: QTBUG-92513 Change-Id: I92180df6f5e8361d39134567616b21a3a51b636c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Remove obsolete 'legacy' QML test case (cleanup)Juha Vuolle2021-06-031-192/+0
| | | | | | | | The case has been superseded years ago Task-number: QTBUG-92513 Change-Id: I7d27083863d57bfa94e49abcceb1be10f7bf5945 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Few cleanups and modernizationsJuha Vuolle2021-06-021-0/+28
| | | | | | | | | | | This commit introduces few source compatible changes: - Change obsoleted Q_ENUMS => Q_ENUM - Mark QSensor::type property as CONSTANT as it cannot change - Add change signal to QSensor::identifier and a testcase for it Task-number: QTBUG-92505 Change-Id: I6e3a652929d15bc5211448be2ae9254ed6d21118 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove obsolete 'legacy' test case (cleanup)Juha Vuolle2021-06-022-282/+0
| | | | | | | | | | The term 'legacy' here refers to QtMobility sensors 1.2 implementation, and the test case removed by this commit has been disabled in 2012 when 1.3 was released. Task-number: QTBUG-92513 Change-Id: If6a2e72c9d7c97f0bf93a8acbc3521cceffab571 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Split the Sensors QML plugin into a library and a pluginJuha Vuolle2021-05-262-5/+3
| | | | | | | | | | | | | | | The main changes: - Introduction of new SensorsQuick library with private exports - The original QML plugin loads this new library and does little else - Renamed original 'sensors' plugin as 'declarative_sensors' to provide an idea what it relates to - Renamed library headers as private "_p.h" and added "We mean it" - Changed qmlRegister* calls to QML_ELEMENT macros - Removed files that are generated in Qt6 (qmldir, plugins.qmltypes) Task-number: QTBUG-92530 Change-Id: I18f849adabcc79ac47e67305f78aefeee82801bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename subclass static variable which shadowed baseclass methodJuha Vuolle2021-05-196-24/+24
| | | | | | | | | | | The 'type' static variable shadowed the 'QSensors::type()' method of the baseclass. While this is easy to workaround it is better to remove such naming clash. Task-number: QTBUG-60246 Change-Id: Id0ddae978377ea4d4d0202a572c554c2541f9364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Remove compiler warningsJuha Vuolle2021-05-181-3/+3
| | | | | | Task-number: QTBUG-92505 Change-Id: Iebfda5ae88594826d1253b725e1e15dd2bde7435 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Enable QtSensors manual tests as part of buildJuha Vuolle2021-04-306-125/+25
| | | | | | | | | | | | | | The two manual test applications are now part of build when manual tests are built. This helps to detect if the test applications break over time. The tests were slightly renamed to avoid a naming clash with an example app. In addition the commit addresses few trivial things so that the applications start and run without warnings. Task-number: QTBUG-92502 Change-Id: Ia0368764102efc16276116bc8c75d562d79c1e27 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-1926-270/+207
| | | | | | | | | | | | | | | | | This commit introduces the bare minimum cmake support that should unblock the CI and allow further verification and development on most platforms: macOS, Linux, Win, iOS and Android. Some clarifications: * The support for sensorfw backend is very preliminary and can be enabled later if needed (no Qt6 version of the sensorfw). * The simulator backend is dropped as obsolete / unnecessary. * Three examples are currently commented out and shall be ported with a later commit. Task-number: QTBUG-92502 Change-Id: Id523d43ed3ef177010dc73afc5812ed374cff0dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Base commit to make QtSensors runnable on WindowsJuha Vuolle2021-04-192-32/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Fair amount of work remains after the commit still, but this should allow further development as a compilable baseline: code compiles, autotests pass, and most example applications at least start. The changes: -Change examples to use QtQuickControls 2 as per removal of v1 -Fix ambiguous conditional expression compilation error -Link against runtimeobject library (previously part of winrt QPA?) -Change the .pro file rule to win32 as winrt moniker does not exist anymore -Remove references to deleted winrt event dispatcher -Fix error handling: getdefault may be successful even if there is no default sensor -Fix QCOMPARE failure output (toString has changed in Qt6) -Remove qtimestamp alias which was deprecated already in Qt5 -Remove unit test hook that does not seem to be used anywhere -From typedef to ‘using’ for readability -Q_ENUMS -> Q_ENUM as the former has been obsoleted by the latter -Add qt6 changes qdoc page Task-number: QTBUG-88616 Change-Id: I92c168228ba76106b2c636c88f54331c76c3d2e6 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add binary compatibility file for qtsensors 5.14 branchMilla Pohjanheimo2019-12-131-0/+6860
| | | | | | | BC file built against 5.14.0 added. Change-Id: I2d845df473db90a37287cc3ecf0dffcf4978ece9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix QML API for sensor rangesUlf Hermann2019-12-032-0/+117
| | | | | | | | | | | | | | | Previously the QQmlListProperties were constructed on stack-allocated lists, which immediately turned into dangling pointers on return. Also, none of the sensor ranges was ever deleted. Keep the sensor ranges in persistent lists in the private object, parent them to the main QmlSensor object, and add some tests for them. Fixes: QTBUG-79224 Change-Id: Ie61d0aaeaaaf998c1d1f46f60c81848ae48659d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-261-1/+1
|\ | | | | | | Change-Id: Idb20ba0646891ab3b6fe73c88cee26747516eb30
| * Don't ask for gui when we don't need itEdward Welbourne2019-10-251-1/+1
| | | | | | | | | | | | | | | | Its inclusion in QT broke builds that are fine without it. Change-Id: I457def5945dc3db5b2cf2137c9de1917e941d0c3 Task-number: QTBUG-79353 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Replace the deprecated qSort() -> std::sort()Sona Kurazyan2019-08-261-3/+3
|/ | | | | | Task-number: QTBUG-76491 Change-Id: I3fd78291e117947f38c77360054b8317561ffa28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Binary compatibility file for Qt 5.13.0 for QtSensorsMilla Pohjanheimo2019-08-141-0/+6821
| | | | | | | | BC file added. Change-Id: Iec44777c1e7cf46c2c880cbb34ec394904d67736 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Binary compatibility file for QtSensors for Qt 5.12Milla Pohjanheimo2018-12-181-0/+6451
| | | | | | | Binary compatibility file added. Change-Id: I15a1890d0a921f4427b777d2324649e85db58bbb Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Add binary compatibility file for 5.11 for QtSensorsMilla Pohjanheimo2018-06-051-0/+6386
| | | | | | | Binary compatibility file for bic test added. Change-Id: Id0b45f457fd00ee388070fd07cb5dec69834d514 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-0/+6386
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I17dec1cd2d4934710663e5fa97c926a65fe301e5
| * Add binary compatibility file for QtSensors for 5.10Milla Pohjanheimo2018-01-081-0/+6386
| | | | | | | | | | | | | | | | File to test binary compatibility for 5.10 added Change-Id: Ic86425ada00f5c3804d50fff6d2e8618b2bc923e Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add missing override and remove redundant virtualAlexander Volkov2017-11-1419-65/+65
| | | | | | | | | | Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | testSingleGestures: Fix for case of multiple gesturesAlexander Volkov2017-11-141-10/+21
|/ | | | | | | | | | | | | | | | This test fails sometimes for the twist gesture data, because it contains 3 gestures. QTRY_COMPARE_WITH_TIMEOUT usually stops comparison after recognition of the first gesture, but it may make the first comparison after more than one gesture has been recognized and thus fail the test. Add a new column to the test data with a list of gestures that should be recognized and use the list in QTRY_COMPARE_WITH_TIMEOUT. It will make the error message more informative if the test will fail, and should make the test pass on all configurations. Change-Id: Icfd86831b527da4933da2a20f45ccf9617862eac Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Update binary compatibility files for Qt5.9.0 for QtSensorsMilla Pohjanheimo2017-08-151-0/+6065
| | | | | | | Binary compatibility files updated. Change-Id: I5c712e1bee1e791731ee4a5f6573478ee680cd6e Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Fix licensingJani Heikkinen2017-05-106-175/+103
| | | | | | | | | | | | | | | | | - Remove unused old license files - Update BSD and FDL license headers - Unify licensing * Examples are nowdays licensed under BSD, update correct license header to there * Tools and tests are nowdays licensed under GPL-EXCEPT, update correct license header to those * Src is nowdays licensed under LGPL, update correct license header to there Task-number: QTBUG-57147 Change-Id: I5d9d7a3bc5e360f01ec73fb6a2a873f3173b5918 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Binary compatibility file for qtsensors (5.8.0)5.8Milla Pohjanheimo2017-02-031-0/+5884
| | | | | | | Added binary compatibility file for qtsensors Change-Id: Id281027e4342afe7b6090c5617e257f5d5481c28 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-021-1/+1
| | | | | | | 'override' keyword can be used directly since Qt 5.7. Change-Id: Ibf0fc590f7e247a310a833a22ece700ec75199bb Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-171-0/+5577
|\ | | | | | | Change-Id: I14345192d06a8a0ac9000feab6daea0f11b41f72
| * BC data files for QtSensors for Qt 5.6Milla Pohjanheimo2016-09-141-0/+5577
| | | | | | | | | | | | | | Added binary compatibility data files for tst_bic test Change-Id: I6e2b562d2d8611e43aaaae4d16fdb073a477be0c Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | BC data files added for QtSensors (5.7)Milla Pohjanheimo2016-09-161-0/+5859
| | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtSensors for Qt 5.7. Change-Id: Ia98bbfbb20142967278c70a19daa42abb9bec7af Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-5/+5
|\| | | | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-5/+5
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Ia3c3f69505650fd35982fc76e385e744b877e4df Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2044-748/+528
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I9776db2840136cadb5cb1684a066b31758e16b8c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-1/+1
|\| | | | | | | Change-Id: I4286dcb9262bf38960ff3852932012718aaa5d65
| * Stabilze some tests in Tst_qsensorgestureTestAlexander Volkov2015-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_recognizer() and tst_sensor_gesture_multi() fail in some cases. It happens because QTestRecognizer is emiting the "detected" signal every 10 ms and QTRY_COMPARE internally calls QTest::qWait(50). Thus it may happen that QTestRecognizer will emit the "detected" signal several times before the comparison. So increase the timeout for the timer in QTestRecognizer from 10 ms to 100 ms. Change-Id: I48b2b9455113db832f277abd05cc016bda5718cc Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-08-258-8/+0
|/ | | | | Change-Id: I4b06759f2a6f02ff6de0e9b1f5e758949ee081b0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove BlackBerry as supported platform from QtSensorsAlex Blasche2015-06-181-4/+0
| | | | | | | | | [ChangeLog][QtSensors][Platform Specific Changes] Removed support for BlackBerry 10 from QtSensors. Change-Id: I56788caaa53797b7d4e23bb053c3ea8b460b1341 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Certain test cases can only be built with QML availableUlf Hermann2015-03-161-2/+4
| | | | | Change-Id: I27b6bef6382c599a7ec412895fbb4da0d1760cd0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSergio Ahumada2015-02-226-0/+20772
|\
| * bic: Add 5.{1,2,3,4}.0 bic data for QtSensorsSergio Ahumada2015-02-126-0/+20772
| | | | | | | | | | Change-Id: I328a947a8a25de542950d4b5c77304c4deb876c0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Update copyright headersJani Heikkinen2015-02-1750-358/+342
|/ | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I141862df4ed2475c05ebbeb8fe447c4a6e736849 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4v5.4.0-alpha1Frederik Gladhorn2014-08-281-0/+11
|\ | | | | | | Change-Id: I7c2b192d4b3b4d745096058fd69921d855433f85
| * Add missing private headers warningv5.3.2Samuel Gaist2014-08-181-0/+11
| | | | | | | | | | | | Change-Id: I06883e0f2bb16999f13993b69b3701443912c5cc Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-2442-798/+462
| | | | | | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I99c601a398559886c2900f3e04833acfceba8263 Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-111-0/+2
|\| | | | | | | Change-Id: I07a6842afc72f56c82e82906429fa422f9a82de2
| * add PLUGIN_CLASS_NAME declarations to plugin projectsOswald Buddenhagen2014-04-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | needed for automatic static linking (and later deployment). the gesture plugins are excluded from the automation based on the assumption that they are usually not needed. the example and the test plugin are also excluded for obvious reasons. Change-Id: I7645aa0daf216ce430989e13d4380dbe6dd2bbd1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix autotests expecting a trailing whitespace for qDebug streamKai Koehne2014-02-213-23/+23
|/ | | | | | | | | The behavior of QDebug was fixed in qtbase. Update autotests accordingly. Change-Id: Iec8d28f18ca6f5ff1ae960e74d0d978b212ca60b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Merge branch 'stable' into devSergio Ahumada2013-07-121-1/+1
|\ | | | | | | Change-Id: Id44a93ddf8dc778f44e9684842a759d585558ee4
| * Freefall gesture needs to be initialized into plugin to be usableLorn Potter2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | This fixes the flaky unit test failures. It also adds freefall to unit test. Task-number: QTBUG-32108 Change-Id: Ia1ee852b1e57b937fd7368073e259a139da9a697 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | add a way to collect sensor dump in the format the autotests can use.Lorn Potter2013-05-086-0/+558
| | | | | | | | | | Change-Id: Iec9be6e858aabd579ea61e48fd5b9d884c980fc3 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>