diff options
author | Henning Gruendl <henning.gruendl@qt.io> | 2023-01-11 14:22:28 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-29 14:32:03 +0000 |
commit | 7ad7eb606a0831568dc55c782d1a7cdc8fb395b3 (patch) | |
tree | 5d58f1c4617c025543056306514b9ed59213cffa /tests/auto/qml/qqmlbinding | |
parent | a163fa3171e4fb8a95da5d64910fa7c7c8c13a37 (diff) |
Allow disabling internal deferred properties
Add environment variable to allow disabling internal deferred
properties. We should not make generalized group properties that point
to different objects immediate. However, for the intended use case it's
enough to disable internal deferred properties.
Task-number: QDS-8545
Pick-to: 6.5
Change-Id: I22d31587290020ec03274a3373a30be196185b84
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlbinding')
-rw-r--r-- | tests/auto/qml/qqmlbinding/CMakeLists.txt | 34 | ||||
-rw-r--r-- | tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp | 3 |
2 files changed, 35 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlbinding/CMakeLists.txt b/tests/auto/qml/qqmlbinding/CMakeLists.txt index bcddd51730..cce0a4f3ed 100644 --- a/tests/auto/qml/qqmlbinding/CMakeLists.txt +++ b/tests/auto/qml/qqmlbinding/CMakeLists.txt @@ -27,6 +27,22 @@ qt_internal_add_test(tst_qqmlbinding TESTDATA ${test_data} ) +qt_internal_add_test(tst_qqmlbinding_no_deferred_properties + SOURCES + tst_qqmlbinding.cpp + WithBindableProperties.h + LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::QmlPrivate + Qt::QuickPrivate + Qt::QuickTestUtilsPrivate + TESTDATA ${test_data} + DEFINES + QML_DISABLE_INTERNAL_DEFERRED_PROPERTIES +) + set_target_properties(tst_qqmlbinding PROPERTIES QT_QML_MODULE_URI "test" QT_QML_MODULE_VERSION 1.0 @@ -34,9 +50,13 @@ set_target_properties(tst_qqmlbinding PROPERTIES _qt_internal_qml_type_registration(tst_qqmlbinding) +set_target_properties(tst_qqmlbinding_no_deferred_properties PROPERTIES + QT_QML_MODULE_URI "test" + QT_QML_MODULE_VERSION 1.0 +) + +_qt_internal_qml_type_registration(tst_qqmlbinding_no_deferred_properties) -## Scopes: -##################################################################### qt_internal_extend_target(tst_qqmlbinding CONDITION ANDROID OR IOS DEFINES @@ -47,3 +67,13 @@ qt_internal_extend_target(tst_qqmlbinding CONDITION NOT ANDROID AND NOT IOS DEFINES QT_QMLTEST_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data" ) + +qt_internal_extend_target(tst_qqmlbinding_no_deferred_properties CONDITION ANDROID OR IOS + DEFINES + QT_QMLTEST_DATADIR=":/data" +) + +qt_internal_extend_target(tst_qqmlbinding_no_deferred_properties CONDITION NOT ANDROID AND NOT IOS + DEFINES + QT_QMLTEST_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data" +) diff --git a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp index c78763cf5f..a6b734acd7 100644 --- a/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp +++ b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp @@ -46,6 +46,9 @@ private: tst_qqmlbinding::tst_qqmlbinding() : QQmlDataTest(QT_QMLTEST_DATADIR) { +#ifdef QML_DISABLE_INTERNAL_DEFERRED_PROPERTIES + qputenv("QML_DISABLE_INTERNAL_DEFERRED_PROPERTIES", "1"); +#endif } void tst_qqmlbinding::binding() |