summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-05-11 09:03:26 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-05-16 17:55:49 +0200
commitcb2ff3b73310c7c2dbffe4a170e356027ebe1b0d (patch)
tree3d8ed4e0c51b4b48cf61fcf5a7b3110f589519a7
parent47e63d436ea411431101f9d64d0365f02f15c82f (diff)
downloadqtbase-cb2ff3b73310c7c2dbffe4a170e356027ebe1b0d.tar.gz
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 <allan.jensen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/thread/qrunnable.h3
1 files changed, 2 insertions, 1 deletions
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