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>
This commit is contained in:
parent
b3c0e9afa0
commit
b89f2ebd95
@ -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() {}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user