Add patch to fix QTabbar regression

This commit is contained in:
Martchus 2023-06-07 22:12:56 +02:00
parent bfa3172d69
commit a7980f7c77
22 changed files with 192 additions and 81 deletions

View File

@ -16,7 +16,7 @@
pkgname=<%= $package_name %> pkgname=<%= $package_name %>
_qtver=6.5.1 _qtver=6.5.1
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)

View File

@ -15,7 +15,7 @@
pkgname=<%= $package_name %> pkgname=<%= $package_name %>
_qtver=6.5.1 _qtver=6.5.1
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(x86_64) arch=(x86_64)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)

View File

@ -0,0 +1 @@
../mingw-w64/0013-QTabBar-recalculate-scroll-offset-when-showing.patch

View File

@ -39,20 +39,22 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm
'0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch'
'0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch'
'0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch' '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch'
'0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch') '0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch'
'0013-QTabBar-recalculate-scroll-offset-when-showing.patch')
sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed' sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed'
'787b2aad23232c3dcec9ca737ca841f2bfc0375a84fdba6eeb605fc53e78b28c' '283dc72fb579295a67c5d66a6da5e650a137e6c179f744e9a0ee0df8d4618794'
'3b37c244f12f1778d85af398bd27483bece3f5794e31aedabfb9622ed4ae02df' 'b42a97f117fc0d517eaedf26f4ebaff4ad764794f4d23dc8574e59f977da8d96'
'2b2e907d9b2e3ef1f1da241755db2f79433c71e919fe11f0c88261dc027e4fd5' '8baa38d80fbba128d41c0620e6bc01b00b1b6c17b09989aeba6aed18b1f0cbb8'
'841639befa60ada8e183190c1e30eea919a91e8548c123abe67b165f67db3b00' '624be4e17ee19815f8fe42c07e1e88cec89df091360842c432900a4b861947d4'
'388df37ef99eba651c08910bbe8244ca9a44074051e3a0128dc90bede45fa449' 'dfe3b54afe2366fee256825f19b2f2899404cf163968e8a9af1bef4a9764964a'
'dc272b9f35e93c97d5498ca9e7678193e3885a03b303b69985dea15c2e97c579' '24ce57861b4b6b315634cd2a75b9ca4f4be5c6dec22868c0e8dd3d66d471bd4d'
'1ff55c21a407eb4193836caf51e45676155854ab43258dab819b675e6bbd357d' '842336b23d7aaa9d47d6f24846dd05720390be9cb27ab81cddc3142500754c8c'
'c817b9b638c808b2c49bb20462b26637a311d040b4dfeff03be907ed9a0999dc' 'b104e7fc6f3dd6dd3d74dad07423314310454e45ac8a779f4c3991417f7628ed'
'cf691503f23eec594751f68da47bd96abf2b398144f79a625b0b338fef443406' 'fb5a9561214c941fd25a88df9ef53eae651e5fef757a6169500ff17cfb958ec2'
'9bfb7349bcf46792ec57a191355556d698655b9368de744c3f848da5d66cac23' '3942e3df5745c8ee513c6735c00fa2a993b906903939f72ae161a7a9de6de282'
'2c7e228997ac3cf2d3ad6f9e373ab298643f3e2620e4e0038816567664f66e0d' '20bf64f05496ad81cddf530d03e6805d10fb3a68411cb28c4b2cf3dbedd29147'
'65f5749461e0de6483fa684577947591a750336f6c2cd74fdd0c128e5ee25f25') '746abfd92394f48af9ac9ca67860305221e3248e1e2a99bc2c761ed84b02f024'
'6e47dd529b22736bef04f53414096d1e18e911a150ae518053dfef0b21f2fa17')
prepare () { prepare () {
cd $_pkgfqn cd $_pkgfqn

View File

@ -0,0 +1 @@
../mingw-w64/0013-QTabBar-recalculate-scroll-offset-when-showing.patch

View File

@ -13,7 +13,7 @@
pkgname=mingw-w64-qt6-base-static pkgname=mingw-w64-qt6-base-static
_qtver=6.5.1 _qtver=6.5.1
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)
@ -42,20 +42,22 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm
'0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch'
'0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch'
'0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch' '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch'
'0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch') '0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch'
'0013-QTabBar-recalculate-scroll-offset-when-showing.patch')
sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed' sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed'
'787b2aad23232c3dcec9ca737ca841f2bfc0375a84fdba6eeb605fc53e78b28c' '283dc72fb579295a67c5d66a6da5e650a137e6c179f744e9a0ee0df8d4618794'
'3b37c244f12f1778d85af398bd27483bece3f5794e31aedabfb9622ed4ae02df' 'b42a97f117fc0d517eaedf26f4ebaff4ad764794f4d23dc8574e59f977da8d96'
'2b2e907d9b2e3ef1f1da241755db2f79433c71e919fe11f0c88261dc027e4fd5' '8baa38d80fbba128d41c0620e6bc01b00b1b6c17b09989aeba6aed18b1f0cbb8'
'841639befa60ada8e183190c1e30eea919a91e8548c123abe67b165f67db3b00' '624be4e17ee19815f8fe42c07e1e88cec89df091360842c432900a4b861947d4'
'388df37ef99eba651c08910bbe8244ca9a44074051e3a0128dc90bede45fa449' 'dfe3b54afe2366fee256825f19b2f2899404cf163968e8a9af1bef4a9764964a'
'dc272b9f35e93c97d5498ca9e7678193e3885a03b303b69985dea15c2e97c579' '24ce57861b4b6b315634cd2a75b9ca4f4be5c6dec22868c0e8dd3d66d471bd4d'
'1ff55c21a407eb4193836caf51e45676155854ab43258dab819b675e6bbd357d' '842336b23d7aaa9d47d6f24846dd05720390be9cb27ab81cddc3142500754c8c'
'c817b9b638c808b2c49bb20462b26637a311d040b4dfeff03be907ed9a0999dc' 'b104e7fc6f3dd6dd3d74dad07423314310454e45ac8a779f4c3991417f7628ed'
'cf691503f23eec594751f68da47bd96abf2b398144f79a625b0b338fef443406' 'fb5a9561214c941fd25a88df9ef53eae651e5fef757a6169500ff17cfb958ec2'
'9bfb7349bcf46792ec57a191355556d698655b9368de744c3f848da5d66cac23' '3942e3df5745c8ee513c6735c00fa2a993b906903939f72ae161a7a9de6de282'
'2c7e228997ac3cf2d3ad6f9e373ab298643f3e2620e4e0038816567664f66e0d' '20bf64f05496ad81cddf530d03e6805d10fb3a68411cb28c4b2cf3dbedd29147'
'65f5749461e0de6483fa684577947591a750336f6c2cd74fdd0c128e5ee25f25') '746abfd92394f48af9ac9ca67860305221e3248e1e2a99bc2c761ed84b02f024'
'6e47dd529b22736bef04f53414096d1e18e911a150ae518053dfef0b21f2fa17')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32' _architectures='i686-w64-mingw32 x86_64-w64-mingw32'

View File

@ -1,7 +1,7 @@
From 7686993d2f493019692d560c29af10da8543f136 Mon Sep 17 00:00:00 2001 From 7686993d2f493019692d560c29af10da8543f136 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Thu, 5 Nov 2020 22:08:10 +0100 Date: Thu, 5 Nov 2020 22:08:10 +0100
Subject: [PATCH 01/12] Use CMake's default import library suffix Subject: [PATCH 01/13] Use CMake's default import library suffix
Change-Id: I3dbedaec74683e5bfd008f7f2fd1e046dfb921b2 Change-Id: I3dbedaec74683e5bfd008f7f2fd1e046dfb921b2
--- ---
@ -110,5 +110,5 @@ index 383870061b..b252e76ae5 100644
get_target_property(target_type ${target} TYPE) get_target_property(target_type ${target} TYPE)
if(target_type STREQUAL "STATIC_LIBRARY") if(target_type STREQUAL "STATIC_LIBRARY")
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From d567a4807d46e1e6036ffca340aecea6ab425de9 Mon Sep 17 00:00:00 2001 From d567a4807d46e1e6036ffca340aecea6ab425de9 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Wed, 7 Oct 2020 12:13:37 +0200 Date: Wed, 7 Oct 2020 12:13:37 +0200
Subject: [PATCH 02/12] Fix finding D-Bus Subject: [PATCH 02/13] Fix finding D-Bus
Change-Id: Ie21eb9cbc6b1b5d9c8b34eea46f54718e5926986 Change-Id: Ie21eb9cbc6b1b5d9c8b34eea46f54718e5926986
--- ---
@ -20,5 +20,5 @@ index e2a58790c4..8e0ed81f89 100644
+ set_property(TARGET dbus-1 PROPERTY IMPORTED_IMPLIB ${DBus1_LIBRARY}) + set_property(TARGET dbus-1 PROPERTY IMPORTED_IMPLIB ${DBus1_LIBRARY})
+endif() +endif()
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 42064ddb36b78e14dd647850c7743b81da935752 Mon Sep 17 00:00:00 2001 From 42064ddb36b78e14dd647850c7743b81da935752 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Thu, 5 Nov 2020 21:13:19 +0100 Date: Thu, 5 Nov 2020 21:13:19 +0100
Subject: [PATCH 03/12] Fix using static PCRE2 and DBus-1 Subject: [PATCH 03/13] Fix using static PCRE2 and DBus-1
When making a static build of Qt we're using the static version of these When making a static build of Qt we're using the static version of these
libraries and must define the corresponding macros. libraries and must define the corresponding macros.
@ -44,5 +44,5 @@ index e3008be761..9c745c16c4 100644
# include <dbus/dbus.h> # include <dbus/dbus.h>
#else #else
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 6feafcc5b1d1df4fbfb35479d9b9224e2bb44f90 Mon Sep 17 00:00:00 2001 From 6feafcc5b1d1df4fbfb35479d9b9224e2bb44f90 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Thu, 5 Nov 2020 21:59:33 +0100 Date: Thu, 5 Nov 2020 21:59:33 +0100
Subject: [PATCH 04/12] Fix transitive dependencies (of static libraries) Subject: [PATCH 04/13] Fix transitive dependencies (of static libraries)
The dependencies of these libraries are not reliably picked up by their The dependencies of these libraries are not reliably picked up by their
corresponding find modules. This change allows adding the required corresponding find modules. This change allows adding the required
@ -132,5 +132,5 @@ index d392f4dfa5..165c345e1b 100644
Qt::CorePrivate Qt::CorePrivate
Qt::SqlPrivate Qt::SqlPrivate
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 41a362273ce4e2872973e93b38b602277d304b25 Mon Sep 17 00:00:00 2001 From 41a362273ce4e2872973e93b38b602277d304b25 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Mon, 2 Nov 2020 13:47:45 +0100 Date: Mon, 2 Nov 2020 13:47:45 +0100
Subject: [PATCH 05/12] Fix libjpeg workaround for conflict with rpcndr.h Subject: [PATCH 05/13] Fix libjpeg workaround for conflict with rpcndr.h
Otherwise it won't compile against mingw-w64-libjpeg-turbo. This version of Otherwise it won't compile against mingw-w64-libjpeg-turbo. This version of
libjpeg seems to take care of the conflict already as long as jconfig.h is libjpeg seems to take care of the conflict already as long as jconfig.h is
@ -25,5 +25,5 @@ index 0d72ba01d0..a706fb4cea 100644
#ifdef const #ifdef const
# undef const // remove crazy C hackery in jconfig.h # undef const // remove crazy C hackery in jconfig.h
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From ad453dfe51bb1aea245bdd4344ede201d758e04d Mon Sep 17 00:00:00 2001 From ad453dfe51bb1aea245bdd4344ede201d758e04d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sun, 8 Nov 2020 00:33:12 +0100 Date: Sun, 8 Nov 2020 00:33:12 +0100
Subject: [PATCH 06/12] Support finding static MariaDB client library Subject: [PATCH 06/13] Support finding static MariaDB client library
We need to reverse the order to look for mariadb first (and only then We need to reverse the order to look for mariadb first (and only then
for mysql) because otherwise it would pick up the static library for mysql) because otherwise it would pick up the static library
@ -34,5 +34,5 @@ index b61d0107f2..6fb26e51f1 100644
endif() endif()
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From a9cd104a380971b6da25dbe864f2b28482249e5b Mon Sep 17 00:00:00 2001 From a9cd104a380971b6da25dbe864f2b28482249e5b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sun, 8 Nov 2020 00:34:09 +0100 Date: Sun, 8 Nov 2020 00:34:09 +0100
Subject: [PATCH 07/12] Allow overriding CMAKE_FIND_LIBRARY_SUFFIXES to prefer Subject: [PATCH 07/13] Allow overriding CMAKE_FIND_LIBRARY_SUFFIXES to prefer
static libraries static libraries
Change-Id: I4c617e0706044d31da1bd56ae51615dc8ed37099 Change-Id: I4c617e0706044d31da1bd56ae51615dc8ed37099
@ -25,5 +25,5 @@ index 7a69a63501..5a7183c588 100644
# #
# Macros and functions for building Qt modules # Macros and functions for building Qt modules
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 7ea34331c7d3befa90c54a375d827b3d370c8691 Mon Sep 17 00:00:00 2001 From 7ea34331c7d3befa90c54a375d827b3d370c8691 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sat, 26 Jun 2021 22:24:12 +0200 Date: Sat, 26 Jun 2021 22:24:12 +0200
Subject: [PATCH 08/12] Fix crashes in rasterization code using setjmp Subject: [PATCH 08/13] Fix crashes in rasterization code using setjmp
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@ -248,5 +248,5 @@ index d0f2468e6a..d1d7d2e17a 100644
"Description": "FreeType is a freely available software library to render fonts.", "Description": "FreeType is a freely available software library to render fonts.",
"Homepage": "http://www.freetype.org", "Homepage": "http://www.freetype.org",
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 59d4ca0feffb15deb1bd605a9c305f4eed501415 Mon Sep 17 00:00:00 2001 From 59d4ca0feffb15deb1bd605a9c305f4eed501415 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sun, 24 Apr 2022 23:00:27 +0200 Date: Sun, 24 Apr 2022 23:00:27 +0200
Subject: [PATCH 09/12] Find fontconfig via pkg-config for correct handling of Subject: [PATCH 09/13] Find fontconfig via pkg-config for correct handling of
its dependencies its dependencies
CMake's own find module unforunately does not consider fontconfig's deps so CMake's own find module unforunately does not consider fontconfig's deps so
@ -59,5 +59,5 @@ index d8319c120b..afb3cf96bb 100644
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm) qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz) qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 6b7eb6cfc9b704d7c343967db11025a95d5386e6 Mon Sep 17 00:00:00 2001 From 6b7eb6cfc9b704d7c343967db11025a95d5386e6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sun, 24 Apr 2022 23:49:36 +0200 Date: Sun, 24 Apr 2022 23:49:36 +0200
Subject: [PATCH 10/12] Fix dependency of xcb-image on xcb-util Subject: [PATCH 10/13] Fix dependency of xcb-image on xcb-util
Considering this linker error, xcb-image apparently depends on xcb-util: Considering this linker error, xcb-image apparently depends on xcb-util:
``` ```
@ -44,5 +44,5 @@ index dc60289401..3dd06d4cd0 100644
set(XCB_XFIXES_component_deps XCB RENDER SHAPE) set(XCB_XFIXES_component_deps XCB RENDER SHAPE)
set(XCB_XVMC_component_deps XCB XV) set(XCB_XVMC_component_deps XCB XV)
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From c619e5dca0dc5178270039cabd5a429c1b576ef9 Mon Sep 17 00:00:00 2001 From c619e5dca0dc5178270039cabd5a429c1b576ef9 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Tue, 26 Apr 2022 20:16:31 +0200 Date: Tue, 26 Apr 2022 20:16:31 +0200
Subject: [PATCH 11/12] Allow using properties of PkgConfig targets for glib2 Subject: [PATCH 11/13] Allow using properties of PkgConfig targets for glib2
to handle deps of static glib2 to handle deps of static glib2
Change-Id: I37d20256d17ae9cc0775e32aa479f1e433ece908 Change-Id: I37d20256d17ae9cc0775e32aa479f1e433ece908
@ -70,5 +70,5 @@ index a6a16b494f..a5da57824c 100644
set_package_properties(GLIB2 PROPERTIES set_package_properties(GLIB2 PROPERTIES
URL "https://wiki.gnome.org/Projects/GLib" URL "https://wiki.gnome.org/Projects/GLib"
-- --
2.40.1 2.41.0

View File

@ -1,7 +1,7 @@
From 5be4478ee923d0ce4fdcd954f8e00bd1a8baf3f2 Mon Sep 17 00:00:00 2001 From 5be4478ee923d0ce4fdcd954f8e00bd1a8baf3f2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net> From: Martchus <martchus@gmx.net>
Date: Sun, 1 May 2022 23:28:26 +0200 Date: Sun, 1 May 2022 23:28:26 +0200
Subject: [PATCH 12/12] Allow using properties of PkgConfig targets for Wayland Subject: [PATCH 12/13] Allow using properties of PkgConfig targets for Wayland
to handle deps of static libs to handle deps of static libs
Change-Id: I2a4acf0acaf5a363d551384bb4c33c48a3792f27 Change-Id: I2a4acf0acaf5a363d551384bb4c33c48a3792f27
@ -49,5 +49,5 @@ index 233cc88d02..875c71377c 100644
set_package_properties(Wayland PROPERTIES set_package_properties(Wayland PROPERTIES
URL "http://wayland.freedesktop.org" URL "http://wayland.freedesktop.org"
-- --
2.40.1 2.41.0

View File

@ -0,0 +1,100 @@
From 45cba8061ff504fc946382a1eae42f9e79b2fa23 Mon Sep 17 00:00:00 2001
From: Volker Hilsheimer <volker.hilsheimer@qt.io>
Date: Mon, 5 Jun 2023 17:10:00 +0200
Subject: [PATCH 13/13] QTabBar: recalculate scroll offset when showing
If an application sets the current index and resizes the tab widget
before showing it, then the scroll offset might be calculated based on
an old size. Since after ca15f650a1a914bb9a41131109c46c4e52c5ebb1,
resizing explicitly avoids scrolling, this could result in tabs ending
up scrolled outside of the tab bar when showing the tab widget.
Fix that by explicitly making the current tab visible in the tab bar's
showEvent handler, which recalculates the scroll offset based on the
actual size.
This is only reproducible with a tab widget, which lays out the tab bar
for each change and resets the tab bar's layoutDirty flag. Add a test
case there.
Fixes: QTBUG-114204
Change-Id: I1e9506b9dde1dd892291d108dd2c7b675ef99509
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
(cherry picked from commit 2a7da1b3c8c4096d7c2b09f3fcc58e9cf47867cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
src/widgets/widgets/qtabbar.cpp | 2 +
.../widgets/qtabwidget/tst_qtabwidget.cpp | 37 +++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 7fd356280b..49137edf67 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1656,6 +1656,8 @@ void QTabBar::showEvent(QShowEvent *)
d->refresh();
if (!d->validIndex(d->currentIndex))
setCurrentIndex(0);
+ else
+ d->makeVisible(d->currentIndex);
d->updateMacBorderMetrics();
}
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index 00cb26c2d3..eb29933fd1 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -79,6 +79,9 @@ private slots:
void moveCurrentTab();
void autoHide();
+ void setCurrentBeforeShow_data();
+ void setCurrentBeforeShow();
+
private:
int addPage();
void removePage(int index);
@@ -750,5 +753,39 @@ void tst_QTabWidget::autoHide()
QVERIFY(heightForWidth1 > tabWidget.heightForWidth(20));
}
+void tst_QTabWidget::setCurrentBeforeShow_data()
+{
+ QTest::addColumn<QTabWidget::TabPosition>("tabPosition");
+ QTest::newRow("West") << QTabWidget::West;
+ QTest::newRow("North") << QTabWidget::North;
+ QTest::newRow("East") << QTabWidget::East;
+ QTest::newRow("South") << QTabWidget::South;
+}
+
+void tst_QTabWidget::setCurrentBeforeShow()
+{
+ QFETCH(QTabWidget::TabPosition, tabPosition);
+
+ QTabWidget tabWidget;
+ tabWidget.setTabPosition(tabPosition);
+
+ QPixmap pm(50, 50);
+ pm.fill(Qt::red);
+ const QIcon icon(pm);
+ for (int i = 0; i < 4; ++i)
+ tabWidget.addTab(new QWidget, icon, QString("Tab %1").arg(i));
+
+ // the tab widget has space for the entire tab bar
+ tabWidget.resize(tabWidget.tabBar()->sizeHint() + QSize(50, 50));
+ tabWidget.setCurrentIndex(2);
+ tabWidget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&tabWidget));
+
+ QCOMPARE_GE(tabWidget.tabBar()->tabRect(0).x(), 0);
+ QCOMPARE_GE(tabWidget.tabBar()->tabRect(0).y(), 0);
+
+ QTest::qWait(2000);
+}
+
QTEST_MAIN(tst_QTabWidget)
#include "tst_qtabwidget.moc"
--
2.41.0

View File

@ -13,7 +13,7 @@
pkgname=mingw-w64-qt6-base pkgname=mingw-w64-qt6-base
_qtver=6.5.1 _qtver=6.5.1
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(any) arch=(any)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)
@ -42,20 +42,22 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm
'0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch'
'0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch'
'0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch' '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch'
'0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch') '0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch'
'0013-QTabBar-recalculate-scroll-offset-when-showing.patch')
sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed' sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed'
'787b2aad23232c3dcec9ca737ca841f2bfc0375a84fdba6eeb605fc53e78b28c' '283dc72fb579295a67c5d66a6da5e650a137e6c179f744e9a0ee0df8d4618794'
'3b37c244f12f1778d85af398bd27483bece3f5794e31aedabfb9622ed4ae02df' 'b42a97f117fc0d517eaedf26f4ebaff4ad764794f4d23dc8574e59f977da8d96'
'2b2e907d9b2e3ef1f1da241755db2f79433c71e919fe11f0c88261dc027e4fd5' '8baa38d80fbba128d41c0620e6bc01b00b1b6c17b09989aeba6aed18b1f0cbb8'
'841639befa60ada8e183190c1e30eea919a91e8548c123abe67b165f67db3b00' '624be4e17ee19815f8fe42c07e1e88cec89df091360842c432900a4b861947d4'
'388df37ef99eba651c08910bbe8244ca9a44074051e3a0128dc90bede45fa449' 'dfe3b54afe2366fee256825f19b2f2899404cf163968e8a9af1bef4a9764964a'
'dc272b9f35e93c97d5498ca9e7678193e3885a03b303b69985dea15c2e97c579' '24ce57861b4b6b315634cd2a75b9ca4f4be5c6dec22868c0e8dd3d66d471bd4d'
'1ff55c21a407eb4193836caf51e45676155854ab43258dab819b675e6bbd357d' '842336b23d7aaa9d47d6f24846dd05720390be9cb27ab81cddc3142500754c8c'
'c817b9b638c808b2c49bb20462b26637a311d040b4dfeff03be907ed9a0999dc' 'b104e7fc6f3dd6dd3d74dad07423314310454e45ac8a779f4c3991417f7628ed'
'cf691503f23eec594751f68da47bd96abf2b398144f79a625b0b338fef443406' 'fb5a9561214c941fd25a88df9ef53eae651e5fef757a6169500ff17cfb958ec2'
'9bfb7349bcf46792ec57a191355556d698655b9368de744c3f848da5d66cac23' '3942e3df5745c8ee513c6735c00fa2a993b906903939f72ae161a7a9de6de282'
'2c7e228997ac3cf2d3ad6f9e373ab298643f3e2620e4e0038816567664f66e0d' '20bf64f05496ad81cddf530d03e6805d10fb3a68411cb28c4b2cf3dbedd29147'
'65f5749461e0de6483fa684577947591a750336f6c2cd74fdd0c128e5ee25f25') '746abfd92394f48af9ac9ca67860305221e3248e1e2a99bc2c761ed84b02f024'
'6e47dd529b22736bef04f53414096d1e18e911a150ae518053dfef0b21f2fa17')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32' _architectures='i686-w64-mingw32 x86_64-w64-mingw32'

View File

@ -0,0 +1 @@
../mingw-w64/0013-QTabBar-recalculate-scroll-offset-when-showing.patch

View File

@ -12,7 +12,7 @@
pkgname=static-compat-qt6-base pkgname=static-compat-qt6-base
_qtver=6.5.1 _qtver=6.5.1
pkgver=${_qtver/-/} pkgver=${_qtver/-/}
pkgrel=1 pkgrel=2
arch=(x86_64) arch=(x86_64)
url='https://www.qt.io' url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom) license=(GPL3 LGPL3 FDL custom)
@ -41,20 +41,22 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/subm
'0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch' '0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch'
'0010-Fix-dependency-of-xcb-image-on-xcb-util.patch' '0010-Fix-dependency-of-xcb-image-on-xcb-util.patch'
'0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch' '0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch'
'0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch') '0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch'
'0013-QTabBar-recalculate-scroll-offset-when-showing.patch')
sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed' sha256sums=('db56fa1f4303a1189fe33418d25d1924931c7aef237f89eea9de58e858eebfed'
'787b2aad23232c3dcec9ca737ca841f2bfc0375a84fdba6eeb605fc53e78b28c' '283dc72fb579295a67c5d66a6da5e650a137e6c179f744e9a0ee0df8d4618794'
'3b37c244f12f1778d85af398bd27483bece3f5794e31aedabfb9622ed4ae02df' 'b42a97f117fc0d517eaedf26f4ebaff4ad764794f4d23dc8574e59f977da8d96'
'2b2e907d9b2e3ef1f1da241755db2f79433c71e919fe11f0c88261dc027e4fd5' '8baa38d80fbba128d41c0620e6bc01b00b1b6c17b09989aeba6aed18b1f0cbb8'
'841639befa60ada8e183190c1e30eea919a91e8548c123abe67b165f67db3b00' '624be4e17ee19815f8fe42c07e1e88cec89df091360842c432900a4b861947d4'
'388df37ef99eba651c08910bbe8244ca9a44074051e3a0128dc90bede45fa449' 'dfe3b54afe2366fee256825f19b2f2899404cf163968e8a9af1bef4a9764964a'
'dc272b9f35e93c97d5498ca9e7678193e3885a03b303b69985dea15c2e97c579' '24ce57861b4b6b315634cd2a75b9ca4f4be5c6dec22868c0e8dd3d66d471bd4d'
'1ff55c21a407eb4193836caf51e45676155854ab43258dab819b675e6bbd357d' '842336b23d7aaa9d47d6f24846dd05720390be9cb27ab81cddc3142500754c8c'
'c817b9b638c808b2c49bb20462b26637a311d040b4dfeff03be907ed9a0999dc' 'b104e7fc6f3dd6dd3d74dad07423314310454e45ac8a779f4c3991417f7628ed'
'cf691503f23eec594751f68da47bd96abf2b398144f79a625b0b338fef443406' 'fb5a9561214c941fd25a88df9ef53eae651e5fef757a6169500ff17cfb958ec2'
'9bfb7349bcf46792ec57a191355556d698655b9368de744c3f848da5d66cac23' '3942e3df5745c8ee513c6735c00fa2a993b906903939f72ae161a7a9de6de282'
'2c7e228997ac3cf2d3ad6f9e373ab298643f3e2620e4e0038816567664f66e0d' '20bf64f05496ad81cddf530d03e6805d10fb3a68411cb28c4b2cf3dbedd29147'
'65f5749461e0de6483fa684577947591a750336f6c2cd74fdd0c128e5ee25f25') '746abfd92394f48af9ac9ca67860305221e3248e1e2a99bc2c761ed84b02f024'
'6e47dd529b22736bef04f53414096d1e18e911a150ae518053dfef0b21f2fa17')
prepare () { prepare () {
cd $_pkgfqn cd $_pkgfqn