qt5base-lts/tests/auto
Volker Hilsheimer ca15f650a1 QTabBar: don't scroll when laying out the tabs
QTabBar lays out the tabs when the bar's size or content changes,
often lazily. This should not change the scroll offset of the tabbar,
which is controlled by the user, or at most when a tab needs to be made
visible (e.g. when it becomes the current tab).

Move the logic of updating the scoll offset into the makeVisible
function, so that the scroll is only adjusted to either leave no gap
between the last tab and the right edge of the widget of there is still
a scroll; or to reset it to 0 if there is enough space for the entire
tab bar. Since layoutTabs does show and hide the scroll buttons, we
cannot skip this when the buttons are invisible. However, the
normalizedScrollRect helper now needs to return the entire widget rect
if there are no visible scroll buttons.

Add a test case that simulates the previously broken behavior where
the scroll got unnecessarily reset to 0 when resizing.

Fixes: QTBUG-113140
Pick-to: 6.5
Change-Id: Ic19fbb82821ea09cc5e7646dcbce3aa7607909c2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-04-26 12:50:49 +02:00
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake Introduce the qt_internal_project_setup macro 2023-04-24 14:20:25 +02:00
concurrent tst_qtconcurrentrun: fix UB (uninit'ed values) 2023-03-31 11:32:46 +02:00
corelib Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
dbus QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
gui Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network tst_QSslCertificate: Make it easier to check which backend is used 2023-04-25 23:39:24 +02:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Network tests: drop testing ftp proxy server 2023-04-20 16:10:03 +02:00
printsupport tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql SQL/Tests: make sure created procedures are cleaned up on exit 2023-04-15 13:56:21 +02:00
testlib Rid of 'special case' markers 2023-04-13 18:30:58 +02:00
tools Fix another warning when comparing size_t and qsizetype 2023-04-18 00:10:56 +02:00
wasm Support filter list for file input when opening a file on WASM 2023-03-07 12:50:41 +01:00
widgets QTabBar: don't scroll when laying out the tabs 2023-04-26 12:50:49 +02:00
xml QDomDocument: no longer drop a provided 'standalone' attribute if 'no' 2023-04-24 21:49:29 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00