summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r--src/corelib/thread/qthread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index a4b7183b5a..641c8ef68a 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -30,6 +30,7 @@ class Q_CORE_EXPORT QThread : public QObject
public:
static Qt::HANDLE currentThreadId() noexcept Q_DECL_PURE_FUNCTION;
static QThread *currentThread();
+ static bool isMainThread();
static int idealThreadCount() noexcept;
static void yieldCurrentThread();
@@ -68,6 +69,8 @@ public:
bool event(QEvent *event) override;
int loopLevel() const;
+ bool isCurrentThread() const;
+
template <typename Function, typename... Args>
[[nodiscard]] static QThread *create(Function &&f, Args &&... args);