summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimetype.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-25 18:41:14 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-30 07:20:50 +0000
commitf815676b7d46cfe6e79985dee9fce182edb346d7 (patch)
tree26f277f5d637753f35358e03a31957e7060e6f2f /src/corelib/mimetypes/qmimetype.h
parent20147fae60fd062788c51b058ebb70b33d7fd664 (diff)
QtCore: make all Q_DECLARE_SHARED types nothrow move-assignable
Excepting QDebug, which doesn't have value semantics. Change-Id: I43757ef7bba4c1f5b6de9144f12b38ce840cd9f9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/mimetypes/qmimetype.h')
-rw-r--r--src/corelib/mimetypes/qmimetype.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h
index 5693b703ee..3c153da21d 100644
--- a/src/corelib/mimetypes/qmimetype.h
+++ b/src/corelib/mimetypes/qmimetype.h
@@ -57,13 +57,9 @@ public:
QMimeType(const QMimeType &other);
QMimeType &operator=(const QMimeType &other);
#ifdef Q_COMPILER_RVALUE_REFS
- QMimeType &operator=(QMimeType &&other)
- {
- qSwap(d, other.d);
- return *this;
- }
+ QMimeType &operator=(QMimeType &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
- void swap(QMimeType &other)
+ void swap(QMimeType &other) Q_DECL_NOTHROW
{
qSwap(d, other.d);
}