summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-07-04 22:28:50 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-07-09 21:23:17 +0000
commit416e07e0575922323b76e4e7768409b203292837 (patch)
tree7d56ad80d6c4966165d8e9c8c208200969549623 /src/corelib/thread/qthread.h
parent536696196c4f954ffd2848bb89ea0404938262ad (diff)
QEventLoopLocker: rewrite to hold public classes
... instead of Private ones, at the cost of having to befriend of all the lockable classes, because we need access to their d_func()'s. This simplifies the code, because we don't need the manual QClass to QClassPrivate mapping (o2p) anymore, we can just use d_func(). This also paves the way to make QEventLoopLocker almost completely inline and use a 3-pointer form of QBiPointer, once available, to hide the bit fiddling. We couldn't make such a change if the class continued to hold pointers to QClassPrivate's. Pick-to: 6.6 Task-number: QTBUG-114793 Change-Id: Id300e4d45d6cacabe090a46cd6433c5ead3c8b0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r--src/corelib/thread/qthread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index cea5aeb73c..40f363ee5a 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -24,6 +24,7 @@ QT_BEGIN_NAMESPACE
class QThreadData;
class QThreadPrivate;
class QAbstractEventDispatcher;
+class QEventLoopLocker;
class Q_CORE_EXPORT QThread : public QObject
{
@@ -109,6 +110,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QThread)
+ friend class QEventLoopLocker;
#if QT_CONFIG(cxx11_future)
[[nodiscard]] static QThread *createThreadImpl(std::future<void> &&future);