From acd675c38ca3a839fe49de2af4699f6dd45ef561 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 4 May 2023 17:44:19 +0200 Subject: [PATCH] Move QGenericRunnableHelper info QGenericRunnable Because we can, and it prevents all the machinery from being exported by the Q_CORE_EXPORT on QRunnable. Change-Id: I80e0690956bff612f2048eefb2b64bc198835f1f Reviewed-by: Thiago Macieira Reviewed-by: Allan Sandfeld Jensen --- src/corelib/thread/qrunnable.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/corelib/thread/qrunnable.h b/src/corelib/thread/qrunnable.h index 2943ecc72c..e995c69700 100644 --- a/src/corelib/thread/qrunnable.h +++ b/src/corelib/thread/qrunnable.h @@ -35,7 +35,12 @@ public: bool autoDelete() const { return m_autoDelete; } void setAutoDelete(bool autoDelete) { m_autoDelete = autoDelete; } -protected: +private: + static Q_DECL_COLD_FUNCTION QRunnable *warnNullCallable(); +}; + +class QGenericRunnable : public QRunnable +{ // Type erasure, to only instantiate a non-virtual class per Callable: class QGenericRunnableHelperBase { @@ -77,12 +82,6 @@ protected: } }; -private: - static Q_DECL_COLD_FUNCTION QRunnable *warnNullCallable(); -}; - -class QGenericRunnable : public QRunnable -{ QGenericRunnableHelperBase *runHelper; public: template = true>