summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix typo in error messageDominik Holland2019-04-231-1/+1
| | | | | | | | | | Change-Id: Idff669c1ced1d4f3b347bf042eefae3905f882bb Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Remove the deprecated QIviProperty* classesDominik Holland2019-04-017-770/+0
| | | | | | | | | | | | | | | | The classes have been deprecated already for some time, so it should be fine to remove them now. Change-Id: I3f92f7091433d9775e722effd9671cdd7a75a884 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Remove the QtSimulator integrationDominik Holland2019-04-019-132/+1
| | | | | | | | | | | | | | | | | | | | This removes the QtSimulator code in the autogenerated simulator backends and the control_panel template. The simulation can now be scripted using the QIviSimulationEngine. Change-Id: I40330e9454f700278cbf6ac960f602385642b524 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add support for pending server repliesDominik Holland2019-04-017-18/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default QtRemoteObjects always wants to return a result for a function call right away. For function calls which take longer this doesn't work very well as the Qt main event loop is blocked until the result is ready and in the meantime no other communication can take place. This commit introduces a workaround for this limitation by generating a interface specific PendingResult object which can be returned as a placeholder to inform the client that the result is not yet ready. The actual result is emitted by the server using the pendingResultAvailable signal with the call-id and the result. To also support returning the result right away the return value always needs to be of type QVariant. This also has the good side effect that the client side always gets informed of whether a call has been finished or not as QtRemoteObjects doesn't provide QRemoteObjectPendingReply<void> for this. Change-Id: I68bf29b84b95042b69b5e1a18096f48ee9da7c7c Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add model support to the "backend_qtro" templateDominik Holland2019-03-148-2/+214
| | | | | | | | | | | | Fixes: AUTOSUITE-599 Change-Id: I45e8a00146556b0df159479f703e4bf74cf0c9c6 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Support zoned interfaces in the 'backend_qtro' templateDominik Holland2019-02-278-55/+885
| | | | | | | | | | | | Fixes: AUTOSUITE-585 Change-Id: I0d8fba5766963cd54e78a455b6476eed58afb96c Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Fix code style in QtRemoteObjects autotestDominik Holland2019-02-272-35/+35
| | | | | | | | | | Change-Id: If01898504c4c08e70faa7f3d34660ad7bc3021e6 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Refactor the qtro_backend implementationDominik Holland2019-02-271-2/+28
| | | | | | | | | | | | | | | | | | | | | | Move the replica connection to the constructor and make sure the initialize() function emits valueChanged functions only when the replica is already initialized, otherwise it relies on the replica to emit the changes when it's done initializing the values. Change-Id: Ife3664e174d0d6697337ea1c48a1e9423b38b755 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Improve the QtRemoteObjects autotest of the ivigeneratorDominik Holland2019-02-262-19/+24
| | | | | | | | | | | | | | | | | | | | | | Make sure the QSignalSpys are created before the signal can be emitted the first time. Added a small delay after startup and shutdown of the server to give QtRo enough time to notify all Replicas. Change-Id: I7e5187577c40e83c8d3ab0c52a0109b4aedc0a61 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Properly support the datatype 'var'Dominik Holland2019-02-155-14/+22
| | | | | | | | | | | | | | | | | | | | | | Some checks in generate.py where wrong and cause pythong exceptions. In addition some more conversion logic is needed to make sure most types can also be handled from the yaml files. Added the type to test qface files. Change-Id: I72c9043102b958afa946b93cfcf4e9bbe8422aef Fixes: AUTOSUITE-769 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Don't use the javadoc syntax in our qface filesDominik Holland2019-02-113-48/+24
|/ | | | | | | | | | | | In theory the documentation inside the qface files could be transformed using the javadoc syntax and the parse_doc filter function, but so far we only supported the brief tag and already used qdoc commands in the function directly. As the tag functionality of parse_doc is nothing we can really use, better use qdoc commands in the qface documentation right away. Change-Id: I9b23fe84acc6cd942e6fa7ec5933911b84ce22ec Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the flaky QIviSimulationEngine autotestDominik Holland2019-01-171-2/+2
| | | | | | | | only expect two signals in the animation test (one intermediate value change and the final value change) Change-Id: I85e6f87ed242935c6cfc7ed0a088862e1392b07d Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix a crash in the QIviSimulationEngine when using animationsDominik Holland2019-01-121-0/+38
| | | | | | | | | | The code handles now read and write of properties using the staticMetaObject correctly. Added more internal documentation for it and a autotest. Change-Id: Iddceeebcf5317ddb3a6986d82febc81bd374b575 Fixes: AUTOSUITE-727 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Update copyright statementsRobert Griebl2018-12-1733-2/+35
| | | | | | | | - added 2019 - everything is (c) Luxoft instead of Pelagicore from now on Change-Id: I4a6dbd46aaffbb90cea57626bd75e3972cea2cfc Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Clang-tidy and Clazy fixesDominik Holland2018-12-052-3/+3
| | | | | Change-Id: Id88db48e0e18761a9bc1b1014628bf0099c4e5cf Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Change the zone annotation to be a list instead of a mapDominik Holland2018-10-261-1/+1
| | | | | | | | This makes the annotation and the template code much easier and the annotation more intuitive to read and write. Change-Id: If59b6aac6259e9d98b090a5d7a1831f3d55acb1a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Add an autotest for the QIviSimulationEngineDominik Holland2018-10-153-0/+883
| | | | | | Task-number: AUTOSUITE-626 Change-Id: Idccf6b55c67ee046c013d6f4556d0b96e7dbac65 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the flaky tst_echoqtro autotestDominik Holland2018-10-111-44/+35
| | | | | | | | | | Don't hardcode the wait time for the signals to 1000 msec. Instead only call wait when needed and use the default of 5000 msec. This should give the test enough time also on slower systems. Change-Id: I48ec9ab3d9c92c677965f05e92b70b935c1f3ff0 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Merge remote-tracking branch 'origin/5.11' into devDominik Holland2018-09-274-4/+4
|\ | | | | | | Change-Id: If48055bb577b4b59a836b2c4a00d940401b97c6a
| * Use the full module uri for the class export macroDominik Holland2018-06-084-4/+4
| | | | | | | | | | | | | | | | | | Using the full uri makes it more unlikely that the export macro names clash with the export macro of an library with the same name. Task-number: AUTOSUITE-509 Change-Id: If5d66f7dc4d7e3e8edc4cbede1d2dfcbaad3b1d7 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Build-system cleanupDominik Holland2018-09-144-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix PLUGIN_CLASS_NAME in all places and remove PLUGIN_EXTENDS where it is not needed. For all plugins which are provided with the modules, fix the PLUGIN_EXTENDS to match the module name to also deliver the cmake file for these plugins. Renamed the MprisPlugin class name to not clash with the normal plugin name, as this is also used for the cmake filename. This should also fix build errors when trying to create the cmake files in non-existent folders. Change-Id: I102019fab327273903c8c378595c06a25964cfe8 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Make it possible to set the result for QIviPendingReply<void> from QMLDominik Holland2018-09-142-1/+37
| | | | | | | | | | | | | | | | The type check prevented this before. Now the type is ignored for QIviPendingReply<void> when used from QML. Change-Id: Iabdea29ba8d7af28f1b3e273260f0af013609253 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Improve the default_value annotation parserDominik Holland2018-07-172-0/+24
| | | | | | | | | | | | | | | | | | | | | | To be able to also add default values for models, the parser was a little bit restructured to now also support default values for structs and by that also support nested types e.g. lists. Task-number: AUTOSUITE-583 Change-Id: I09f3e278662105f5cb9d237747f732492cea7f22 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Rename the QIviSearchAndBrowseModelItem to QIviStandardItemDominik Holland2018-07-092-62/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | The QIviStandardItem should be used as a base for all autogenerated structs and also within the QIviPagingModel and all derived class. The previous name was too specific for this usecase. Forward headers for the old name and a typedef are created to make the transition as smooth as possible. Task-number: AUTOSUITE-584 Change-Id: I71b6cccc1c4f4317c6c9ea327c7672698f7dbe55 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Make the QIviProxyServiceObject class publicDominik Holland2018-07-062-4/+46
| | | | | | | | | | | | | | | | | | In addition the class is now also documented, tested and now also support to take a QHash<QString, QIviFeatureInterface*> as a hardcoded mapping. Change-Id: Ibe73334c97bd4792f763f8298bbb43027693c512 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Add a generic backend() function to QIviAbstractFeaturePrivateDominik Holland2018-07-051-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using this function in the derived classes makes the code much cleaner and less error-prone as always interfaceName() is used to get the backend object, which makes sure deriving the interface works as well. Also get rid of the disconnectServiceObject reimplementation where possible and document when it makes sense to reimplement this function. Change-Id: I05ade6e8ca8d3829cabcbbdf312db4b46a25044d Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Add new (un)registerInstance functions to the QIviPagingModelInterfaceDominik Holland2018-06-263-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | These functions help to maintain the state in the backend implementations. The registerInstance function is called for every new instance of a model using this backend. The unregisterInstance is called once the model instance is destroyed and the all data for this model can be cleanup in the backend as well. Task-number: AUTOSUITE-435 Change-Id: I2390c4fd423acb40cd50c6a2d2ff22c15aef15ab Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Use the QIviPagingModel as base class in the QIviSearchAndBrowseModelDominik Holland2018-06-191-17/+35
| | | | | | | | | | | | | | | | | | This also refactores the QIviSearchAndBrowseModelInterface to reuse the QIviPagingModelInterface. Task-number: AUTOSUITE-435 Change-Id: I52dba35a71fe5c6df1b83d56b6d145a9dfb115de Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Consolidate the Capabilities flag from QIviSearchAndBrowseModel and ↵Dominik Holland2018-06-192-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | QIviPagingModel The flag can be used by both classes and might be extended in the future. Because of that we moved it into a new QtIviCoreModule class, similar to the Qt class and the QtIviVehicleFunctionsModule class. Task-number: AUTOSUITE-420 Change-Id: I4dfa7f17473aec8cc412ab22765706ea3c3085f1 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Add the QIviPagingModel classDominik Holland2018-06-194-0/+557
|/ | | | | | | | | | | | | | The QIviPagingModel is reusing the code from the QIviSearchAndBrowseModel and implements only the interface for retrieving the content of a model using "Paging". This commit just adds the new class. New functionality will be added in following commits, as well as using the new class as the base for QIviSearchAndBrowseModel. Task-number: AUTOSUITE-420 Change-Id: I45f068efcb1d76e566556ee6ff54f429dc6b28da Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Use a different qface module nameDominik Holland2018-05-301-1/+1
| | | | | | | | | | The module name is used to define the export macro needed on windows. Currently only the last part is used, which means it is QT_EXPORT_SIMULATOR This clashes with the export macro of the qtsimulator lib. Task-number: AUTOSUITE-505 Change-Id: I215f0da54dec503039c399c37a020477ada42eb7 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Move the simulator features into it's own test folderDominik Holland2018-05-2411-16/+142
| | | | | | | | | | Previously it was part of the noprivate folder and this is now just using an additional annotation file. The new folder is also needed because the test is now using a special qface file, which only contains the supported features of the simulator Change-Id: I738e2db73b662049489e45f47a859bd77ce78d88 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Fix override warnings in the qtro template autotestDominik Holland2018-05-241-2/+2
| | | | | Change-Id: Ie82a4ac11873db1d119638713d22fe0c0329924d Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Add support for additional annotation filesDominik Holland2018-05-187-59/+15
| | | | | | | | | | | | | | The ivigenerator as well as its qmake integration now support to pass additional annotation files. This can be useful when annotations only need to be applied for a specific part, e.g. the backend plugin. This change also makes use of the feature in the autotests which now use a no-private.yaml annotation file for testing the same qface file as we use for our normal generation tests. Task-number: QTAUTO-848 Change-Id: Ib626775d2339ebf2002bc689da8303e7caf6edfa Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* ivigenerator: Fix the Q_PROPERTY NOTIFY part for uppercase propertiesDominik Holland2018-05-172-0/+3
| | | | | | | Also added a all uppercase property to our autotest qface files Change-Id: Ibd76d5bc8e025494aee3675ffa69c6badb4d8d5a Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Fix plugin loading with different configurationsDominik Holland2018-05-033-7/+17
| | | | | | | | | | | | | | | | | Previously we stopped loading a plugin when the configuration of QtIviCore didn't match the plugin version. E.g. a release build loading a debug plugin. This lead to problems when the plugin is only available in a different configuration. The new behavior tries to load the plugins with a matching configuration, but also accepts different configurations as a fallback Task-number: AUTOSUITE-288 Change-Id: Ia6d5ddf74b7b2f04fec31244b7f7db1f5c8de555 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the QIviServiceManager singleton ownershipDominik Holland2018-04-271-1/+27
| | | | | | | | | This makes sure the QIviServiceManager doesn't get deleted from the QQmlEngine when it gets destroyed Task-number: QTAUTO-843 Change-Id: Ie1aae9d9cdefaf443db35eed1483f3b6721e962f Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the qtro template autotestDominik Holland2018-04-251-2/+3
| | | | | | | start the server after the SignalSpy is created Change-Id: If7425a6d44ea8bd429a97bd64af7b68305e4eeeb Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Fix problems when building for test coverageDominik Holland2018-04-235-18/+3
| | | | | | | | | | | | | The coverage target needs to be available in all Makefiles not just in debug configurations Use qtLibraryTarget for all plugins in the servicemanager autotest. This will automatically add the needed postfixes for debug and release plugins Change-Id: I887e27ce1cc514d74cbaef97b02eeb935939a7cf Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Clazy and clang-tidy fixesDominik Holland2018-04-192-3/+5
| | | | | | | Applied to all modules and the plugins Change-Id: Id1dd9adb4a9f5bdcd452242785439e118d63ef10 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix bug with qtro-backend's pending repliesAntti Hölttä2018-04-091-0/+4
| | | | | | | | Calling a method through a remote backend now returns directly a failed reply if the client-server connection is not valid. Change-Id: I7be9dc5c71f111497ed03547bf1c0bc2457f9f43 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Add config check for remote objects generatorAntti Hölttä2018-03-291-1/+6
| | | | | | | | | Add a configure check that disables ivigenerator's qtro features when the qt's remoteobjects module is not available. Task-number: QTAUTO-850 Change-Id: I43eddc59d84d28f5181f9ebf039eef49fbbde8d2 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Update the QIviSearchAndBrowseModel to use the new QIviPendingReplyDominik Holland2018-03-283-19/+26
| | | | | | | | | Because of this, the indexOf function is now easier to implement and works from QML and C++. Task-number: QTAUTO-838 Change-Id: I094511abf8f55fd9728aa94e552dcc79f9bf0b58 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Use the new QIviPendingReply class in the autogenerator templatesDominik Holland2018-03-232-6/+57
| | | | | | | | | | | | | Every method inside a qface file will now return a QIviPendingReply. This also changes the signature of the QIviVehicleFunctions module and its backend implementations. Also updated the window_qml example to make use of the new returned QIviPendingReplies from the open() and close() calls. Task-number: QTAUTO-837 Change-Id: Icf8a31fcd94630254f71b0c4fb2e1ef4296591af Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* Fix backend initialization issuesAntti Hölttä2018-03-214-37/+78
| | | | | | | | | Fix initialization issues in generated backend classes and also in the QIviAbstractFeature class. Add initialization check to the autogenerated test. Add initialization and reconnection tests for remote object features. Change-Id: I5dbb179c612da721676a4b4959d8626a237f479a Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Use QMAKE_PROJECT_NAME to mark all test executables for QtCreatorDominik Holland2018-03-2013-4/+17
| | | | | | | | | | | QtCreator uses the pro file name for selecting a runnable target. In this list it's not easy to spot which executables are autotest and which are real runnable tools/examples. Adding QMAKE_PROJECT_NAME to all autotests pro files makes sure they are prefixed with tst_ as the excutable itself is as well. Change-Id: I13f21e14eccb392e4bfd14124ce483720a1f22ac Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Add the QIviPendingReply classDominik Holland2018-03-163-0/+530
| | | | | | | | | | | | | | The QIviPendingReply class is templated to provide a typesafe C++ API, but at the same time being usable from QML directly. For C++, signals are provided to inform the user that the reply has succeeded or failed. From QML one can either use the signals or using the "then" method to register JavaScript callbacks very similar to a JavaScript Promise. As the class provides the "then" method, it should also be convertable into a real JavaScript Promise. Task-number: QTAUTO-836 Change-Id: I030c70a964b48a5083ecef7f527d8a0b1c85f137 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Fix the custom signals and slots in qtro templatesAntti Hölttä2018-03-158-26/+231
| | | | | | | | | | | | | Fix the custom slot implememtation in qtro templates. Calling a slot on a remote object replica causes an asynchronous call and returns a pending result object. The current backend slot implementation merely waits for the call to finish before returning to the code that uses it. This behavior will change when all method calls are made asynchronous. Also add tests for passing a remote objects initial values to newly connected clients. Change-Id: I278bfc583a657e8a30265af8ec6c02e178f0f245 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* Fix linker errors with older Qt versionsDominik Holland2018-03-091-6/+6
| | | | | Change-Id: I33e72e89d04732b798257a6fa663dcafd42af3b9 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Add a reload method to QIviSearchAndBrowseModelDominik Holland2018-03-091-0/+30
| | | | | | | | | | | The reload() method will reset the model and fetch the data again from the backend. This also fixes some problems, which resulted in duplicated entries during the initial fetch. Change-Id: I9741f23165a2da7a1587a2893f891a386d2cbabe Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>