summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorRoman Pasechnik <roman@pasechnik.net>2013-01-10 14:45:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-24 11:38:54 +0100
commit45be71bf7d7c855e74b84d2fabb4e626afc57a22 (patch)
treeadfa3c7881d90835b089af251a7e5240e568d4ea /src/corelib/tools/qhash.cpp
parentfc663b5f9aae16fe6a03160e3eb148a5f742ac58 (diff)
Added initializer list constructors for Qt associative containers.
Affected: QSet, QMap, QMultiMap, QHash, QMultiHash. Task-number: QTBUG-25679 Change-Id: I01f3ecfbca805f4c053a75232188bd2a77fdb1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 0103a208f3..b8cd076cb6 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -924,6 +924,16 @@ void QHashData::checkSanity()
\sa clear()
*/
+/*! \fn QHash::QHash(std::initializer_list<std::pair<Key,T> > list)
+ \since 5.1
+
+ Constructs a hash with a copy of each of the elements in the
+ initializer list \a list.
+
+ This function is only available if the program is being
+ compiled in C++11 mode.
+*/
+
/*! \fn QHash::QHash(const QHash<Key, T> &other)
Constructs a copy of \a other.
@@ -1981,6 +1991,16 @@ void QHashData::checkSanity()
Constructs an empty hash.
*/
+/*! \fn QMultiHash::QMultiHash(std::initializer_list<std::pair<Key,T> > list)
+ \since 5.1
+
+ Constructs a multi hash with a copy of each of the elements in the
+ initializer list \a list.
+
+ This function is only available if the program is being
+ compiled in C++11 mode.
+*/
+
/*! \fn QMultiHash::QMultiHash(const QHash<Key, T> &other)
Constructs a copy of \a other (which can be a QHash or a