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 <thiago.macieira@intel.com>
This commit is contained in:
David Faure 2016-06-10 11:27:06 +02:00
parent 7876add8b1
commit f2995ee078
2 changed files with 18 additions and 0 deletions

View File

@ -65,6 +65,9 @@ public:
void wakeOne();
void wakeAll();
void notify_one() { wakeOne(); }
void notify_all() { wakeAll(); }
private:
Q_DISABLE_COPY(QWaitCondition)

View File

@ -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().
*/