summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix for losing map item focus while dragging themPaolo Angelelli2016-06-021-6/+22
| | | | | | | | | | | | QDeclarativeGeoMapItemBase::childMouseEventFilter currently does a contain() check on the clicks but also on the mouse move events. by not doing it on mouse move events the problem seems fixed, but the autotests get broken because it seems that the map doesn't get panned anymore but the element gets dragged instead. Task-number: QTBUG-52075 Change-Id: I5ce340ca591ec924eebed1fe7acda18d31301fc5 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Replace waitForRendering calls in qml unit testsMichal Klocek2016-05-2611-152/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes eea315187d1add70aaf69745c031b8d6342b2303 moved map items final position calculation to "polish" call of sg. In unit testing "waitForRendering" was introduced to sync between input events processing and items being polished. Unfortunately this approach is race condition prone, since render can run in separate thread and frame swapped signals are emitted from render thread. Replace waitForRendering with waitForPolished instead. Improve test execution by providing init() and intTestCase() functions for map items unit tests, so test can be run "out of order" manner. Add missing namespace macros for location test qml plugin. Task-number: QTBUG-31797 Task-number: QTBUG-53455 Change-Id: Iec083143ae621e5be603d03f43d6ef260b056d0f Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QtLocation autotest fixPaolo Angelelli2016-05-201-1/+1
| | | | | | | Apparently this test passed until now for mysterious reasons Change-Id: I9597c13bc7b3d8fee148d6e1095b7a09ea3b37dc Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Windows: Skip flaky tests in declarative_ui.Friedemann Kleint2016-05-181-0/+4
| | | | | | | Task-number: QTBUG-53455 Change-Id: Ib65496de7e59341fe4ed8a443aed10fe4b2a63d4 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* decruft project fileOswald Buddenhagen2016-05-101-6/+0
| | | | | | | the "created by qt creator" header is not supposed to be checked in. Change-Id: Ib5cc25c57d3d096f818d67169ec98c9f3cb75c47 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* make use of COPIESOswald Buddenhagen2016-04-281-6/+3
| | | | | Change-Id: Ie1fe505d7b07a66e41ed7968275feaa98abe46d2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Added methods for modifying QDeclarativePolylineMapItem.v5.6.0-beta1Harald Meyer2015-12-141-0/+59
| | | | | | | | | | | Added the methods insertCoordinate(index, coordinate), replaceCoordinate(index, coordinate), removeCoordinate(index), pathLength(), coordinateAt(index) to the QDeclarativePolylineMapItem. Change-Id: I8b1f7e01cf814fe6fdb9f2da376793891514b5f0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Improve map item rendering performanceMichal Klocek2015-11-276-45/+74
| | | | | | | | | | | | A flood of input events, such as when pinch, triggers multiple map item geometry updates to occur per frame. These geometry updates are potentially expensive and only the last generated geometry is used. Mark items to be polished to make geometry updates once per frame when updatePolish() is called. Done-with: Aaron McCarthy <aaron.mccarthy@jollamobile.com> Change-Id: I0af40e2d0b09c8364382d4b4c018988f3986f7f0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix tile fetcher from test plugin.Michal Klocek2015-11-251-27/+36
| | | | | | | | | | | | | | | Requesting tiles immediately with test plugin was not implemented, what's more the current delayed implementation was keeping pointer only to last requested tile, which on slow machines ended up on "downloading" only one tile (last one) This change is required to fix the CI qtlocation flaky tests. Change-Id: I107701692a70b45401e7219ad7ee0f4a372efb04 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix MapGestureArea APIMichal Klocek2015-11-231-30/+75
| | | | | | | | | | | | | | | | | Qmlfy map gesture area API: * do not use "is" for properties (panActive,pinchActive) * do not use "active" for accepted gestures (acceptedGestures) * do not use "ZoomGestures" (PinchGesture) * make private panEnabled, pinchEnabled * remove pan/pinchEnabled signals * update documentation * fix order of emitting panFinished, flickFinished [ChangeLog][MapGestureArea] Improve QML API including renaming and removal of obsolete elements. Change-Id: I643c923dcd94388475feb402b29ce3df916037a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Remove fitViewportToGeoShape from map qml apiMichal Klocek2015-11-232-12/+4
| | | | | | | | | Use visibleRegion to fit the map's viewport [ChangeLog][Map] Remove fitViewportToGeoShape from map qml api Change-Id: I378329602a5c1f4cceda327f7abcca61c1217564 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix coordianteAnimation testMichal Klocek2015-11-231-2/+6
| | | | | Change-Id: I755630bb361a83e67a329c6c07048623fe566ede Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* geocode tests: use tryCompare after waitLaszlo Agocs2015-11-031-50/+25
| | | | | Change-Id: I9ee2842ec3969323b3195e5a7690bebb0a05029c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Split QGeoTileCache for easier customization of the tile cache.Harald Meyer2015-10-221-1/+1
| | | | | | | | | | | | | | | The QGeoTileCache is split into two classes: The abstract class QAbstractGeoTileCache offers interfaces for inserting and getting tiles, as well as getting cache status information such as used texture memory. The new class QGeoFileTileCache implements QAbstractGeoTileCache and offers a file based caching implementation (the implementation is the same as before splitting the class). Change-Id: I2eab7491d489ac5b251c1296b67688901f5cc7d7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Bump all QtLocation 5.5 tags to 5.6Alex Blasche2015-09-2312-12/+12
| | | | | | | | | | | | | | | 5.5 was a tech preview release. The real release is 5.6. Some 5.5 interfaces did change. It is possible that there are apps in existence which are based on the 5.5 API's. To avoid miscommunication we bump all version tags to the real first release version. The existing 5.5 QML imports will continue to work but apps may encounter API changes when they move from 5.5 to 5.6. The API changes are listed in the QtLocation documentation. Change-Id: Ia7000e871a5ee6b09234e5d58d4fc8927e93b154 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Remove dependency on libgeoclue.Aaron McCarthy2015-09-103-23/+105
| | | | | | | | | | | | | | | | Re-implement Geoclue plugin using only Qt DBus dropping both the build-time and run-time dependency on libgeoclue. Allowing the Geoclue plugin to be build on all platforms that support Qt DBus. The priority of the Geoclue plugin has been lowered slightly so that the native position plugin, if available, has precedence. [ChangeLog][QtPositioning][Position] The Geoclue plugin has been re-implemented using Qt DBus. Task-number: QTBUG-40702 Change-Id: Ia06d089bfb46c10769ccffd765c044c361a9b484 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Skip loading real plugins in testsLaszlo Agocs2015-09-091-1/+2
| | | | | | | | | | Introduce a new plugin metadata field "Testable" that can be used to indicate that using the plugin in question in test runs (e.g. in a CI environment) is dangerous. We can then check for QT_QTESTLIB_RUNNING and skip the plugin in question. Change-Id: Iabe9f1600d7274e0e9224dc49d02aa2e5d3cabd6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Do not double delete in positioning test appLaszlo Agocs2015-09-091-4/+4
| | | | | | | Otherwise it can crash on exit. Change-Id: I9e107bd94a6f8a6f2d6600e18a532d313534560c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Make use of incubator to asynchronously instantiate delegatesAaron McCarthy2015-09-091-37/+62
| | | | | | | | This has the side effect that map items instantiated by the view are no longer be added to the map in a deterministic order. Change-Id: I5933136e8d9dbf0e698353370b9bfc0affe146ac Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix incorrect include guardLaszlo Agocs2015-09-071-1/+1
| | | | | | | Clang warns about it. Change-Id: I4281622a2928890c2d88e3a483c18fba420d0afd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Harden the Routing QML testv5.6.0-alpha1Alex Blasche2015-09-031-6/+3
| | | | | | | | We cannot rely on the CI to respond on time after small timeouts like 200ms. Change-Id: I6569e0288e204a5e2096833abd086f3f61020239 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Update Error enums for GeoCode & Route model typesAlex Blasche2015-08-282-25/+27
| | | | | | | | | | | 1.) Remove not required/duplicated enums 2.) Add docs for new enum values 3.) Sorted the enums by alphabet (except for NoErrror) 4.) Other minor spelling corrections 5.) Update and expand tests Change-Id: I83bf9e5e40f1237ead45320d020b315b39442946 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Re-enable QML geocoding unit testAlex Blasche2015-08-281-16/+9
| | | | | | | | | | | | | | They were disabled when trying to get qtlocation pass through the new CI. The failure reason were the delayed geocoding requests. The plugin employs a 200ms timeout before answering such requests. The unit test aligned its wait times along the same timeout values. Unfortunately this is not testable in the CI as those timeouts are not guaranteed. Task-number: QTBUG-47423 Change-Id: I1e3accaf1590f0c95282a62a8cc02a76de71b47c Reviewed-by: Harald Meyer <dev@meh.at> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Disable MapPinch test due to flakinesssAlex Blasche2015-08-281-0/+0
| | | | | | | Task-number: QTBUG-47970 Change-Id: I50c287f895a3c815a5055bb6fee0b663bd7f227d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Fix routing test for OSXAlex Blasche2015-08-251-12/+7
| | | | | | | | OSX test machines seem to have trouble with correct timer invocations. This patch makes the failing code point less reliant on timeing issues. Change-Id: If70d3c763336a5993fc75ecb66db6fbcf20453a6 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Adjust plugin path for win to cope with Debug/Release dirsAlex Blasche2015-07-2912-0/+60
| | | | | | | | | This messes up the relative path to the test plugins in QCoreApplication::libraryPaths(). Change-Id: I0ab35ba9be60ea9ec2383bbe3791baebb844f2a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Temporarily disable test to make qtlocation pass in dev CI.Alex Blasche2015-07-291-0/+3
| | | | | | | | The tests intermittently fail on OSX 10.10 Task-number: QTBUG-47423 Change-Id: I4bc4bbaa4cde1a309895281811f88496cab84ccf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Prospective fix for running tests in the new CI on OS XSimon Hausmann2015-07-2912-0/+24
| | | | | | | | A hack is in place to look for the plugin in ../../../plugins/... but that won't work if we use bundles. Change-Id: I963d6267d658a0315641df1a23f4a111fe3b596e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Do not rely on synthesized MouseReleseEvent when tracking mouse pointMichal Klocek2015-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | A map pan is based on synthesized events due to the fact that rest of qt (qtcontrols , mouse area etc) depend on it in case of touch handling. However when there are two touch points on the screen pinch handling is activated. After accepting the touch event, mouse synthesized events are no longer generated for the first touch point, what's more as a result we might not get even mouseUngrabEvent nor mouseReleaseEvent. This breaks internal tracking of mouse position. This workaround resets mouse tracking point in case of getting touchUngrabEvent. Remove dummy extra MouseArea from places example. TODO: fix broken mouse area state in pinch unit tests Task-number: QTBUG-46388 Change-Id: I5588fbd4dbf0c5d25c44f994292c1aae7b3d70d4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove declarative_map test applicationMichal Klocek2015-07-1028-2949/+0
| | | | | | | | The code is dead for a while and refers to early stage of maps3d, which does not exist any longer in current codebase Change-Id: I0dd633416d93d62906d956452b4943e3ed03f2c4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-291-2/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iae1f27979ba8fbb28d8bdf737d63904e75c1f4d1
| * Don't mix GeocodeModel and GeoRouteModel enumsAlex Blasche2015-06-151-2/+2
| | | | | | | | | | | | Change-Id: Ic5f7c28706e34d1f1be5c7f9986d8ddc5dd46776 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add new types of interpolation to CoordinateAnimationMichal Klocek2015-06-231-10/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A longitude animation can go in two directions West and East. Current implementation is always using the shortest animation path between two coordinates. Provide setting to overload this behavior. Add 'direction' setting to CoordianteAnimation. Implement two new interpolators and provide new private implementation derived form qquickpropertyanimation. Change-Id: Ida70780c8aef60ebea7a8b8d59f115c583430374 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add mouse and touch keep grabs and prevent stealing handling.Michal Klocek2015-06-161-0/+161
| | | | | | | | | | | | | | | | | | Add preventStealing setting to map gesture area. New functionality mirrors MouseArea preventStealing functionality. Task-number: QTBUG-36919 Change-Id: I4c077f97c61dbd0f6aeb031daa01e167b22cb48c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix warning about registering test plugin without idMichal Klocek2015-06-166-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | Fixes warning 'Module 'QtLocation.test' does not contain a module identifier directive - it cannot be protected from external registrations.' Add proper plugin description to qmldir, use proper plugin naming convention QtLocation.Test Change-Id: I67b24e2f82c6d07ec577b9cf477f9a581af65fe6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Small cleanup of _ui qml unit testsMichal Klocek2015-06-159-55/+61
| | | | | | | | | | | | | | | | Fix version numbers across test files, fix formating and remove useless debug Change-Id: Ib7721716a5e270a32c7620d087d9c2982a61fa59 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge branch '5.5' into devAlex Blasche2015-06-152-62/+55
|\ \ | |/ | | | | Change-Id: Id8b1ea1c9dc774aa6f0169c410be2c141e384da6
| * Fix activeMapType handlingMichal Klocek2015-06-102-62/+55
| | | | | | | | | | | | | | | | | | | | | | * fix map type test to use geo test plugin * add test types to test plugin * rewrite map type test so it actually tests something * fix activeMapTypeChanged signal * create default map type as NoMap type Change-Id: I9398815fe42cbdeb392bd226de0c8764d3e0bc19 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Improve error handling in map, geo and route modelsMichal Klocek2015-06-112-39/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current error handling is misleading and most of the error messages are logged only to the console. Moreover error messages are too general. For example 'plugin does not support mapping' is reported when provider credentials are missing. Emitting onErrorChanged and onErrorStringChanged does not work correctly, ie. check for errorString in onErrorChanged ends up in not up to date error message. Replace logging to console with setting an error on given component. Use setError instead of qWarning and use one single setter for errorType and errorString. Combine geocode error reporting with geoprovider errors. Combine route error reporting with geoprovider errors. Update unit tests. Move geocode unit test to _core since it is not a _ui test. Change-Id: Ia02b1bf4d88f48b963ada75fa7ed74598713c97f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix crash when calling setVisibleRegion and no pluginMichal Klocek2015-06-091-26/+154
| | | | | | | | | | Change-Id: I60824dc63f723c1d3fae00920f627fc66357f72c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Rewrite flick and pinch unit tests, fix corner casesMichal Klocek2015-06-042-284/+504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of flick and pinch test is error prone. Current tests depends on each other, which makes them not usable for qa. Instead of using one large test function, split test for self contain tests. Add test for filtering and fix pinch handling accordingly. New tests cover the case when there are interactive elements like MouseArea or ScrollView behind or in front of map element. Change-Id: I47b0f5ae8af65bf0d8110fece7b79e56a89d9534 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Rename setCamera to setCameraData in qgeocameratilesMichal Klocek2015-06-032-6/+6
|/ | | | | | | Keeps the same function name across all classes. Change-Id: I3f8b723ce513e50ea93a3fd1af99c7d2ba79a11d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add "here" prefix to all Here geoservices parametersAlex Blasche2015-05-275-11/+11
| | | | | | | Task-number: QTBUG-42151 Change-Id: I3d71ee77327478dfdda23af709bee489f83bb9f6 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Provide means to convert GeoShape to appropriate subclass in QMLAlex Blasche2015-05-261-0/+38
| | | | | | Change-Id: I1f0d1540b07af8f385ef670990a8669ec8c973d8 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Workaround for failing conversion between Q_GADGET'sAlex Blasche2015-05-261-0/+20
| | | | | | | | | | | | | | QGeoRectangle and QGeoCircle are subclasses of QGeoShape. Before this patch setting a QGeoShape property of a QML object is not possible because the QGeoRectangle/QGeoCircle cannot be converted to a QGeoShape. This patch addresses the problem by providing custom converters for the above classes. It enables QVariant::convert() for the classes above. Change-Id: I7daba5254dad0df598324432db3b1819e68648b6 Task-number: QTBUG-46232 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Reanimate tests/auto/qmlinterface.Friedemann Kleint2015-05-235-24/+25
| | | | | | | | | | | | Add CONFIG += testcase to tst_qmlinterface.cpp. Use QVERIFY2 to show QML load errors. Fix failures. Before this change, the test was not executed at all because "make check" was an empty target due to missing CONFIG += testcase. Change-Id: I6aa839fdbbbee6bdf316cbb5050fe5a5b53c12cd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Enable and update map flick and pinch autotest.Michal Klocek2015-05-223-70/+153
| | | | | | | | | | | | | Make pan drag distance inclusive in QDeclarativeGeoMapGestureArea which simplifies unit testing on different platforms. Use sceneCenter instead of lastPos for panning startup. lastPos is used with velocity sampling which makes it not reliable as a starting value. Change-Id: If0d98e834a5e2d4264a51d70c2c39846cd2a677b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Refactor fetching calls in QGeoCameraTilesMichal Klocek2015-05-212-11/+11
| | | | | | | | | Introduce dirty flags, remove redundant getters. Change fetch ifdefs to switch case, so all code gets compiled. Change-Id: I610f20098c67089bd2c2684910283f165e1109e0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fixes PIMPL in QGeoTiledMap.Michal Klocek2015-05-051-0/+2
| | | | | | | | | | | | | | This commit makes following changes: * QGeoTiledMapPrivate is now a subclass of QGeoMapPrivate. * makes QGeoMap constructor private. * change visibility of setCameraData in QGeoMap, so that only QGeoMapController can modify the camera data. * moves mapResized,changeCameraData,changeActiveMapType to private implementation interface. * moves mapVersion member function to base class. Change-Id: I336e7f72b03e845e09e445a6eebad90b2e46dbd1 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Set shorter name for class names with 'MapData'Michal Klocek2015-05-046-16/+16
| | | | | | | | Rename all references and files with 'MapData' to use shorter name 'Map'. Change-Id: I8ab790146ee28e540e6866ba0218eea61bae6e64 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>