summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-01-02 17:23:14 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-06-22 07:14:29 +0000
commit31023ef553f3b26081f92a5d95a886f4d7cffdd9 (patch)
treeb720c725dc99aca3bdec5393e616da94fd87570a /src/corelib/thread/qthread.h
parent47aebe3587c7be28ed4fde23b77848657482ed66 (diff)
Make the sleep methods available in QThread even if QT_NO_THREAD
sleep, msleep, and usleep are not actually related to threading and serve a purpose also in a single threaded application. Change-Id: Iba2e343d48a9c09e60125bc1b589047e0241608a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r--src/corelib/thread/qthread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h
index 3df76077e1..19951e844a 100644
--- a/src/corelib/thread/qthread.h
+++ b/src/corelib/thread/qthread.h
@@ -247,6 +247,10 @@ public:
static Qt::HANDLE currentThreadId() { return Qt::HANDLE(currentThread()); }
static QThread* currentThread();
+ static void sleep(unsigned long);
+ static void msleep(unsigned long);
+ static void usleep(unsigned long);
+
protected:
QThread(QThreadPrivate &dd, QObject *parent = nullptr);