public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qt-creator] epel9: Fix build against Qt 6.9.2
@ 2026-10-08 20:59 Jan Grulich
0 siblings, 0 replies; only message in thread
From: Jan Grulich @ 2026-10-08 20:59 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/qt-creator
Branch : epel9
Commit : f6791e25a4ad662ad881e9c8b0fa046c1e8bda23
Author : Jan Grulich <jgrulich@redhat.com>
Date : 2025-09-09T19:07:53+02:00
Stats : +50/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/qt-creator/c/f6791e25a4ad662ad881e9c8b0fa046c1e8bda23?branch=epel9
Log:
Fix build against Qt 6.9.2
---
diff --git a/qt-creator-stringtable-adapt-to-qarraydata-member-name-change.patch b/qt-creator-stringtable-adapt-to-qarraydata-member-name-change.patch
new file mode 100644
index 0000000..e126d98
--- /dev/null
+++ b/qt-creator-stringtable-adapt-to-qarraydata-member-name-change.patch
@@ -0,0 +1,48 @@
+From 04e6e631b2689f07a91bd753911d67a90d36e18c Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Thu, 10 Jul 2025 07:17:48 +0200
+Subject: [PATCH] StringTable: adapt to QArrayData member name change
+
+The implementation (in unconditionally-disabled debug code) inspected
+QArrayData::ref_, which
+qtbase/3f61f736266ece40d627dcf6214618a22a009fd1 recently renamed to
+m_ref in order to catch exactly such out-of-tree users.
+
+While a re-rename is being merged to qtbase, unblock QtCreator by
+writing a little helper to extract the member under either name, using
+Expression SFINAE.
+
+As a drive-by, change the implicit Q*Atomc::loadAcquire() into a
+loadRelaxed(), which is sufficient here, because the code just does
+calculations on the ref-count number, it needs no memory ordering.
+
+Change-Id: Ib9351e1251fc393f8f92ca6076fa725141d396e8
+Reviewed-by: hjk <hjk@qt.io>
+---
+ src/libs/utils/stringtable.cpp | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/libs/utils/stringtable.cpp b/src/libs/utils/stringtable.cpp
+index 61d49f6a..ed269456 100644
+--- a/src/libs/utils/stringtable.cpp
++++ b/src/libs/utils/stringtable.cpp
+@@ -92,11 +92,18 @@ QTCREATOR_UTILS_EXPORT void scheduleGC()
+
+ static int bytesSaved = 0;
+
++// 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 isQStringInUse(const QString &string)
+ {
+ 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)
+ qDebug() << ref << string.size() << string.left(50);
diff --git a/qt-creator.spec b/qt-creator.spec
index 4aa577d..5b2a5b5 100644
--- a/qt-creator.spec
+++ b/qt-creator.spec
@@ -23,6 +23,8 @@ Patch3: qt-creator-debuginfod.patch
# Drop refereces to unbundled yaml-cpp
Patch4: qt-creator_unbundle.patch
+Patch10: qt-creator-stringtable-adapt-to-qarraydata-member-name-change.patch
+
BuildRequires: chrpath
BuildRequires: cmake
#BuildRequires: cmake(KF5SyntaxHighlighting)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 20:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 20:59 [rpms/qt-creator] epel9: Fix build against Qt 6.9.2 Jan Grulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox