diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2010-11-02 14:20:38 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-03 10:50:48 (GMT) |
commit | 86ea8521c6f145be24c40c799b6b4e8f6e854e2b (patch) | |
tree | bbceb07abeb3f8b974287ea648fd995b4ba8345c /src/corelib/tools | |
parent | d12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe (diff) | |
download | Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.zip Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.tar.gz Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.tar.bz2 |
Add member-swap to shared datatypes that don't have it.
For consistency.
Merge-request: 871
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qmap.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 8 | ||||
-rw-r--r-- | src/corelib/tools/qregexp.h | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 5a8057d..3dc9c92 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -738,6 +738,7 @@ void QHashData::checkSanity() */ /*! \fn void QMultiHash::swap(QMultiHash<Key, T> &other) + \since 4.8 Swaps hash \a other with this hash. This operation is very fast and never fails. diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 7b814b3..5a5fffd 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -412,6 +412,7 @@ void QMapData::dump() */ /*! \fn void QMultiMap::swap(QMultiMap<Key, T> &other) + \since 4.8 Swaps map \a other with this map. This operation is very fast and never fails. diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 7a26c4f..5d2a0e3 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -3858,6 +3858,14 @@ QRegExp &QRegExp::operator=(const QRegExp &rx) } /*! + \fn void QRegExp::swap(QRegExp &other) + \since 4.8 + + Swaps regular expression \a other with this regular + expression. This operation is very fast and never fails. +*/ + +/*! Returns true if this regular expression is equal to \a rx; otherwise returns false. diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h index 0b4a702..4a74f90 100644 --- a/src/corelib/tools/qregexp.h +++ b/src/corelib/tools/qregexp.h @@ -80,6 +80,7 @@ public: inline QRegExp &operator=(QRegExp &&other) { qSwap(priv,other.priv); return *this; } #endif + inline void swap(QRegExp &other) { qSwap(priv, other.priv); } bool operator==(const QRegExp &rx) const; inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); } |