summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2010-11-02 14:20:37 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-03 10:50:48 (GMT)
commitd12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe (patch)
tree32306cd47731503f85a3d88881a5e28901506432 /src/corelib/tools/qstring.h
parent9ff533aa0ddf944b73b0c29193fc9936c644142e (diff)
downloadQt-d12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe.zip
Qt-d12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe.tar.gz
Qt-d12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe.tar.bz2
Containers: add member-swap
Member-swap is required by the STL Sequence concept, but is also needed to write exception-safe code. Merge-request: 871 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r--src/corelib/tools/qstring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 589fdc2..07f43ca 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -108,6 +108,7 @@ public:
inline QString &operator=(QString &&other)
{ qSwap(d, other.d); return *this; }
#endif
+ inline void swap(QString &other) { qSwap(d, other.d); }
inline int size() const { return d->size; }
inline int count() const { return d->size; }
inline int length() const;