summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qrunnable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qrunnable.cpp')
-rw-r--r--src/corelib/thread/qrunnable.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp
index 5418fc8ecf..f9d69ed5cb 100644
--- a/src/corelib/thread/qrunnable.cpp
+++ b/src/corelib/thread/qrunnable.cpp
@@ -21,6 +21,17 @@ QRunnable *QRunnable::warnNullCallable()
return nullptr;
}
+
+QRunnable::QGenericRunnable::~QGenericRunnable()
+{
+ runHelper->destroy();
+}
+
+void QRunnable::QGenericRunnable::run()
+{
+ runHelper->run();
+}
+
/*!
\class QRunnable
\inmodule QtCore
@@ -90,7 +101,7 @@ QRunnable *QRunnable::warnNullCallable()
*/
/*!
- \fn template<typename Callable, if_callable<Callable>> QRunnable *QRunnable::create(Callable &&callableToRun);
+ \fn template<typename Callable, QRunnable::if_callable<Callable>> QRunnable *QRunnable::create(Callable &&callableToRun);
\since 5.15
Creates a QRunnable that calls \a callableToRun in run().