aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2023-11-30 12:52:36 +0100
committerSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2024-02-22 22:45:13 +0100
commitdd72694b6046d98a64bd99361ed9cb4613af78f8 (patch)
tree6c1e7b2579356cfef3a57de74607ae9f7450ce54 /src/qmltest
parent9ee160941064f2c18f5a2197bf85c6e8af979826 (diff)
Adapt layouts to take advantage of new size policy information
The size policy been defined for QQuickItem and its subclasses (as part of task QTBUG-117597). This commit adds code so that Qt Quick Layouts will effectively use them. It also have an opt-out code path by testing for QGuiApplication::testAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy) Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: I624509a77a870d72a5c4ce96505516bf30801559 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/qmltest')
-rw-r--r--src/qmltest/quicktest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index a10bbb0a15..c91c49ab79 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -429,6 +429,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
int quick_test_main_with_setup(int argc, char **argv, const char *name, const char *sourceDir, QObject *setup)
{
QScopedPointer<QCoreApplication> app;
+ app->setAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy);
if (!QCoreApplication::instance())
app.reset(new QGuiApplication(argc, argv));