diff options
author | Kevin Krammer <kevin.krammer@kdab.com> | 2017-09-11 11:09:57 +0200 |
---|---|---|
committer | Kevin Krammer <kevin.krammer@kdab.com> | 2018-07-25 13:30:51 +0000 |
commit | f2c396c683f43f6dd0e875d6661b0b1fc076a239 (patch) | |
tree | 70866196c2f212511dde775cc752ff0555112f8c /tests/auto/quick/propertyrequirements/propertyrequirements.pro | |
parent | 15d439d96c504964d70cbb09b1820a93ea86dd17 (diff) |
Unit test to check for property requirements of registered QML types
Properties of C++ types registered with QML need to be either marked
CONSTANT or have a NOTIFY signal to be usable in property bindings.
A property which is neither CONSTANT not NOTIFYable will trigger a
runtime warning when being used in a property binding and might not
work as expected at all, see QTBUG-62913
This test reports these potentially problematic properties in two ways:
1) Report the QML type and its specific properties, i.e. the properties
defined in the C++ type that got registered for this type. Does not
include properties of base classes
2) Report all properties by defininf C++ class and list which QML type
is affected by it, i.e. which QML type has this property, inherited
or locally defined
Task-number: QTBUG-63120
Change-Id: Ie808835d86f87ca7c056fb20aae1ed7b182ea191
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/quick/propertyrequirements/propertyrequirements.pro')
-rw-r--r-- | tests/auto/quick/propertyrequirements/propertyrequirements.pro | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/quick/propertyrequirements/propertyrequirements.pro b/tests/auto/quick/propertyrequirements/propertyrequirements.pro new file mode 100644 index 0000000000..bcab78fa4f --- /dev/null +++ b/tests/auto/quick/propertyrequirements/propertyrequirements.pro @@ -0,0 +1,7 @@ +CONFIG += testcase cpp11 +TARGET = tst_propertyrequirements +macos:CONFIG -= app_bundle + +SOURCES += tst_propertyrequirements.cpp + +QT += qml-private testlib |