From cb2ff3b73310c7c2dbffe4a170e356027ebe1b0d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 11 May 2023 09:03:26 +0200 Subject: Make QGenericRunnable a private nested class of QRunnable We don't intend to make QGenericRunnable public API, so prevent people from using it outside QRunnable::create(). Change-Id: I49f182463ca307aaf6370adfa43bae14b4ce0df8 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Thiago Macieira --- src/corelib/thread/qrunnable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/thread/qrunnable.h b/src/corelib/thread/qrunnable.h index 756156e583..9471bbe1a2 100644 --- a/src/corelib/thread/qrunnable.h +++ b/src/corelib/thread/qrunnable.h @@ -37,9 +37,10 @@ public: private: static Q_DECL_COLD_FUNCTION QRunnable *warnNullCallable(); + class QGenericRunnable; }; -class QGenericRunnable : public QRunnable +class QRunnable::QGenericRunnable : public QRunnable { // Type erasure, to only instantiate a non-virtual class per Callable: class HelperBase -- cgit v1.2.3