summaryrefslogtreecommitdiffstats
path: root/src/testlib/qpropertytesthelper_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Include qproperty.h where neededMarc Mutz2021-11-041-0/+1
| | | | | | | Don't rely on transitive include from qobject.h, which will go away. Change-Id: I99dd97ff4fb1d0632d040daab0bffa2d7b85d3ae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add a helper method for testing write-once bindable propertiesJuha Vuolle2021-04-301-4/+117
| | | | | | Change-Id: I4f5a2ca983902beccf967e983083cc7a315b8ef6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve error message in bindable property testAndreas Buhr2021-04-231-8/+14
| | | | | | Change-Id: I96a9f36657b49814b540c0b909c4642422d49b35 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* qpropertytesthelper: Check that the types matchFabian Kosmale2021-04-221-0/+11
| | | | | | | | | | | | | | If you have a property myprop of type float, testReadWritePropertyBasics would happily accept testReadWritePropertyBasics(myObject, 1, 2, "myProp") The test would then fail when setting bindings, as we would try to install a binding of type int on a float property, which gets rejected at runtime. To prevent unexpected failures, verify that the types match before doing any further checks. Change-Id: I3893563fce0e11f9e20afa7c6a1e1fe0385382ab Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QTest: improve the read-only property test helperSona Kurazyan2021-04-201-0/+12
| | | | | | | | Add a check that setting a binding on the read-only property has no effect, nor does trying to change its value via such a binding. Change-Id: Id7b55cd53256961faface7ef155225664cdee97a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTest: add helper methods to test bindable propertiesIvan Solovev2021-04-161-0/+304
This patch adds helper methods to test bindable properties in the QTest lib. These methods can be useful in many Qt modules, so we decided to have them in qtbase. For now they are in the private header, because we are not sure that they can be useful for the end users. Task-number: QTBUG-89874 Change-Id: I6738728df1bcd895758008ef2ade0d3693802c3e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>