summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qmap.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-06 16:57:31 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-10-07 19:03:41 +0000
commit52812e9a2b578d3c25f85612a6fdcffbdefd84e1 (patch)
tree2775fd9cbe21898201cd715297805941a37dcf47 /src/corelib/tools/qmap.h
parenteb88d77a2752b11dfb1f12f1267676ebfb36cf0c (diff)
QMulti(Map|Hash): add move ctor from Q(Map|Hash)
There was a copy ctor, a move ctor was missing. Change-Id: If09a4d4c74682169759eff43b298f6c77702c169 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qmap.h')
-rw-r--r--src/corelib/tools/qmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index b7bd268bda..df2e5f1caf 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -1177,6 +1177,9 @@ public:
}
#endif
QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
+#ifdef Q_COMPILER_RVALUE_REFS
+ QMultiMap(QMap<Key, T> &&other) Q_DECL_NOTHROW : QMap<Key, T>(std::move(other)) {}
+#endif
inline void swap(QMultiMap<Key, T> &other) { QMap<Key, T>::swap(other); }
inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)