aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix registering the QIviPendingReplies at startupDominik Holland2020-01-201-17/+19
| | | | | | | | | | | | Using a singleShot timer is not the right way as it doesn't make sure the call is really executed in the next event loop run. Instead use QMetaObject::invokeMethod(). Also reorder the qivipendingreply autotest to make sure the QML test is done first, which needs the types to be registered... Change-Id: Id4f8dd1577e653c99fd82e8ab8f93a848f9b1b79 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ivigenerator: Use QStringLiterals for string default_valuesDominik Holland2019-11-291-0/+8
| | | | | | | | | | | | | | For default_values in our simulation backends, QLatin1String() were generated so far, but when using these for initializing a struct with only one string property, this caused problems, as the structs are using QStrings and because of an additional QVariant constructor this caused some ambiguity for the compiler. Switching to QStringLiterals fixes this problem, as the QString constructor is used in this case. Change-Id: Iae34ef290ec5683665fdfdb75b633e748ee371f3 Fixes: AUTOSUITE-1340 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ivigenerator: Fix the 'server_qtro_simulator' template to handle ↵Dominik Holland2019-09-121-0/+2
| | | | | | | | | | | | 'getter-name' correctly The underlying QtRO transport doesn't allow us to define the getter or setter names for the property, that's why we need to use the property name when deriving from the autogenerated source classes. Change-Id: I417e85af5460d51fab9964fc163279e5eea3afe1 Fixes: AUTOSUITE-1242 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* ivigenerator: Support enums and flags as return values of operationsDominik Holland2019-08-286-0/+79
| | | | | | | | | Also add a generation test, as well as as testing the functionality using QtRO. Change-Id: I9a26ca595fdb9e8522fd3cc01d0b7337e86a1dad Fixes: AUTOSUITE-1190 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Dominik Holland2019-08-271-1/+3
|\ | | | | | | Change-Id: I091bb051fb74b4615daeb234dc8982449ab6cd6c
| * Fix build to work without the QtGui moduleDominik Holland2019-07-081-1/+3
| | | | | | | | | | | | | | | | Tests are skipped in this configuration because a lot of tests rely on QtQuick being available. Change-Id: I1a1661474f9279f2a8f7c3de24786629e73f75a4 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add support for custom templatesDominik Holland2019-08-016-1/+176
| | | | | | | | | | | | | | | | | | | | | | | | The support for this was already partially available, but some checks in the prf file as well as a limitation in generate.py prevented this to be usable. Also add a autotest for this to keep supporting it in the future Change-Id: Iee0b7593d788d4ee30d3483ceaa141439f93a2c4 Fixes: AUTOSUITE-1162 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Add the 'qmlplugin' template to the ivigenerator generation testsDominik Holland2019-06-116-0/+40
| | | | | | | | | | Change-Id: I638092b79abe931a5b4601cdc2236903c561444d Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
* | Correctly emit change signals when clearing the ServiceObjectDominik Holland2019-06-112-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | When the serviceObject of a feature is set to null, the feature is responsible to reset its state to the default again. This commit will make sure that not just the state is fixed, but also reflected to the outside by emitting the change signals. Task-number: AUTOSUITE-1000 Change-Id: I4bc696f0179975a2d719ad420718b574010f5a5e Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Improve the ivigenerator test coverageDominik Holland2019-05-145-0/+58
| | | | | | | | | | | | | | | | Also use the 'backend_qtro' and 'simulation_server_qtro' in the autotest to make sure they generate buildabe code, with and without annotations. Change-Id: I028a52ea42812d827e23a43292b6f0f9c162b02a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | ivigenerator: Add a autotest which tests the generation without any annotationDominik Holland2019-05-148-0/+201
| | | | | | | | | | | | | | | | This should make sure the annotations are optional and the templates provide a working default implementation. Change-Id: I1ec3b655b9d5c24e839bfea4c4bf1c674839b10d Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Use the same qface test file also for the QtRemotObject based autotestsDominik Holland2019-05-1411-191/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure our templates support all tested types and generates code which works as expected. This already showed a problem when serializing a QFlag property (QTBUG-75676), which gets fixed by registering a conversion function for our flags in the autogenerated code. Change-Id: I48e4c0a3ca5f98bdc45f3d7d6b83d88c1ae56c2c Fixes: AUTOSUITE-794 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Introduce a internal QtRemoteObject helper moduleDominik Holland2019-05-143-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This module provides helper functions when using QtRemoteObjects and starts using it in the autogenerator templates and the handwritten servers. The helper provides the following: * generic error handling * conversion from QIviPendingReply to a pending call on the source side * conversion to QIviPendingReply on the replica side Change-Id: Ic9030c89b8153626340cc786d97ecdae416e699d Fixes: AUTOSUITE-929 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Refactor the QIviSearchAndBrowseModelInterfaceDominik Holland2019-05-081-54/+41
| | | | | | | | | | | | | | | | | | The refactoring is needed to better support async backends e.g. QtRO. Change-Id: I10d8e9fd34afb05443d8ebdeb225385178e9b88f Fixes: AUTOSUITE-928 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | Make the QIviQueryTerm and QIviOrderTerm classes serializableDominik Holland2019-05-071-0/+11
| | | | | | | | | | | | | | | | This is needed to make a full featured generic async backend for the QIviSearchAndBrowseModel. Change-Id: Ifcbd6d86d45348f92427c78ce8ce48a918beeb6a Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | 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>