diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index feb9c2281ca..e0d252b8eec 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -989,12 +989,6 @@ void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher) \fn bool QThread::wait(unsigned long time) \overload */ -bool QThread::wait(unsigned long time) -{ - if (time == std::numeric_limits::max()) - return wait(QDeadlineTimer(QDeadlineTimer::Forever)); - return wait(QDeadlineTimer(time)); -} #if QT_CONFIG(thread) diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 49224c81e68..7d268cffc93 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -115,8 +115,12 @@ public Q_SLOTS: public: bool wait(QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever)); - // ### Qt6 inline this function - bool wait(unsigned long time); + bool wait(unsigned long time) + { + if (time == std::numeric_limits::max()) + return wait(QDeadlineTimer(QDeadlineTimer::Forever)); + return wait(QDeadlineTimer(time)); + } static void sleep(unsigned long); static void msleep(unsigned long);