diff options
author | Roman Pasechnik <roman@pasechnik.net> | 2013-01-10 14:45:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-24 11:38:54 +0100 |
commit | 45be71bf7d7c855e74b84d2fabb4e626afc57a22 (patch) | |
tree | adfa3c7881d90835b089af251a7e5240e568d4ea /src/corelib/tools/qmap.cpp | |
parent | fc663b5f9aae16fe6a03160e3eb148a5f742ac58 (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/qmap.cpp')
-rw-r--r-- | src/corelib/tools/qmap.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 75104e4825..a4c28b5bd4 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -538,6 +538,16 @@ void QMapDataBase::freeData(QMapDataBase *d) \sa toStdMap() */ +/*! \fn QMap::QMap(std::initializer_list<std::pair<Key,T> > list) + \since 5.1 + + Constructs a map 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 std::map<Key, T> QMap::toStdMap() const Returns an STL map equivalent to this QMap. @@ -1576,6 +1586,16 @@ void QMapDataBase::freeData(QMapDataBase *d) Constructs an empty map. */ +/*! \fn QMultiMap::QMultiMap(std::initializer_list<std::pair<Key,T> > list) + \since 5.1 + + Constructs a multi map 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 QMultiMap::QMultiMap(const QMap<Key, T> &other) Constructs a copy of \a other (which can be a QMap or a |