qtdeclarative/tools
Shawn Rutledge 410c2a4440 Remove resize guards from qml tool
Resize guards were prohibiting the initialization of the top level
item size to the window size in a qml script when executed with
the qml tool. This is usually fine because the window size is set
to the item size. However, if this is not possible (minimum window
size from the system, no explicit size on the item), the item has
a different size than the window. The item would only be adapted to
the window size after resizing the window.

This patch removes the resize guards to make the item always fill
the window on startup. The resize guard should hopefully not be needed;
the QQuickItem setters for width and height return early if it's
unchanged; QWindow::resize() does not emit changed signals if there
is not yet a platform window and width or height is unchanged;
and we hope all the overrides of QPlatformWindow::setGeometry()
will avoid making unnecessary changes. However the guards were added
in 8d9a7e47aa and I don't remember
exactly why.

Adds the test tst_qml::itemAndWindowGeometry to check combinations of
--config, --qwindowgeometry and qml files whose root item has or doesn't
have its own dimensions, or changes its dimensions after being shown.

Done-with: Matthias Rauter <matthias.rauter@qt.io>
Pick-to: 6.5
Fixes: QTBUG-114068
Fixes: QTBUG-116753
Change-Id: Ib972e0bfc25809441d378c53dabb60653314f5a6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 05e0dc2a88)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-12 19:03:21 +00:00
..
qml Remove resize guards from qml tool 2023-09-12 19:03:21 +00:00
qmlcachegen qmlcachegen: Add a --verbose command line option 2023-04-24 22:22:13 +02:00
qmldom Remove DomItem::loadFile code-duplication and use correct environments 2023-03-29 19:07:25 +02:00
qmleasing Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
qmlformat Remove DomItem::loadFile code-duplication and use correct environments 2023-03-29 19:07:25 +02:00
qmlimportscanner Port from container::count() and length() to size() - V5 2022-10-13 00:18:35 +02:00
qmljs Remove the manual undef of the min/max macros, or def NOMINMAX 2023-06-06 11:51:43 +00:00
qmljsrootgen Port to new Q_UNREACHABLE_RETURN() 2022-10-20 23:59:33 +02:00
qmllint QQmlSA: Create an abstraction layer for static analysis 2023-05-30 13:42:35 +02:00
qmlls qmlls: fix the order in which the build directory is obtained 2023-06-23 09:04:34 +00:00
qmlplugindump qmlplugindump: Don't crash on value types with extensions 2023-01-04 08:55:55 +01:00
qmlpreview Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
qmlprofiler Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
qmlscene Port to new Q_UNREACHABLE_RETURN() 2022-10-20 23:59:33 +02:00
qmltc QQmlSA::ScriptBindingKind: Turn into scoped enumeration 2023-09-09 08:07:20 +02:00
qmltestrunner Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
qmltime Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
qmltyperegistrar qmltyperegistrar: Improve the file open error message 2023-05-17 15:12:21 +02:00
CMakeLists.txt qmlls: fix the order in which the build directory is obtained 2023-06-23 09:04:34 +00:00