dev-qt/qt-creator: backport build fix for upcoming Qt 6.9.2

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2025-08-12 04:19:00 -04:00
parent d2d7ddced4
commit d1e461bc09
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
https://github.com/qt-creator/qt-creator/commit/04e6e631b26
--- a/src/libs/utils/stringtable.cpp
+++ b/src/libs/utils/stringtable.cpp
@@ -91,9 +91,16 @@
}
+// qtbase/3f61f736266ece40d627dcf6214618a22a009fd1 changed QArrayData::{ref_ → m_ref};
+// adapt:
+template <typename S>
+auto getQArrayDataRef(const S *s) -> decltype(s->ref_) { return s->ref_.loadRelaxed(); }
+template <typename S>
+auto getQArrayDataRef(const S *s) -> decltype(s->m_ref) { return s->m_ref.loadRelaxed(); }
+
static inline bool isDetached(const QString &string, int &bytesSaved)
{
if (DebugStringTable) {
QStringPrivate &data_ptr = const_cast<QString&>(string).data_ptr();
- const int ref = data_ptr->d_ptr()->ref_;
+ const int ref = getQArrayDataRef(data_ptr->d_ptr());
bytesSaved += (ref - 1) * string.size();
if (ref > 10)

View File

@@ -103,6 +103,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-16.0.0-musl-no-execinfo.patch
"${FILESDIR}"/${PN}-12.0.0-musl-no-malloc-trim.patch
"${FILESDIR}"/${P}-qt692.patch
)
# written in Go, use PREBUILT rather than FLAGS_IGNORED given the