diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index b9284045503..df327ffb804 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -24,6 +24,7 @@ $(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) @@ -274,6 +275,7 @@ define $(package)_preprocess_cmds 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)) diff --git a/depends/patches/qt/fix-gcc16-sfinae-qanystringview.patch b/depends/patches/qt/fix-gcc16-sfinae-qanystringview.patch new file mode 100644 index 00000000000..cb48040eeb1 --- /dev/null +++ b/depends/patches/qt/fix-gcc16-sfinae-qanystringview.patch @@ -0,0 +1,47 @@ +commit 27230157212c32420e71b28870d6c77630c3dc37 +Author: Allan Sandfeld Jensen +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 + +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 +@@ -237,6 +237,10 @@ QT_BEGIN_NAMESPACE + \sa isNull(), isEmpty() + */ + ++// confirm we don't make an accidental copy constructor: ++static_assert(QtPrivate::IsContainerCompatibleWithQStringView::value == false); ++static_assert(QtPrivate::IsContainerCompatibleWithQUtf8StringView::value == false); ++ + /*! + \fn template 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 +@@ -97,10 +97,6 @@ private: + std::is_convertible + >, bool>; + +- // confirm we don't make an accidental copy constructor: +- static_assert(QtPrivate::IsContainerCompatibleWithQStringView::value == false); +- static_assert(QtPrivate::IsContainerCompatibleWithQUtf8StringView::value == false); +- + template + static constexpr bool isAsciiOnlyCharsAtCompileTime(Char *str, qsizetype sz) noexcept + {