diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:45:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 15:45:35 +0200 |
commit | 4456984da780b14572e1ec0f079a4d349ab299bd (patch) | |
tree | f586a281a81c57c91c49e83a5d3ec6c7eece0578 /src/corelib/tools/qhash.h | |
parent | e824abd987d77efaa085fe1f9fb514d270798d55 (diff) | |
parent | 281121697340084f7d385eab530f41916789b94d (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
tests/auto/corelib/io/qfile/tst_qfile.cpp
tests/auto/corelib/io/qprocess/tst_qprocess.cpp
tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 8d65a018ae..a18dd74706 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -935,7 +935,7 @@ template <class Key, class T> class QMultiHash : public QHash<Key, T> { public: - QMultiHash() {} + QMultiHash() Q_DECL_NOTHROW {} #ifdef Q_COMPILER_INITIALIZER_LISTS inline QMultiHash(std::initializer_list<std::pair<Key,T> > list) { @@ -948,7 +948,10 @@ public: // compiler-generated destructor is fine! QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {} - void swap(QMultiHash &other) { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps +#ifdef Q_COMPILER_RVALUE_REFS + QMultiHash(QHash<Key, T> &&other) Q_DECL_NOTHROW : QHash<Key, T>(std::move(other)) {} +#endif + void swap(QMultiHash &other) Q_DECL_NOTHROW { QHash<Key, T>::swap(other); } // prevent QMultiHash<->QHash swaps inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value) { return QHash<Key, T>::insert(key, value); } |