diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-07-06 16:57:31 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-07 19:03:41 +0000 |
commit | 52812e9a2b578d3c25f85612a6fdcffbdefd84e1 (patch) | |
tree | 2775fd9cbe21898201cd715297805941a37dcf47 /src/corelib/tools/qhash.h | |
parent | eb88d77a2752b11dfb1f12f1267676ebfb36cf0c (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/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 8d65a018ae..8e71925fd9 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -948,6 +948,9 @@ public: // compiler-generated destructor is fine! QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {} +#ifdef Q_COMPILER_RVALUE_REFS + QMultiHash(QHash<Key, T> &&other) Q_DECL_NOTHROW : QHash<Key, T>(std::move(other)) {} +#endif void swap(QMultiHash &other) { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value) |