<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quicktestutils/quick, branch 6.10</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Change qWarning for a qDebug to stop tst_QQmlTreeModel from failing</title>
<updated>2026-01-08T15:37:38+00:00</updated>
<author>
<name>Frédéric Lefebvre</name>
<email>frederic.lefebvre@qt.io</email>
</author>
<published>2025-12-02T15:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5ed82997a1492915b5dadcbe1b568735c9f1f8d2'/>
<id>5ed82997a1492915b5dadcbe1b568735c9f1f8d2</id>
<content type='text'>
All tests from tst_QQmlTreeModel are calling the function showView
which has a qWarning on Wayland making all of the tests fail when
warnings are treated as an error.

Change it for a qDebug, keeping the information from the qWarning
while enabling the tests to continue.

Change-Id: I5edd79d15c13c01b126a78b423592099f3ef6379
Reviewed-by: Axel Spoerl &lt;axel.spoerl@qt.io&gt;
(cherry picked from commit bb025514cfc1453d4b8ac32ff87bd253074cb482)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit d82e21cefb137022054d189d9c8e02ff7c152220)
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All tests from tst_QQmlTreeModel are calling the function showView
which has a qWarning on Wayland making all of the tests fail when
warnings are treated as an error.

Change it for a qDebug, keeping the information from the qWarning
while enabling the tests to continue.

Change-Id: I5edd79d15c13c01b126a78b423592099f3ef6379
Reviewed-by: Axel Spoerl &lt;axel.spoerl@qt.io&gt;
(cherry picked from commit bb025514cfc1453d4b8ac32ff87bd253074cb482)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit d82e21cefb137022054d189d9c8e02ff7c152220)
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickVisualTestUtils: fix bug in forEachStep</title>
<updated>2025-04-23T07:00:03+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2025-04-18T08:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9bebb7017b15da1dc9ee6401106a0d92620f4a33'/>
<id>9bebb7017b15da1dc9ee6401106a0d92620f4a33</id>
<content type='text'>
The calculation for progress was wrong.

With enough steps moving towards a position that's centered over an
item, this wouldn't have been noticeable. However, with only a couple
of steps, it will fail to reach its target.

Before:

    i=0, progress=0
    i=1, progress=0.333333
    i=2, progress=0.666667

After:

    i=0, progress=0
    i=1, progress=0.5
    i=2, progress=1

forEachStep(1, func) is silly: then there is just one step, so we only
call func(1.0) once, and avoid divide-by-zero.

Task-number: QTBUG-105856
Task-number: QTBUG-136031
Pick-to: 6.5 6.8 6.9
Change-Id: Ia8e37e3810ab3e94a17bab6d40087e521f1abde0
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The calculation for progress was wrong.

With enough steps moving towards a position that's centered over an
item, this wouldn't have been noticeable. However, with only a couple
of steps, it will fail to reach its target.

Before:

    i=0, progress=0
    i=1, progress=0.333333
    i=2, progress=0.666667

After:

    i=0, progress=0
    i=1, progress=0.5
    i=2, progress=1

forEachStep(1, func) is silly: then there is just one step, so we only
call func(1.0) once, and avoid divide-by-zero.

Task-number: QTBUG-105856
Task-number: QTBUG-136031
Pick-to: 6.5 6.8 6.9
Change-Id: Ia8e37e3810ab3e94a17bab6d40087e521f1abde0
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix broken hover in ApplicationWindow's background</title>
<updated>2025-04-23T06:46:45+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2025-04-17T02:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2a424a02946bd99c265ff0610bb401816e819aec'/>
<id>2a424a02946bd99c265ff0610bb401816e819aec</id>
<content type='text'>
8fb643f6d63813a5a8df5e829e4ddeb357e0348d fixed ComboBox not being
hoverable by setting QQuickApplicationWindowPrivate::control's
hoverEnabled property to true. By doing so, it ensured that only
that control and its parent chain could get hover events, breaking
hover for e.g. background.

The correct fix is to adapt QQuickControlPrivate::calcHoverEnabled
to skip the property("hoverEnabled") == true check for
QQuickApplicationWindowPrivate::control, resulting in it falling back
to the global checks.

- Remove code added in 8fb643f6d63813a5a8df5e829e4ddeb357e0348d.
- Move QQuickApplicationWindowPrivate declaration into its own header
so that code outside the .cpp file (qquickcontrol.cpp, in this case)
can use it.
- Document behavior of hover flags in
void QQuickItem::setAcceptHoverEvents.
- Move the check done in tst_QQuickControl::hoverEnabledDefault()
into the new tst_QQuickApplicationWindow::hoverInBackground()
since they're closely related.
- Add initial starting position argument to PointLerper's constructor
since it wasn't previously possible to set it.
- Remove unused headers in qquickapplicationwindow.cpp.

Fixes: QTBUG-133886
Fixes: QTBUG-136031
Pick-to: 6.9
Change-Id: Ic32f902be6433c1c9dc9f4610c5715ce1537e605
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
8fb643f6d63813a5a8df5e829e4ddeb357e0348d fixed ComboBox not being
hoverable by setting QQuickApplicationWindowPrivate::control's
hoverEnabled property to true. By doing so, it ensured that only
that control and its parent chain could get hover events, breaking
hover for e.g. background.

The correct fix is to adapt QQuickControlPrivate::calcHoverEnabled
to skip the property("hoverEnabled") == true check for
QQuickApplicationWindowPrivate::control, resulting in it falling back
to the global checks.

- Remove code added in 8fb643f6d63813a5a8df5e829e4ddeb357e0348d.
- Move QQuickApplicationWindowPrivate declaration into its own header
so that code outside the .cpp file (qquickcontrol.cpp, in this case)
can use it.
- Document behavior of hover flags in
void QQuickItem::setAcceptHoverEvents.
- Move the check done in tst_QQuickControl::hoverEnabledDefault()
into the new tst_QQuickApplicationWindow::hoverInBackground()
since they're closely related.
- Add initial starting position argument to PointLerper's constructor
since it wasn't previously possible to set it.
- Remove unused headers in qquickapplicationwindow.cpp.

Fixes: QTBUG-133886
Fixes: QTBUG-136031
Pick-to: 6.9
Change-Id: Ic32f902be6433c1c9dc9f4610c5715ce1537e605
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Port away from QPair</title>
<updated>2025-04-12T05:39:59+00:00</updated>
<author>
<name>Zhao Yuhang</name>
<email>2546789017@qq.com</email>
</author>
<published>2025-04-10T08:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=60297d4d1e17705c128d11a1ef6f200e59ba4708'/>
<id>60297d4d1e17705c128d11a1ef6f200e59ba4708</id>
<content type='text'>
QPair is just an alias of std::pair anyway.

Task-number: QTBUG-115841
Change-Id: I26fc90adcc775aac9955ad57304af914dc4ed48f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QPair is just an alias of std::pair anyway.

Task-number: QTBUG-115841
Change-Id: I26fc90adcc775aac9955ad57304af914dc4ed48f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Check if showView uses updated position</title>
<updated>2025-02-13T05:20:41+00:00</updated>
<author>
<name>Frédéric Lefebvre</name>
<email>frederic.lefebvre@qt.io</email>
</author>
<published>2025-01-13T14:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9e9ed403d92b86c00ab9022ee6f7a4f88be72237'/>
<id>9e9ed403d92b86c00ab9022ee6f7a4f88be72237</id>
<content type='text'>
ShowView sets a position to a qquickview. The position takes
some time to be updated. In some cases a race condition can
happen on Opensuse and the un-updated position is used.

Check if the qquickview has a frame. If it does not have
one, return true. If it has a frame, verify that its
position is correct.

Check if the starting framePosition and ending position of
the qquickview are the same. Use qWaitFor to check if the
position updated. Return false if it haven't.

If the qquickview does not have a frame, the position check
is not reached.

Fixes: QTBUG-133341
Fixes: QTBUG-132648
Fixes: QTBUG-132630
Fixes: QTBUG-133342
Fixes: QTBUG-133343
Fixes: QTBUG-132941
Fixes: QTBUG-133344
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-133340
Change-Id: I866a9d2bd2499cafcbfa4ccd53a770846590a7bd
Reviewed-by: Axel Spoerl &lt;axel.spoerl@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ShowView sets a position to a qquickview. The position takes
some time to be updated. In some cases a race condition can
happen on Opensuse and the un-updated position is used.

Check if the qquickview has a frame. If it does not have
one, return true. If it has a frame, verify that its
position is correct.

Check if the starting framePosition and ending position of
the qquickview are the same. Use qWaitFor to check if the
position updated. Return false if it haven't.

If the qquickview does not have a frame, the position check
is not reached.

Fixes: QTBUG-133341
Fixes: QTBUG-132648
Fixes: QTBUG-132630
Fixes: QTBUG-133342
Fixes: QTBUG-133343
Fixes: QTBUG-132941
Fixes: QTBUG-133344
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-133340
Change-Id: I866a9d2bd2499cafcbfa4ccd53a770846590a7bd
Reviewed-by: Axel Spoerl &lt;axel.spoerl@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move duplicate mouse hover checks into a skip macro</title>
<updated>2024-11-22T01:55:10+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2024-11-21T06:54:21+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=788129c364b81d2969c79e1dab26064623c71a17'/>
<id>788129c364b81d2969c79e1dab26064623c71a17</id>
<content type='text'>
Similar to 8d454b26263e5333d8475bbab91d7b3d1d5e04d8 and
f7dffe0ae8a97dd3d7bbcf753d122b2066639fc3.

Pick-to: 6.5 6.8
Change-Id: Iaf9a4edc8a3c37f232ad3b66923864f4baa02d4d
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to 8d454b26263e5333d8475bbab91d7b3d1d5e04d8 and
f7dffe0ae8a97dd3d7bbcf753d122b2066639fc3.

Pick-to: 6.5 6.8
Change-Id: Iaf9a4edc8a3c37f232ad3b66923864f4baa02d4d
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickVisualTestUtils::compareImages: save images on all failures</title>
<updated>2024-11-15T08:21:32+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2024-11-15T04:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=f9fea69596ae22e512b94a5714af68c6fbb667c6'/>
<id>f9fea69596ae22e512b94a5714af68c6fbb667c6</id>
<content type='text'>
I didn't save images on failure for size and format mismatches because
I thought it wouldn't be useful, but it turns out it is.

Move the image-saving code into a lambda and call it for all failures.

Amends 426555aa581ce688538975176cf1c31f6ffddb24.

Change-Id: I6b2ccd8fd0a2559c88a8c525e6cd4bad1946e651
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I didn't save images on failure for size and format mismatches because
I thought it wouldn't be useful, but it turns out it is.

Move the image-saving code into a lambda and call it for all failures.

Amends 426555aa581ce688538975176cf1c31f6ffddb24.

Change-Id: I6b2ccd8fd0a2559c88a8c525e6cd4bad1946e651
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickVisualTestUtils::compareImages: fail if image depth is not 32</title>
<updated>2024-11-15T02:43:16+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2024-11-14T04:00:39+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a5412bece857c5e2742a9cc2dc2e65539416a17b'/>
<id>a5412bece857c5e2742a9cc2dc2e65539416a17b</id>
<content type='text'>
The function would ignore the depth and read memory that it shouldn't,
which can cause hard-to-diagnose failures, and heap-buffer-overflows
when ASAN is enabled.

Mismatches in depth can happen when optimizing images with optipng,
for example, which may convert color images to grayscale.

compareImages was added in 7ffea4048321b86402a9ded5255ad16ac74d0518.

Pick-to: 6.5 6.8
Change-Id: Id83dcd79ae94088996ff770d90b2c1add910fb1b
Reviewed-by: Eirik Aavitsland &lt;eirik.aavitsland@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function would ignore the depth and read memory that it shouldn't,
which can cause hard-to-diagnose failures, and heap-buffer-overflows
when ASAN is enabled.

Mismatches in depth can happen when optimizing images with optipng,
for example, which may convert color images to grayscale.

compareImages was added in 7ffea4048321b86402a9ded5255ad16ac74d0518.

Pick-to: 6.5 6.8
Change-Id: Id83dcd79ae94088996ff770d90b2c1add910fb1b
Reviewed-by: Eirik Aavitsland &lt;eirik.aavitsland@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing includes</title>
<updated>2024-10-24T12:19:23+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2024-07-29T09:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=82971e75b8e55ea14b6cbdb77ba6f280cd0c7bd5'/>
<id>82971e75b8e55ea14b6cbdb77ba6f280cd0c7bd5</id>
<content type='text'>
...in preparation of trimming down includes in QQuickItem.
As a drive-by, remove the superfluous qqml.h include from
quick/items/qquicktextutil_p.h.

Change-Id: I7ee0f459bcbfdfe07314d1f63433aaa8639870ac
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...in preparation of trimming down includes in QQuickItem.
As a drive-by, remove the superfluous qqml.h include from
quick/items/qquicktextutil_p.h.

Change-Id: I7ee0f459bcbfdfe07314d1f63433aaa8639870ac
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Share code between QQuickViewTestUtils and QQuickVisualTestUtils</title>
<updated>2024-09-27T12:09:47+00:00</updated>
<author>
<name>Tor Arne Vestbø</name>
<email>tor.arne.vestbo@qt.io</email>
</author>
<published>2024-09-24T22:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6f212bd3b76ab2f563ea7ebb738ac3e7f5f605c3'/>
<id>6f212bd3b76ab2f563ea7ebb738ac3e7f5f605c3</id>
<content type='text'>
We don't need two implementations of centerOnScreen().

Pick-to: 6.8
Change-Id: I43fbb00126547e49dad0d7b266948468a358c63e
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need two implementations of centerOnScreen().

Pick-to: 6.8
Change-Id: I43fbb00126547e49dad0d7b266948468a358c63e
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
