summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-11-22 23:19:34 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-12-12 06:32:46 +0100
commitb89f2ebd9543d4cf60821a9c3cc12547d7d2253e (patch)
treea4174e93298a1a7fe1eb08ddaf0994ee820aecf0 /src
parentb3c0e9afa0041d4d45e47880732deda1dd1013b9 (diff)
QWaitCondition: un-deprecate wait() functions with ulong arg
The wait() functions with the unsigned long arg were marked for removal for Qt6 but due to the high usage of this functions and the very small gain, revert the deprecation. Change-Id: I9c9b720d279a59d87730f51de0f321b3794aa88e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/thread/qwaitcondition.h9
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc6
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp4
3 files changed, 4 insertions, 15 deletions
diff --git a/src/corelib/thread/qwaitcondition.h b/src/corelib/thread/qwaitcondition.h
index 079049af25..0a47ac3717 100644
--- a/src/corelib/thread/qwaitcondition.h
+++ b/src/corelib/thread/qwaitcondition.h
@@ -58,14 +58,11 @@ public:
bool wait(QMutex *lockedMutex,
QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever));
+ bool wait(QMutex *lockedMutex, unsigned long time);
+
bool wait(QReadWriteLock *lockedReadWriteLock,
QDeadlineTimer deadline = QDeadlineTimer(QDeadlineTimer::Forever));
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_VERSION_X_5_15("Use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead")
- bool wait(QMutex *lockedMutex, unsigned long time);
- QT_DEPRECATED_VERSION_X_5_15("Use wait(QReadWriteLock *lockedReadWriteLock, QDeadlineTimer deadline) instead")
bool wait(QReadWriteLock *lockedReadWriteLock, unsigned long time);
-#endif
void wakeOne();
void wakeAll();
@@ -94,10 +91,8 @@ public:
{ return true; }
bool wait(QReadWriteLock *, QDeadlineTimer = QDeadlineTimer(QDeadlineTimer::Forever))
{ return true; }
-#if QT_DEPRECATED_SINCE(5, 15)
bool wait(QMutex *, unsigned long) { return true; }
bool wait(QReadWriteLock *, unsigned long) { return true; }
-#endif
void wakeOne() {}
void wakeAll() {}
diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc
index 9da6f6f25c..014d549477 100644
--- a/src/corelib/thread/qwaitcondition.qdoc
+++ b/src/corelib/thread/qwaitcondition.qdoc
@@ -119,16 +119,14 @@
\sa wakeOne()
*/
-#if QT_DEPRECATED_SINCE(5, 15)
/*!
\fn bool QWaitCondition::wait(QMutex *lockedMutex, unsigned long time)
- \obsolete use wait(QMutex *lockedMutex, QDeadlineTimer deadline) instead
+ \overload
*/
/*!
\fn bool QWaitCondition::wait(QReadWriteLock *lockedReadWriteLock, unsigned long time)
- \obsolete use wait(QReadWriteLock *lockedReadWriteLock, QDeadlineTimer deadline) instead
+ \overload
*/
-#endif
/*!
\fn bool QWaitCondition::wait(QMutex *lockedMutex, QDeadlineTimer deadline)
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index 80f9e780e7..88b058f410 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -202,14 +202,12 @@ void QWaitCondition::wakeAll()
report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeAll()", "mutex unlock");
}
-#if QT_DEPRECATED_SINCE(5, 15)
bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
{
if (time == std::numeric_limits<unsigned long>::max())
return wait(mutex, QDeadlineTimer(QDeadlineTimer::Forever));
return wait(mutex, QDeadlineTimer(time));
}
-#endif
bool QWaitCondition::wait(QMutex *mutex, QDeadlineTimer deadline)
{
@@ -231,14 +229,12 @@ bool QWaitCondition::wait(QMutex *mutex, QDeadlineTimer deadline)
return returnValue;
}
-#if QT_DEPRECATED_SINCE(5, 15)
bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
{
if (time == std::numeric_limits<unsigned long>::max())
return wait(readWriteLock, QDeadlineTimer(QDeadlineTimer::Forever));
return wait(readWriteLock, QDeadlineTimer(time));
}
-#endif
bool QWaitCondition::wait(QReadWriteLock *readWriteLock, QDeadlineTimer deadline)
{