summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-06-10 11:27:06 +0200
committerDavid Faure <david.faure@kdab.com>2016-07-30 12:10:29 +0000
commitf2995ee078661e2d8715cbbcab7871198082d725 (patch)
tree0e8e3b54c0b97b594f4d3c288961f353f515cef6 /src/corelib/thread
parent7876add8b13e166711dc42e458baab43d50999d2 (diff)
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>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qwaitcondition.h3
-rw-r--r--src/corelib/thread/qwaitcondition.qdoc15
2 files changed, 18 insertions, 0 deletions
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().
+*/