From f2995ee078661e2d8715cbbcab7871198082d725 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 10 Jun 2016 11:27:06 +0200 Subject: QWaitCondition: add notify_one/notify_all, i.e. STL naming This makes the API more consistent with the STL, which helps discovering the API. Much like QVector has push_back etc. Change-Id: I75f6b77ab94233c15e17f66605f4bf13aa03e61c Reviewed-by: Thiago Macieira --- src/corelib/thread/qwaitcondition.h | 3 +++ src/corelib/thread/qwaitcondition.qdoc | 15 +++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qwaitcondition.h b/src/corelib/thread/qwaitcondition.h index d2e018834a..a0c6766833 100644 --- a/src/corelib/thread/qwaitcondition.h +++ b/src/corelib/thread/qwaitcondition.h @@ -65,6 +65,9 @@ public: void wakeOne(); void wakeAll(); + void notify_one() { wakeOne(); } + void notify_all() { wakeAll(); } + private: Q_DISABLE_COPY(QWaitCondition) diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc index d7de323922..eebc28f059 100644 --- a/src/corelib/thread/qwaitcondition.qdoc +++ b/src/corelib/thread/qwaitcondition.qdoc @@ -172,3 +172,18 @@ \sa wakeOne(), wakeAll() */ + + +/*! \fn void QWaitCondition::notify_one() + \since 5.8 + + This function is provided for STL compatibility. It is equivalent + to wakeOne(). +*/ + +/*! \fn void QWaitCondition::notify_all() + \since 5.8 + + This function is provided for STL compatibility. It is equivalent + to wakeAll(). +*/ -- cgit v1.2.3