diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-25 01:00:25 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-25 11:30:04 +0100 |
commit | 58c69df4d38324644bc49ec5f42ee8343a454b2d (patch) | |
tree | de0a1ce603292dcaff134d4e1e8ab064295515a2 /src/corelib/thread/qthread.h | |
parent | 03b1d2c44940322208c12c7bceee376b51d8e852 (diff) | |
parent | 59a705e3710b0ba93bb698e3223241cfac932948 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/corelib/tools/qhash.h
src/gui/kernel/qevent.h
src/widgets/kernel/qshortcut.cpp
src/widgets/kernel/qshortcut.h
Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
Diffstat (limited to 'src/corelib/thread/qthread.h')
-rw-r--r-- | src/corelib/thread/qthread.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 8141f945b6..635dd94522 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -42,6 +42,7 @@ #define QTHREAD_H #include <QtCore/qobject.h> +#include <QtCore/qdeadlinetimer.h> // For QThread::create. The configure-time test just checks for the availability // of std::future and std::async; for the C++17 codepath we perform some extra @@ -57,8 +58,6 @@ # endif #endif -#include <limits.h> - QT_BEGIN_NAMESPACE @@ -135,8 +134,9 @@ public Q_SLOTS: void quit(); public: - // default argument causes thread to block indefinetely - bool wait(unsigned long time = ULONG_MAX); + bool wait(QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever)); + // ### Qt6 inline this function + bool wait(unsigned long time); static void sleep(unsigned long); static void msleep(unsigned long); |