summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-11-19 15:24:08 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-11-19 15:24:08 +0100
commite50e811461b54e07184af547f62aa44b3c5bb681 (patch)
tree45541bc05471d6c49305afeafa13f69031ccdecd /src/corelib/tools/qhash.h
parent05b65c2f9df1c2c56c72f313401a6adb422d381b (diff)
parentb115770cc3bba68740a6848c7ccaed932399aca9 (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt
Conflicts: src/gui/text/qfontengine_mac.mm src/gui/text/qfontengine_p.h
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r--src/corelib/tools/qhash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 992ff33b94..21fca2dd05 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -287,6 +287,7 @@ public:
inline QHash<Key, T> &operator=(QHash<Key, T> &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QHash<Key, T> &other) { qSwap(d, other.d); }
bool operator==(const QHash<Key, T> &other) const;
inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
@@ -925,6 +926,7 @@ class QMultiHash : public QHash<Key, T>
public:
QMultiHash() {}
QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
+ inline void swap(QMultiHash<Key, T> &other) { 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); }