summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-12-04 13:58:39 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-12-05 17:38:45 -0800
commitbc080a909b8bb67c1fb23afca69682ba86cdf526 (patch)
tree80b0ad25d685d3da4e04c47bb957e27612808786 /src/corelib/thread/qmutex.cpp
parentc3de0905697f8709f208c5cc1100b4f5e45032f1 (diff)
QMutex: remove QMutexPrivate from the public-ish API
Pass the pointer as a void* to avoid having "QMutexPrivate" in the ABI that user content calls. To have such a private type in ABI used by inlines in user code required an ELFIGNORE in qmutex_p.h. This change removes that need for Qt 7. We can't add an #ifdef for the comment block because "ignore-next" would then apply to the #endif line. Therefore, a ### Qt7 comment will have to suffice. It's harmless if we forget to do it. Change-Id: I83e6ddaf775e71eacb42fffd5cd6b87527b9c08b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
-rw-r--r--src/corelib/thread/qmutex.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index ec6c711a4f2..25cd9bcd9ec 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -101,8 +101,9 @@ static inline QMutexPrivate *dummyFutexValue()
\warning Destroying a locked mutex may result in undefined behavior.
*/
-void QBasicMutex::destroyInternal(QMutexPrivate *d)
+void QBasicMutex::destroyInternal(void *ptr)
{
+ auto d = static_cast<QMutexPrivate *>(ptr);
if (!d)
return;
if (!futexAvailable()) {