mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 16:32:47 +00:00
Merge bitcoin/bitcoin#34650: depends: Update Qt to version 6.8.3
0a6724aaae973659b6c44eb5a062aaaaf57be870 doc: Update Windows build notes (Hennadii Stepanov)
473e5f8efcdabc584b99f72c364cf15afad1ca97 qt: Add patch to fix SFINAE warnings in QAnyStringView with gcc16 (Hennadii Stepanov)
3cb4d6066b83348411c43587605b624f067dbbf3 qt: add patches to fix SFINAE errors/warnings with gcc16 (Cory Fields)
d7e972a90d59bbf705bd06f5d2606cccd1dcdcf9 qt: add patch to fix build with gcc16 (Cory Fields)
19693a8c914174692e01d65434b386b522cebde7 depends: Update Qt to 6.8.3 (Hennadii Stepanov)
c55584575a99ff565131207916eccb3223e508a3 cmake: Fix `FindQt` module (Hennadii Stepanov)
Pull request description:
This PR updates the `qt` package in depends to the latest open-source [6.8.3](https://www.qt.io/blog/qt-6.8.3-released) LTS release.
The update includes numerous bugfixes, which allows us to drop `qtbase_plugins_windows11style.patch`.
Additionally, it includes [patches](https://github.com/bitcoin/bitcoin/issues/34569#issuecomment-3892793262) for compatibility with GCC 16 (along with one extra patch), and incorporates a [commit](8f1b55d1d5) from https://github.com/bitcoin/bitcoin/pull/32709.
Closes https://github.com/bitcoin/bitcoin/issues/34569.
ACKs for top commit:
achow101:
ACK 0a6724aaae973659b6c44eb5a062aaaaf57be870
sedited:
ACK 0a6724aaae973659b6c44eb5a062aaaaf57be870
Tree-SHA512: b66fe6f75bae00fb5c525c5fad56d39273f53f6bfd58206da8a55c6e41d14533137c72fb03e9537ba3a3d0b3463b6dcbef6a88ac2f4559fa6e9abf045fe1beaa
This commit is contained in:
commit
b5737b755d
@ -36,7 +36,7 @@ unset(_qt_homebrew_prefix)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Qt
|
||||
REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR
|
||||
REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR Qt${Qt_FIND_VERSION_MAJOR}_FOUND
|
||||
VERSION_VAR Qt${Qt_FIND_VERSION_MAJOR}_VERSION
|
||||
)
|
||||
|
||||
|
||||
@ -96,6 +96,11 @@ $(package)_cmake_opts := -DCMAKE_EXE_LINKER_FLAGS="$$(build_LDFLAGS)"
|
||||
ifneq ($(V),)
|
||||
$(package)_cmake_opts += --log-level=STATUS
|
||||
endif
|
||||
|
||||
ifeq ($(host_os),darwin)
|
||||
$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION)
|
||||
$(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON
|
||||
endif
|
||||
endef
|
||||
|
||||
define $(package)_fetch_cmds
|
||||
|
||||
@ -10,15 +10,21 @@ endif
|
||||
$(package)_linux_dependencies := freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
|
||||
$(package)_freebsd_dependencies := $($(package)_linux_dependencies)
|
||||
$(package)_patches_path := $(qt_details_patches_path)
|
||||
$(package)_patches := dont_hardcode_pwd.patch
|
||||
$(package)_patches := cocoa_compat.patch
|
||||
$(package)_patches += dont_hardcode_pwd.patch
|
||||
$(package)_patches += qtbase_avoid_qmain.patch
|
||||
$(package)_patches += qtbase_platformsupport.patch
|
||||
$(package)_patches += qtbase_plugins_cocoa.patch
|
||||
$(package)_patches += qtbase_plugins_windows11style.patch
|
||||
$(package)_patches += qtbase_skip_tools.patch
|
||||
$(package)_patches += rcc_hardcode_timestamp.patch
|
||||
$(package)_patches += qttools_skip_dependencies.patch
|
||||
$(package)_patches += static_fixes.patch
|
||||
$(package)_patches += fix-gcc16-qcompare.patch
|
||||
$(package)_patches += fix-gcc16-sfinae-qregularexpression.patch
|
||||
$(package)_patches += fix-gcc16-sfinae-qchar.patch
|
||||
$(package)_patches += fix-gcc16-sfinae-qbitarray.patch
|
||||
$(package)_patches += fix-gcc16-sfinae-qanystringview.patch
|
||||
$(package)_patches += fix-qbytearray-include.patch
|
||||
|
||||
$(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name)
|
||||
$(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash)
|
||||
@ -93,6 +99,9 @@ $(package)_config_opts += -no-feature-image_heuristic_mask
|
||||
$(package)_config_opts += -no-feature-keysequenceedit
|
||||
$(package)_config_opts += -no-feature-lcdnumber
|
||||
$(package)_config_opts += -no-feature-libresolv
|
||||
# Disable libstdcpp_assertions (_GLIBCXX_ASSERTIONS) to prevent embedding absolute
|
||||
# C++ standard library paths into object files, which breaks reproducible builds.
|
||||
$(package)_config_opts += -no-feature-libstdcpp_assertions
|
||||
$(package)_config_opts += -no-feature-networkdiskcache
|
||||
$(package)_config_opts += -no-feature-networkproxy
|
||||
$(package)_config_opts += -no-feature-printsupport
|
||||
@ -133,11 +142,10 @@ endif
|
||||
|
||||
$(package)_config_opts_darwin := -no-dbus
|
||||
$(package)_config_opts_darwin += -no-feature-printsupport
|
||||
$(package)_config_opts_darwin += -no-freetype
|
||||
$(package)_config_opts_darwin += -no-feature-freetype
|
||||
$(package)_config_opts_darwin += -no-pkg-config
|
||||
|
||||
$(package)_config_opts_linux := -dbus-runtime
|
||||
$(package)_config_opts_linux += -fontconfig
|
||||
$(package)_config_opts_linux := -fontconfig
|
||||
$(package)_config_opts_linux += -no-feature-process
|
||||
$(package)_config_opts_linux += -no-feature-xlib
|
||||
$(package)_config_opts_linux += -no-xcb-xlib
|
||||
@ -150,7 +158,7 @@ endif
|
||||
$(package)_config_opts_freebsd := $$($(package)_config_opts_linux)
|
||||
|
||||
$(package)_config_opts_mingw32 := -no-dbus
|
||||
$(package)_config_opts_mingw32 += -no-freetype
|
||||
$(package)_config_opts_mingw32 += -no-feature-freetype
|
||||
$(package)_config_opts_mingw32 += -no-pkg-config
|
||||
|
||||
# CMake build options.
|
||||
@ -161,7 +169,6 @@ $(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)"
|
||||
|
||||
$(package)_cmake_opts := -DCMAKE_PREFIX_PATH=$(host_prefix)
|
||||
$(package)_cmake_opts += -DQT_FEATURE_cxx20=ON
|
||||
$(package)_cmake_opts += -DQT_ENABLE_CXX_EXTENSIONS=OFF
|
||||
ifneq ($(V),)
|
||||
$(package)_cmake_opts += --log-level=STATUS
|
||||
endif
|
||||
@ -198,6 +205,11 @@ $(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion
|
||||
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=TRUE
|
||||
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapZSTD=TRUE
|
||||
endif
|
||||
ifeq ($(host_os),linux)
|
||||
# For some reason, the `-dbus-runtime` configure
|
||||
# option does not work as expected.
|
||||
$(package)_cmake_opts += -DINPUT_dbus=runtime
|
||||
endif
|
||||
ifeq ($(host_os),darwin)
|
||||
$(package)_cmake_opts += -DCMAKE_INSTALL_NAME_TOOL=true
|
||||
$(package)_cmake_opts += -DCMAKE_FRAMEWORK_PATH=$(OSX_SDK)/System/Library/Frameworks
|
||||
@ -255,14 +267,20 @@ endef
|
||||
endif
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 -i $($(package)_patch_dir)/cocoa_compat.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase_avoid_qmain.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase_platformsupport.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase_plugins_cocoa.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase_plugins_windows11style.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/static_fixes.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch
|
||||
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/static_fixes.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-gcc16-qcompare.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qregularexpression.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qchar.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qbitarray.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qanystringview.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix-qbytearray-include.patch
|
||||
endef
|
||||
ifeq ($(host),$(build))
|
||||
$(package)_preprocess_cmds += && patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
qt_details_version := 6.7.3
|
||||
qt_details_download_path := https://download.qt.io/archive/qt/6.7/$(qt_details_version)/submodules
|
||||
qt_details_version := 6.8.3
|
||||
qt_details_download_path := https://download.qt.io/archive/qt/6.8/$(qt_details_version)/submodules
|
||||
qt_details_suffix := everywhere-src-$(qt_details_version).tar.xz
|
||||
|
||||
qt_details_qtbase_file_name := qtbase-$(qt_details_suffix)
|
||||
qt_details_qtbase_sha256_hash := 8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097
|
||||
qt_details_qtbase_sha256_hash := 56001b905601bb9023d399f3ba780d7fa940f3e4861e496a7c490331f49e0b80
|
||||
|
||||
qt_details_qttranslations_file_name := qttranslations-$(qt_details_suffix)
|
||||
qt_details_qttranslations_sha256_hash := dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8
|
||||
qt_details_qttranslations_sha256_hash := c3c61d79c3d8fe316a20b3617c64673ce5b5519b2e45535f49bee313152fa531
|
||||
|
||||
qt_details_qttools_file_name := qttools-$(qt_details_suffix)
|
||||
qt_details_qttools_sha256_hash := f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f
|
||||
qt_details_qttools_sha256_hash := 02a4e219248b94f1333df843d25763f35251c1074cdc4fb5bda67d340f8c8b3a
|
||||
|
||||
qt_details_patches_path := $(PATCHES_PATH)/qt
|
||||
|
||||
qt_details_top_download_path := https://raw.githubusercontent.com/qt/qt5/refs/heads/$(qt_details_version)
|
||||
qt_details_top_cmakelists_file_name := CMakeLists.txt
|
||||
qt_details_top_cmakelists_download_file := $(qt_details_top_cmakelists_file_name)
|
||||
qt_details_top_cmakelists_sha256_hash := 9fb720a633c0c0a21c31fe62a34bf617726fed72480d4064f29ca5d6973d513f
|
||||
qt_details_top_cmakelists_sha256_hash := 54e9a4e554da37792446dda4f52bc308407b01a34bcc3afbad58e4e0f71fac9b
|
||||
qt_details_top_cmake_download_path := $(qt_details_top_download_path)/cmake
|
||||
qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name := ECMOptionalAddSubdirectory.cmake
|
||||
qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file := $(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name)
|
||||
qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash := 97ee8bbfcb0a4bdcc6c1af77e467a1da0c5b386c42be2aa97d840247af5f6f70
|
||||
qt_details_top_cmake_qttoplevelhelpers_file_name := QtTopLevelHelpers.cmake
|
||||
qt_details_top_cmake_qttoplevelhelpers_download_file := $(qt_details_top_cmake_qttoplevelhelpers_file_name)
|
||||
qt_details_top_cmake_qttoplevelhelpers_sha256_hash := 5ac2a7159ee27b5b86d26ecff44922e7b8f319aa847b7b5766dc17932fd4a294
|
||||
qt_details_top_cmake_qttoplevelhelpers_sha256_hash := e11581b2101a6836ca991817d43d49e1f6016e4e672bbc3523eaa8b3eb3b64c2
|
||||
|
||||
23
depends/patches/qt/cocoa_compat.patch
Normal file
23
depends/patches/qt/cocoa_compat.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Disable macOS 15 features in QCocoaCursor
|
||||
|
||||
Bypasses an undefined reference to ___isPlatformVersionAtLeast
|
||||
for the @available(macOS 15, *) check.
|
||||
|
||||
Can be dropped once OSX_MIN_VERSION is updated to 15.0+.
|
||||
|
||||
The disabled code was introduced in 4aeb27fbacfade7106b19c460deb5414143a5e53.
|
||||
The referenced QTBUG-126240, in turn, refers to the NSCursor API for window
|
||||
resize cursors.
|
||||
|
||||
|
||||
--- a/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm
|
||||
+++ b/qtbase/src/plugins/platforms/cocoa/qcocoacursor.mm
|
||||
@@ -138,7 +138,7 @@ NSCursor *QCocoaCursor::convertCursor(QCursor *cursor)
|
||||
case Qt::SizeHorCursor:
|
||||
case Qt::SizeBDiagCursor:
|
||||
case Qt::SizeFDiagCursor: {
|
||||
-#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(150000)
|
||||
+#if 0
|
||||
if (@available(macOS 15, *)) {
|
||||
auto position = [newShape]{
|
||||
switch (newShape) {
|
||||
206
depends/patches/qt/fix-gcc16-qcompare.patch
Normal file
206
depends/patches/qt/fix-gcc16-qcompare.patch
Normal file
@ -0,0 +1,206 @@
|
||||
From 7fccc79dd5744ea837ffe200bbfc9f2756870220 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Wed, 14 Jan 2026 08:57:22 -0800
|
||||
Subject: [PATCH] QtCompare: adapt to GCC 16 breaking ABI for
|
||||
std::partial_ordering
|
||||
|
||||
They changed[1] the stored value of the unordered constant from 2 to
|
||||
-SCHAR_MAX-1 (0x80). This commit hardens the check for all three
|
||||
std::*_ordering types and in all compilers, even though only the
|
||||
unordered value has been observed to be a problem.
|
||||
|
||||
For:
|
||||
|
||||
std::partial_ordering f(Qt::partial_ordering o) { return o; }
|
||||
|
||||
With GCC < 16, this remains a plain bitcast. For GCC >= 16, this now
|
||||
generates:
|
||||
cmpb $2, %dil
|
||||
movl $-128, %eax
|
||||
cmovne %edi, %eax
|
||||
|
||||
Hopefully, when this is used in context, the comparisons will be elided
|
||||
through constant propagation.
|
||||
|
||||
[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fcb3009a32dc33906934a2360e556dfeb98980cf
|
||||
|
||||
Pick-to: 6.11 6.10 6.8 6.5
|
||||
Change-Id: I04bc40f0aeef5c0c778dfffdaea0bf68c5719462
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
||||
---
|
||||
src/corelib/global/qcompare.cpp | 2 +
|
||||
src/corelib/global/qcompare.h | 60 ++++++++++++++-----
|
||||
.../corelib/global/qcompare/tst_qcompare.cpp | 2 +
|
||||
3 files changed, 50 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/qtbase/src/corelib/global/qcompare.cpp b/qtbase/src/corelib/global/qcompare.cpp
|
||||
index 8106a84ddcd7..7f7facafbb87 100644
|
||||
--- a/qtbase/src/corelib/global/qcompare.cpp
|
||||
+++ b/qtbase/src/corelib/global/qcompare.cpp
|
||||
@@ -18,7 +18,9 @@ QT_BEGIN_NAMESPACE
|
||||
static_assert(std::bit_cast<std:: type ## _ordering>(Qt:: type ## _ordering:: flag) \
|
||||
== std:: type ## _ordering :: flag) \
|
||||
/* end */
|
||||
+#if !defined(__GLIBCXX__)
|
||||
CHECK(partial, unordered);
|
||||
+#endif
|
||||
CHECK(partial, less);
|
||||
CHECK(partial, greater);
|
||||
CHECK(partial, equivalent);
|
||||
diff --git a/qtbase/src/corelib/global/qcompare.h b/qtbase/src/corelib/global/qcompare.h
|
||||
index d82cf5ab4a4e..7eee69db66a3 100644
|
||||
--- a/qtbase/src/corelib/global/qcompare.h
|
||||
+++ b/qtbase/src/corelib/global/qcompare.h
|
||||
@@ -36,6 +36,15 @@ enum class Ordering : CompareUnderlyingType
|
||||
|
||||
enum class Uncomparable : CompareUnderlyingType
|
||||
{
|
||||
+ // We choose the value of our Uncomparable to be the same that the C++
|
||||
+ // Standard Library chooses for its own std::partial_ordering::unordered,
|
||||
+ // so we can convert from their type to ours via simple std::bit_cast.
|
||||
+#if 0
|
||||
+ // GCC 16 broke ABI, so we cannot use the std::*_ordering types
|
||||
+ // in our ABI until we drop support for GCC 15 and earlier. When that
|
||||
+ // happens and std::bit_cast is guaranteed, this can be simplified to:
|
||||
+ Unordered = std::bit_cast<CompareUnderlyingType>(std::partial_ordering::unordered);
|
||||
+#else
|
||||
Unordered =
|
||||
#if defined(_LIBCPP_VERSION) // libc++
|
||||
-127
|
||||
@@ -44,12 +53,26 @@ enum class Uncomparable : CompareUnderlyingType
|
||||
#else // assume MSSTL
|
||||
-128
|
||||
#endif
|
||||
+#endif // future Qt
|
||||
};
|
||||
|
||||
} // namespace QtPrivate
|
||||
|
||||
namespace QtOrderingPrivate {
|
||||
|
||||
+using QtPrivate::Ordering;
|
||||
+using QtPrivate::Uncomparable;
|
||||
+
|
||||
+#if defined(__cpp_lib_bit_cast) && defined(__cpp_lib_three_way_comparison)
|
||||
+inline constexpr bool OrderingValuesAreEqual =
|
||||
+ std::bit_cast<Ordering>(std::weak_ordering::equivalent) == Ordering::Equivalent &&
|
||||
+ std::bit_cast<Ordering>(std::strong_ordering::equal) == Ordering::Equal &&
|
||||
+ std::bit_cast<Ordering>(std::strong_ordering::less) == Ordering::Less &&
|
||||
+ std::bit_cast<Ordering>(std::strong_ordering::greater) == Ordering::Greater;
|
||||
+inline constexpr bool UnorderedValueIsEqual =
|
||||
+ std::bit_cast<Uncomparable>(std::partial_ordering::unordered) == Uncomparable::Unordered;
|
||||
+#endif
|
||||
+
|
||||
template <typename O>
|
||||
constexpr O reversed(O o) noexcept
|
||||
{
|
||||
@@ -61,6 +84,9 @@ constexpr O reversed(O o) noexcept
|
||||
|
||||
} // namespace QtOrderingPrivate
|
||||
|
||||
+QT_WARNING_PUSH
|
||||
+QT_WARNING_DISABLE_MSVC(4702) // unreachable code
|
||||
+
|
||||
namespace Qt {
|
||||
|
||||
class weak_ordering;
|
||||
@@ -157,12 +183,18 @@ public:
|
||||
constexpr Q_IMPLICIT operator std::partial_ordering() const noexcept
|
||||
{
|
||||
static_assert(sizeof(*this) == sizeof(std::partial_ordering));
|
||||
-#ifdef __cpp_lib_bit_cast
|
||||
- return std::bit_cast<std::partial_ordering>(*this);
|
||||
-#else
|
||||
using O = QtPrivate::Ordering;
|
||||
using U = QtPrivate::Uncomparable;
|
||||
using R = std::partial_ordering;
|
||||
+#ifdef __cpp_lib_bit_cast
|
||||
+ if constexpr (QtOrderingPrivate::OrderingValuesAreEqual) {
|
||||
+ if constexpr (!QtOrderingPrivate::UnorderedValueIsEqual) {
|
||||
+ if (m_order == qToUnderlying(U::Unordered))
|
||||
+ return R::unordered;
|
||||
+ }
|
||||
+ return std::bit_cast<R>(*this);
|
||||
+ }
|
||||
+#endif // __cpp_lib_bit_cast
|
||||
switch (m_order) {
|
||||
case qToUnderlying(O::Less): return R::less;
|
||||
case qToUnderlying(O::Greater): return R::greater;
|
||||
@@ -170,7 +202,6 @@ public:
|
||||
case qToUnderlying(U::Unordered): return R::unordered;
|
||||
}
|
||||
Q_UNREACHABLE_RETURN(R::unordered);
|
||||
-#endif // __cpp_lib_bit_cast
|
||||
}
|
||||
|
||||
friend constexpr bool operator==(partial_ordering lhs, std::partial_ordering rhs) noexcept
|
||||
@@ -349,18 +380,18 @@ public:
|
||||
constexpr Q_IMPLICIT operator std::weak_ordering() const noexcept
|
||||
{
|
||||
static_assert(sizeof(*this) == sizeof(std::weak_ordering));
|
||||
-#ifdef __cpp_lib_bit_cast
|
||||
- return std::bit_cast<std::weak_ordering>(*this);
|
||||
-#else
|
||||
using O = QtPrivate::Ordering;
|
||||
using R = std::weak_ordering;
|
||||
+#ifdef __cpp_lib_bit_cast
|
||||
+ if constexpr (QtOrderingPrivate::OrderingValuesAreEqual)
|
||||
+ return std::bit_cast<R>(*this);
|
||||
+#endif // __cpp_lib_bit_cast
|
||||
switch (m_order) {
|
||||
case qToUnderlying(O::Less): return R::less;
|
||||
case qToUnderlying(O::Greater): return R::greater;
|
||||
case qToUnderlying(O::Equivalent): return R::equivalent;
|
||||
}
|
||||
Q_UNREACHABLE_RETURN(R::equivalent);
|
||||
-#endif // __cpp_lib_bit_cast
|
||||
}
|
||||
|
||||
friend constexpr bool operator==(weak_ordering lhs, std::weak_ordering rhs) noexcept
|
||||
@@ -547,18 +578,18 @@ public:
|
||||
constexpr Q_IMPLICIT operator std::strong_ordering() const noexcept
|
||||
{
|
||||
static_assert(sizeof(*this) == sizeof(std::strong_ordering));
|
||||
-#ifdef __cpp_lib_bit_cast
|
||||
- return std::bit_cast<std::strong_ordering>(*this);
|
||||
-#else
|
||||
using O = QtPrivate::Ordering;
|
||||
using R = std::strong_ordering;
|
||||
+#ifdef __cpp_lib_bit_cast
|
||||
+ if constexpr (QtOrderingPrivate::OrderingValuesAreEqual)
|
||||
+ return std::bit_cast<R>(*this);
|
||||
+#endif // __cpp_lib_bit_cast
|
||||
switch (m_order) {
|
||||
case qToUnderlying(O::Less): return R::less;
|
||||
case qToUnderlying(O::Greater): return R::greater;
|
||||
case qToUnderlying(O::Equal): return R::equal;
|
||||
}
|
||||
Q_UNREACHABLE_RETURN(R::equal);
|
||||
-#endif // __cpp_lib_bit_cast
|
||||
}
|
||||
|
||||
friend constexpr bool operator==(strong_ordering lhs, std::strong_ordering rhs) noexcept
|
||||
@@ -625,6 +656,8 @@ inline constexpr strong_ordering strong_ordering::greater(QtPrivate::Ordering::G
|
||||
|
||||
} // namespace Qt
|
||||
|
||||
+QT_WARNING_POP
|
||||
+
|
||||
QT_BEGIN_INCLUDE_NAMESPACE
|
||||
|
||||
// This is intentionally included after Qt::*_ordering types and before
|
||||
diff --git a/qtbase/tests/auto/corelib/global/qcompare/tst_qcompare.cpp b/qtbase/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
|
||||
index b79a6661db33..ff5920134cc8 100644
|
||||
--- a/qtbase/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
|
||||
+++ b/qtbase/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
|
||||
@@ -185,7 +185,9 @@ void tst_QCompare::stdQtBinaryCompatibility()
|
||||
QCOMPARE_EQ(valueOf( Qt:: type ## _ordering :: flag), \
|
||||
valueOf(std:: type ## _ordering :: flag)) \
|
||||
/* end */
|
||||
+# if !defined(__GLIBCXX__) || QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
|
||||
CHECK(partial, unordered);
|
||||
+# endif
|
||||
CHECK(partial, less);
|
||||
CHECK(partial, greater);
|
||||
CHECK(partial, equivalent);
|
||||
47
depends/patches/qt/fix-gcc16-sfinae-qanystringview.patch
Normal file
47
depends/patches/qt/fix-gcc16-sfinae-qanystringview.patch
Normal file
@ -0,0 +1,47 @@
|
||||
commit 27230157212c32420e71b28870d6c77630c3dc37
|
||||
Author: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
Date: Fri Aug 1 12:14:50 2025 +0200
|
||||
|
||||
Fix incomplete SFINAE of QAnyStringView
|
||||
|
||||
Inside the QAnyStringView class, the class is incomplete, and will
|
||||
erroneously fail SFINAE. Do the assert after for it to actually work.
|
||||
|
||||
Detected with gcc 16.
|
||||
|
||||
Amends 2c9529e158fc589c48e6b1fb61dca2133e33ac4d.
|
||||
|
||||
Pick-to: 6.10 6.9 6.8 6.5
|
||||
Change-Id: Ifd3ad6d3ec17cd1725fb8b735469502791f9e9a3
|
||||
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
||||
|
||||
diff --git a/qtbase/src/corelib/text/qanystringview.cpp b/qtbase/src/corelib/text/qanystringview.cpp
|
||||
index 7bf8a3fa1fd..3c993ff1da0 100644
|
||||
--- a/qtbase/src/corelib/text/qanystringview.cpp
|
||||
+++ b/qtbase/src/corelib/text/qanystringview.cpp
|
||||
@@ -243,6 +243,10 @@ QT_BEGIN_NAMESPACE
|
||||
\sa isNull(), isEmpty()
|
||||
*/
|
||||
|
||||
+// confirm we don't make an accidental copy constructor:
|
||||
+static_assert(QtPrivate::IsContainerCompatibleWithQStringView<QAnyStringView>::value == false);
|
||||
+static_assert(QtPrivate::IsContainerCompatibleWithQUtf8StringView<QAnyStringView>::value == false);
|
||||
+
|
||||
/*!
|
||||
\fn template <typename Char, size_t Size> static QAnyStringView fromArray(const Char (&string)[Size]) noexcept
|
||||
|
||||
diff --git a/qtbase/src/corelib/text/qanystringview.h b/qtbase/src/corelib/text/qanystringview.h
|
||||
index 9617209059b..69b7fafb438 100644
|
||||
--- a/qtbase/src/corelib/text/qanystringview.h
|
||||
+++ b/qtbase/src/corelib/text/qanystringview.h
|
||||
@@ -96,10 +96,6 @@ private:
|
||||
std::is_convertible<T, QStringOrQByteArray>
|
||||
>, bool>;
|
||||
|
||||
- // confirm we don't make an accidental copy constructor:
|
||||
- static_assert(QtPrivate::IsContainerCompatibleWithQStringView<QAnyStringView>::value == false);
|
||||
- static_assert(QtPrivate::IsContainerCompatibleWithQUtf8StringView<QAnyStringView>::value == false);
|
||||
-
|
||||
template<typename Char>
|
||||
static constexpr bool isAsciiOnlyCharsAtCompileTime(Char *str, qsizetype sz) noexcept
|
||||
{
|
||||
56
depends/patches/qt/fix-gcc16-sfinae-qbitarray.patch
Normal file
56
depends/patches/qt/fix-gcc16-sfinae-qbitarray.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 679e8bda1eb0cc98acb981e9a10204bed1c179f2 Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
||||
Date: Tue, 20 Jan 2026 15:23:31 +0100
|
||||
Subject: [PATCH] qhashfunctions.h: include QBitArray
|
||||
|
||||
In qhashfunctions.h we're declaring a std::hash specialization for
|
||||
QBitArray. That specialization instantiates
|
||||
QNothrowHashable_v<QBitArray>, which checks if qHash(QBitArray) is
|
||||
noexcept.
|
||||
|
||||
The problem is that there are already qHash(QByteArrayView) and
|
||||
qHash(QStringView) around, which will be picked up by overload
|
||||
resolution. That, in turn, will try to instantiate the QBAV/QSV
|
||||
constructors from a generic container. That instantiation will fail
|
||||
because QBitArray is not complete yet.
|
||||
|
||||
When we later complete QBitArray, GCC is going to complain.
|
||||
|
||||
Therefore, complete QBitArray before attempting SFINAE tricks on it.
|
||||
|
||||
As an alternative, I could've moved the std::hash specialization
|
||||
to qbitarray.h. However I noticed that qHash(QBitArray) is still
|
||||
declared into qhashfunctions.h, i.e. hashing QBitArrays didn't
|
||||
require the full type, and therefore moving std::hash would've been
|
||||
a potential SIC?
|
||||
|
||||
Task-number: QTBUG-143470
|
||||
Change-Id: Ie79d15e77d1fb3c86de6d7480a66bddc39f17666
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
---
|
||||
src/corelib/tools/qhashfunctions.h | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/qtbase/src/corelib/tools/qhashfunctions.h b/qtbase/src/corelib/tools/qhashfunctions.h
|
||||
index 8f1394c8ad35..beef80557865 100644
|
||||
--- a/qtbase/src/corelib/tools/qhashfunctions.h
|
||||
+++ b/qtbase/src/corelib/tools/qhashfunctions.h
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qstringfwd.h>
|
||||
+#ifndef QT_BOOTSTRAPPED
|
||||
+#include <QtCore/qbitarray.h>
|
||||
+#endif
|
||||
|
||||
#include <numeric> // for std::accumulate
|
||||
#include <functional> // for std::hash
|
||||
@@ -25,8 +28,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
-class QBitArray;
|
||||
-
|
||||
#if QT_DEPRECATED_SINCE(6,6)
|
||||
QT_DEPRECATED_VERSION_X_6_6("Use QHashSeed instead")
|
||||
Q_CORE_EXPORT int qGlobalQHashSeed();
|
||||
131
depends/patches/qt/fix-gcc16-sfinae-qchar.patch
Normal file
131
depends/patches/qt/fix-gcc16-sfinae-qchar.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From 05f201a3d559452287b20becb960de3a50249540 Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
||||
Date: Wed, 4 Feb 2026 12:12:37 +0100
|
||||
Subject: [PATCH] Move QChar::fromUcs4 into qchar.h
|
||||
|
||||
Right now fromUcs4 lives in qstringview.h because the return type has an
|
||||
implicit conversion operator towards QStringView. This however creates
|
||||
an inclusion loop: qchar.h includes qstringview.h, and qstringview.h
|
||||
includes qchar.h. Only the latter should exist.
|
||||
|
||||
We can move the code back into qchar.h and drop the QStringView
|
||||
dependency by making the type returned from fromUcs4 have data(). That
|
||||
would make it a string-like range and become implicitly convertible to
|
||||
QStringView through its ranged constructor.
|
||||
|
||||
In fact, add a test that checks for the *implicit* conversion; and
|
||||
add a test that checks for a conversion towards std::u16string_view.
|
||||
|
||||
QMetaType was calling the conversion operator from the return type of
|
||||
fromUcs4 to QStringView directly (...Hyrum law...), although we never
|
||||
documented the presence of that operator, only that the conversion was
|
||||
possible; fix it by using a conversion.
|
||||
|
||||
Fixes: QTBUG-143873
|
||||
Task-number: QTBUG-143470
|
||||
Change-Id: Id07657dd411cc2e1446fb18789e04db9cecd8ae0
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
---
|
||||
src/corelib/kernel/qmetatype.cpp | 2 +-
|
||||
src/corelib/text/qchar.h | 16 +++++++++++++---
|
||||
src/corelib/text/qstringview.h | 16 ----------------
|
||||
tests/auto/corelib/text/qchar/tst_qchar.cpp | 10 ++++++++++
|
||||
4 files changed, 24 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/qtbase/src/corelib/kernel/qmetatype.cpp b/qtbase/src/corelib/kernel/qmetatype.cpp
|
||||
index e70583404a46..54a0fe671fe0 100644
|
||||
--- a/qtbase/src/corelib/kernel/qmetatype.cpp
|
||||
+++ b/qtbase/src/corelib/kernel/qmetatype.cpp
|
||||
@@ -1212,7 +1212,7 @@ QT_WARNING_DISABLE_CLANG("-Wtautological-compare")
|
||||
return true;
|
||||
);
|
||||
QMETATYPE_CONVERTER(QString, Char32,
|
||||
- result = QChar::fromUcs4(source).operator QStringView().toString();
|
||||
+ result = QStringView(QChar::fromUcs4(source)).toString();
|
||||
return true;
|
||||
);
|
||||
#if QT_CONFIG(datestring)
|
||||
diff --git a/qtbase/src/corelib/text/qchar.h b/qtbase/src/corelib/text/qchar.h
|
||||
index 4a3aad0ca0c1..f96ca590f2e2 100644
|
||||
--- a/qtbase/src/corelib/text/qchar.h
|
||||
+++ b/qtbase/src/corelib/text/qchar.h
|
||||
@@ -88,7 +88,19 @@ class QT6_ONLY(Q_CORE_EXPORT) QChar {
|
||||
#endif
|
||||
|
||||
static constexpr QChar fromUcs2(char16_t c) noexcept { return QChar{c}; }
|
||||
- static constexpr inline auto fromUcs4(char32_t c) noexcept;
|
||||
+ [[nodiscard]] static constexpr inline auto fromUcs4(char32_t c) noexcept
|
||||
+ {
|
||||
+ struct R {
|
||||
+ char16_t chars[2];
|
||||
+ [[nodiscard]] constexpr qsizetype size() const noexcept { return chars[1] ? 2 : 1; }
|
||||
+ [[nodiscard]] constexpr const char16_t *data() const noexcept { return chars; }
|
||||
+ [[nodiscard]] constexpr const char16_t *begin() const noexcept { return chars; }
|
||||
+ [[nodiscard]] constexpr const char16_t *end() const noexcept { return begin() + size(); }
|
||||
+ };
|
||||
+ return requiresSurrogates(c) ? R{{QChar::highSurrogate(c),
|
||||
+ QChar::lowSurrogate(c)}} :
|
||||
+ R{{char16_t(c), u'\0'}} ;
|
||||
+ }
|
||||
|
||||
// Unicode information
|
||||
|
||||
@@ -666,5 +678,3 @@ struct hash<QT_PREPEND_NAMESPACE(QChar)>
|
||||
} // namespace std
|
||||
|
||||
#endif // QCHAR_H
|
||||
-
|
||||
-#include <QtCore/qstringview.h> // for QChar::fromUcs4() definition
|
||||
diff --git a/qtbase/src/corelib/text/qstringview.h b/qtbase/src/corelib/text/qstringview.h
|
||||
index 6d5edfc06d7d..d5897af6da2d 100644
|
||||
--- a/qtbase/src/corelib/text/qstringview.h
|
||||
+++ b/qtbase/src/corelib/text/qstringview.h
|
||||
@@ -472,22 +472,6 @@ template <typename QStringLike, typename std::enable_if<
|
||||
inline QStringView qToStringViewIgnoringNull(const QStringLike &s) noexcept
|
||||
{ return QStringView(s.begin(), s.size()); }
|
||||
|
||||
-// QChar inline functions:
|
||||
-
|
||||
-[[nodiscard]] constexpr auto QChar::fromUcs4(char32_t c) noexcept
|
||||
-{
|
||||
- struct R {
|
||||
- char16_t chars[2];
|
||||
- [[nodiscard]] constexpr operator QStringView() const noexcept { return {begin(), end()}; }
|
||||
- [[nodiscard]] constexpr qsizetype size() const noexcept { return chars[1] ? 2 : 1; }
|
||||
- [[nodiscard]] constexpr const char16_t *begin() const noexcept { return chars; }
|
||||
- [[nodiscard]] constexpr const char16_t *end() const noexcept { return begin() + size(); }
|
||||
- };
|
||||
- return requiresSurrogates(c) ? R{{QChar::highSurrogate(c),
|
||||
- QChar::lowSurrogate(c)}} :
|
||||
- R{{char16_t(c), u'\0'}} ;
|
||||
-}
|
||||
-
|
||||
qsizetype QtPrivate::findString(QStringView str, qsizetype from, QChar ch, Qt::CaseSensitivity cs) noexcept
|
||||
{
|
||||
if (from < -str.size()) // from < 0 && abs(from) > str.size(), avoiding overflow
|
||||
diff --git a/qtbase/tests/auto/corelib/text/qchar/tst_qchar.cpp b/qtbase/tests/auto/corelib/text/qchar/tst_qchar.cpp
|
||||
index 6701f0e33f3d..5781d36e458b 100644
|
||||
--- a/qtbase/tests/auto/corelib/text/qchar/tst_qchar.cpp
|
||||
+++ b/qtbase/tests/auto/corelib/text/qchar/tst_qchar.cpp
|
||||
@@ -142,10 +142,20 @@ void tst_QChar::fromUcs4()
|
||||
QCOMPARE(result.chars[0], QChar::highSurrogate(ucs4));
|
||||
QCOMPARE(result.chars[1], QChar::lowSurrogate(ucs4));
|
||||
QCOMPARE(QStringView{result}.size(), 2);
|
||||
+ QStringView v = result;
|
||||
+ QCOMPARE(v.size(), 2);
|
||||
+#if __cplusplus >= 202302L // no FTM for the ranged constructor of basic_string_view
|
||||
+ QCOMPARE(std::u16string_view{result}.size(), 2);
|
||||
+#endif
|
||||
} else {
|
||||
QCOMPARE(result.chars[0], ucs4);
|
||||
QCOMPARE(result.chars[1], 0u);
|
||||
QCOMPARE(QStringView{result}.size(), 1);
|
||||
+ QStringView v = result;
|
||||
+ QCOMPARE(v.size(), 1);
|
||||
+#if __cplusplus >= 202302L // no FTM for the ranged constructor of basic_string_view
|
||||
+ QCOMPARE(std::u16string_view{result}.size(), 1);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
68
depends/patches/qt/fix-gcc16-sfinae-qregularexpression.patch
Normal file
68
depends/patches/qt/fix-gcc16-sfinae-qregularexpression.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From 3312e89b47f8c2ea0b4263b39841c25b83a37332 Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
||||
Date: Fri, 16 Jan 2026 21:54:45 +0100
|
||||
Subject: [PATCH] QStringView: fix benign ODR violation for
|
||||
count(QRegularExpression)
|
||||
|
||||
QRegularExpression is only forward declared in qstringview.h.
|
||||
QStringView::count(const QRegularExpression &re) simply calls
|
||||
`QtPrivate::count(*this, re)`. The problem is that this latter
|
||||
count is overloaded, and there's a `QtPrivate::count(QStringView,
|
||||
QStringView)` overload available.
|
||||
|
||||
This overload is not viable because there is no conversion from
|
||||
QRegularExpression to QStringView. To determine this, the compiler
|
||||
instantiates the QStringView(const Container &) constructor template,
|
||||
with Container = QRegularExpression. This function template is
|
||||
constrained via SFINAE, and it will fail the constraint checks
|
||||
_because QRegularExpression is incomplete_ (in particular std::data
|
||||
itself has SFINAE, and it fails in there).
|
||||
|
||||
GCC doesn't like the idea that at a later time we complete
|
||||
QRegularExpression, because it fears that the prior result might
|
||||
have been different had QRegularExpression been complete.
|
||||
|
||||
We know it's not different, but still, silence the warning by
|
||||
moving the call to QtPrivate::count where QRegularExpression
|
||||
is complete.
|
||||
|
||||
Pick-to: 6.11
|
||||
Change-Id: I294c5ccb7c4ab3d52e518182c159e690575cbb00
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
---
|
||||
src/corelib/text/qregularexpression.h | 5 +++++
|
||||
src/corelib/text/qstringview.h | 5 +----
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/qtbase/src/corelib/text/qregularexpression.h b/qtbase/src/corelib/text/qregularexpression.h
|
||||
index 462786179cb5..ece094ca768f 100644
|
||||
--- a/qtbase/src/corelib/text/qregularexpression.h
|
||||
+++ b/qtbase/src/corelib/text/qregularexpression.h
|
||||
@@ -191,6 +191,11 @@ Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QRegularExpression &re);
|
||||
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QRegularExpression::PatternOptions patternOptions);
|
||||
#endif
|
||||
|
||||
+[[nodiscard]] inline qsizetype QStringView::count(const QRegularExpression &re) const
|
||||
+{
|
||||
+ return QtPrivate::count(*this, re);
|
||||
+}
|
||||
+
|
||||
struct QRegularExpressionMatchPrivate;
|
||||
QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QRegularExpressionMatchPrivate, Q_CORE_EXPORT)
|
||||
|
||||
diff --git a/qtbase/src/corelib/text/qstringview.h b/qtbase/src/corelib/text/qstringview.h
|
||||
index d586620c8b09..6d5edfc06d7d 100644
|
||||
--- a/qtbase/src/corelib/text/qstringview.h
|
||||
+++ b/qtbase/src/corelib/text/qstringview.h
|
||||
@@ -329,10 +329,7 @@ class QStringView
|
||||
{
|
||||
return QtPrivate::contains(*this, re, rmatch);
|
||||
}
|
||||
- [[nodiscard]] qsizetype count(const QRegularExpression &re) const
|
||||
- {
|
||||
- return QtPrivate::count(*this, re);
|
||||
- }
|
||||
+ [[nodiscard]] qsizetype count(const QRegularExpression &re) const; // defined in qregularexpression.h
|
||||
#endif
|
||||
|
||||
[[nodiscard]] bool isRightToLeft() const noexcept
|
||||
40
depends/patches/qt/fix-qbytearray-include.patch
Normal file
40
depends/patches/qt/fix-qbytearray-include.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From d68fc6ecc88a0e4532754b1a9f209881a248f4ee Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
||||
Date: Wed, 4 Feb 2026 12:33:08 +0100
|
||||
Subject: [PATCH] QByteArrayView: include qchar.h
|
||||
|
||||
QByteArrayView needs the complete definition of QChar in order to
|
||||
define its relational operators against it.
|
||||
|
||||
In particular, the expansion of the
|
||||
|
||||
Q_DECLARE_STRONGLY_ORDERED(QByteArrayView, QChar, QT_ASCII_CAST_WARN)
|
||||
|
||||
macro creates an overload set where the QByteArrayView(Container)
|
||||
constructor is considered. GCC complains that that constructor is
|
||||
excluded via SFINAE for Container = QChar, not because QChar isn't a
|
||||
suitable container (indeed, it's not), but because it's *incomplete* at
|
||||
that point. When QChar is later completed, GCC is afraid that the
|
||||
previous substitution failure might have yielded a different result,
|
||||
and warns about it. Fix this by including QChar.
|
||||
|
||||
Task-number: QTBUG-143470
|
||||
Change-Id: I705f91ef1133b59363df0cd6dbab91a5854e248c
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
||||
---
|
||||
src/corelib/text/qbytearrayview.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/qtbase/src/corelib/text/qbytearrayview.h b/qtbase/src/corelib/text/qbytearrayview.h
|
||||
index 7d3e82e72a02..b19f6fd5424e 100644
|
||||
--- a/qtbase/src/corelib/text/qbytearrayview.h
|
||||
+++ b/qtbase/src/corelib/text/qbytearrayview.h
|
||||
@@ -4,6 +4,7 @@
|
||||
#define QBYTEARRAYVIEW_H
|
||||
|
||||
#include <QtCore/qbytearrayalgorithms.h>
|
||||
+#include <QtCore/qchar.h>
|
||||
#include <QtCore/qcompare.h>
|
||||
#include <QtCore/qcontainerfwd.h>
|
||||
#include <QtCore/qstringfwd.h>
|
||||
@ -10,7 +10,7 @@ so we can safely disable it.
|
||||
|
||||
--- a/qtbase/src/entrypoint/CMakeLists.txt
|
||||
+++ b/qtbase/src/entrypoint/CMakeLists.txt
|
||||
@@ -104,8 +104,6 @@ if(WIN32)
|
||||
@@ -105,8 +105,6 @@ if(WIN32)
|
||||
APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-lmingw32"
|
||||
)
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ See: https://codereview.qt-project.org/c/qt/qtbase/+/634002
|
||||
|
||||
--- a/qtbase/src/plugins/platforms/cocoa/CMakeLists.txt
|
||||
+++ b/qtbase/src/plugins/platforms/cocoa/CMakeLists.txt
|
||||
@@ -102,3 +102,10 @@ qt_internal_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionma
|
||||
@@ -107,3 +107,10 @@ qt_internal_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionma
|
||||
SOURCES
|
||||
qcocoasessionmanager.cpp qcocoasessionmanager.h
|
||||
)
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
QWindows11Style: Calculate Spinbox size based on CommonStyle size
|
||||
Use the calculation from Commonstyle and add the increased padding and
|
||||
horizontally layouted buttons to the horizontal size hint.
|
||||
|
||||
Fixes: QTBUG-130288
|
||||
Change-Id: I7932b782e7873a0178091a51379f17453eb585fd
|
||||
|
||||
Upstream commits:
|
||||
- Qt 6.8.1: 9107817eaceaacc968dbc767c24594566d637b8c
|
||||
- Qt 6.9.0: 96d46cad43517adefa2eb7cb8819a0b2cc9241e6
|
||||
|
||||
--- a/qtbase/src/plugins/styles/modernwindows/qwindows11style.cpp
|
||||
+++ b/qtbase/src/plugins/styles/modernwindows/qwindows11style.cpp
|
||||
@@ -2048,39 +2048,22 @@ QSize QWindows11Style::sizeFromContents(ContentsType type, const QStyleOption *o
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
+#if QT_CONFIG(spinbox)
|
||||
case QStyle::CT_SpinBox: {
|
||||
if (const auto *spinBoxOpt = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
|
||||
// Add button + frame widths
|
||||
- int width = 0;
|
||||
-
|
||||
- if (const QDateTimeEdit *spinBox = qobject_cast<const QDateTimeEdit *>(widget)) {
|
||||
- const QSize textSizeMin = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->minimumDateTime().toString(spinBox->displayFormat()));
|
||||
- const QSize textSizeMax = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->maximumDateTime().toString(spinBox->displayFormat()));
|
||||
- width = qMax(textSizeMin.width(),textSizeMax.width());
|
||||
- } else if (const QSpinBox *spinBox = qobject_cast<const QSpinBox *>(widget)) {
|
||||
- const QSize textSizeMin = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, QString::number(spinBox->minimum()));
|
||||
- const QSize textSizeMax = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, QString::number(spinBox->maximum()));
|
||||
- width = qMax(textSizeMin.width(),textSizeMax.width());
|
||||
- width += spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->prefix()).width();
|
||||
- width += spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->suffix()).width();
|
||||
-
|
||||
- } else if (const QDoubleSpinBox *spinBox = qobject_cast<const QDoubleSpinBox *>(widget)) {
|
||||
- const QSize textSizeMin = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, QString::number(spinBox->minimum()));
|
||||
- const QSize textSizeMax = spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, QString::number(spinBox->maximum()));
|
||||
- width = qMax(textSizeMin.width(),textSizeMax.width());
|
||||
- width += spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->prefix()).width();
|
||||
- width += spinBoxOpt->fontMetrics.size(Qt::TextSingleLine, spinBox->suffix()).width();
|
||||
- }
|
||||
const qreal dpi = QStyleHelper::dpi(option);
|
||||
const bool hasButtons = (spinBoxOpt->buttonSymbols != QAbstractSpinBox::NoButtons);
|
||||
- const int buttonWidth = hasButtons ? 2 * qRound(QStyleHelper::dpiScaled(16, dpi)) : 0;
|
||||
+ const int margins = 8;
|
||||
+ const int buttonWidth = hasButtons ? qRound(QStyleHelper::dpiScaled(16, dpi)) : 0;
|
||||
const int frameWidth = spinBoxOpt->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth,
|
||||
spinBoxOpt, widget) : 0;
|
||||
- contentSize.setWidth(2 * 12 + width);
|
||||
- contentSize += QSize(buttonWidth + 2 * frameWidth, 2 * frameWidth);
|
||||
+
|
||||
+ contentSize += QSize(2 * buttonWidth + 2 * frameWidth + 2 * margins, 2 * frameWidth);
|
||||
}
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
default:
|
||||
contentSize = QWindowsVistaStyle::sizeFromContents(type, option, size, widget);
|
||||
break;
|
||||
|
||||
|
||||
Windows11Style: don't set minimum width for QAbstractSpinBox
|
||||
|
||||
There is no need to set a minimum width for QAbstractSpinBox in
|
||||
QWindows11Style::polish() as this might override the user preferences.
|
||||
Also the minimum size handling is now properly done within
|
||||
sizeFromContents().
|
||||
|
||||
Change-Id: Ibc1fd7a6f862fc85e3739025b9de581aa235d74c
|
||||
|
||||
Upstream commits:
|
||||
- Qt 6.8.3: f86da3d3f853adb1a5b823c1cc7be6db4a0265f3
|
||||
- Qt 6.9.0: b93a8dfdfe6900cb542fdc587dd2682007a6ac53
|
||||
- Qt 6.10.0: 2ec4c28470de115c16944653a5d4f6209452d56c
|
||||
|
||||
--- a/qtbase/src/plugins/styles/modernwindows/qwindows11style.cpp
|
||||
+++ b/qtbase/src/plugins/styles/modernwindows/qwindows11style.cpp
|
||||
@@ -29,7 +29,6 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
const static int topLevelRoundingRadius = 8; //Radius for toplevel items like popups for round corners
|
||||
const static int secondLevelRoundingRadius = 4; //Radius for second level items like hovered menu item round corners
|
||||
-constexpr QLatin1StringView originalWidthProperty("_q_windows11_style_original_width");
|
||||
|
||||
enum WINUI3Color {
|
||||
subtleHighlightColor, //Subtle highlight based on alpha used for hovered elements
|
||||
@@ -2140,13 +2139,6 @@ void QWindows11Style::polish(QWidget* widget)
|
||||
pal.setColor(QPalette::ButtonText, pal.text().color());
|
||||
pal.setColor(QPalette::BrightText, pal.text().color());
|
||||
widget->setPalette(pal);
|
||||
- } else if (widget->inherits("QAbstractSpinBox")) {
|
||||
- const int minWidth = 2 * 24 + 40;
|
||||
- const int originalWidth = widget->size().width();
|
||||
- if (originalWidth < minWidth) {
|
||||
- widget->resize(minWidth, widget->size().height());
|
||||
- widget->setProperty(originalWidthProperty.constData(), originalWidth);
|
||||
- }
|
||||
} else if (widget->inherits("QAbstractButton") || widget->inherits("QToolButton")) {
|
||||
widget->setAutoFillBackground(false);
|
||||
auto pal = widget->palette();
|
||||
@@ -2191,13 +2183,6 @@ void QWindows11Style::unpolish(QWidget *widget)
|
||||
scrollarea->viewport()->setPalette(pal);
|
||||
scrollarea->viewport()->setProperty("_q_original_background_palette", QVariant());
|
||||
}
|
||||
- if (widget->inherits("QAbstractSpinBox")) {
|
||||
- const QVariant originalWidth = widget->property(originalWidthProperty.constData());
|
||||
- if (originalWidth.isValid()) {
|
||||
- widget->resize(originalWidth.toInt(), widget->size().height());
|
||||
- widget->setProperty(originalWidthProperty.constData(), QVariant());
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
/*
|
||||
@ -16,13 +16,10 @@ Skip building/installing unneeded tools:
|
||||
-# Depends on the global features being evaluated.
|
||||
-qt_internal_create_wrapper_scripts()
|
||||
-
|
||||
add_library(Qt::GlobalConfig ALIAS GlobalConfig)
|
||||
|
||||
add_library(GlobalConfigPrivate INTERFACE)
|
||||
|
||||
--- a/qtbase/cmake/QtBaseGlobalTargets.cmake
|
||||
+++ b/qtbase/cmake/QtBaseGlobalTargets.cmake
|
||||
@@ -349,12 +349,3 @@ elseif(WASM)
|
||||
qt_internal_add_platform_internal_target(GlobalConfigPrivate)
|
||||
target_link_libraries(GlobalConfigPrivate INTERFACE GlobalConfig)
|
||||
@@ -390,12 +387,3 @@ elseif(WASM)
|
||||
qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/qt-wasmtestrunner.py"
|
||||
DESTINATION "${INSTALL_LIBEXECDIR}")
|
||||
endif()
|
||||
|
||||
@ -4,8 +4,8 @@ Date: Sat Oct 4 01:00:25 2025 +0100
|
||||
|
||||
static fixes
|
||||
|
||||
See: https://bugreports.qt.io/browse/QTBUG-86287
|
||||
See: https://bugreports.qt.io/browse/QTBUG-137004
|
||||
See: https://qt-project.atlassian.net/browse/QTBUG-86287
|
||||
See: https://qt-project.atlassian.net/browse/QTBUG-137004
|
||||
|
||||
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake
|
||||
index 26b9bf89633..0c546d09a8b 100644
|
||||
@ -24,7 +24,7 @@ diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
|
||||
index 99c517e3581..a2e644f77d9 100644
|
||||
--- a/qtbase/src/gui/configure.cmake
|
||||
+++ b/qtbase/src/gui/configure.cmake
|
||||
@@ -80,10 +80,14 @@ if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
@@ -89,10 +89,14 @@ if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_icccm xcb)
|
||||
@ -40,7 +40,7 @@ index 99c517e3581..a2e644f77d9 100644
|
||||
if((X11_SUPPORTED) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
|
||||
endif()
|
||||
@@ -488,6 +492,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
@@ -515,6 +519,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
LIBRARIES
|
||||
XCB::CURSOR
|
||||
XCB::ICCCM
|
||||
@ -48,7 +48,7 @@ index 99c517e3581..a2e644f77d9 100644
|
||||
XCB::IMAGE
|
||||
XCB::KEYSYMS
|
||||
XCB::RANDR
|
||||
@@ -503,6 +508,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
@@ -530,6 +535,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
"// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++
|
||||
#define explicit dont_use_cxx_explicit
|
||||
#include <xcb/xcb.h>
|
||||
@ -70,7 +70,7 @@ index e8fb442dd43..e964138115c 100644
|
||||
XCB::RANDR
|
||||
--- a/qtbase/src/gui/configure.cmake
|
||||
+++ b/qtbase/src/gui/configure.cmake
|
||||
@@ -504,6 +504,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
@@ -531,6 +531,7 @@ qt_config_compile_test(xcb_syslibs
|
||||
XCB::XFIXES
|
||||
XCB::XKB
|
||||
XCB::XCB
|
||||
|
||||
@ -14,7 +14,8 @@ Other options which may work, but which have not been extensively tested are (pl
|
||||
* On Windows, using a POSIX compatibility layer application such as [cygwin](https://www.cygwin.com/) or [msys2](https://www.msys2.org/).
|
||||
|
||||
The instructions below work on Ubuntu and Debian. Make sure the distribution's `g++-mingw-w64-x86-64-posix`
|
||||
package meets the minimum required `g++` version specified in [dependencies.md](dependencies.md).
|
||||
package meets the minimum required GCC version specified in [dependencies.md](dependencies.md).
|
||||
If compiling with the GUI (default in depends), at least GCC version 13 is required.
|
||||
|
||||
Installing Windows Subsystem for Linux
|
||||
---------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user