summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/xml')
-rw-r--r--src/corelib/xml/qxmlstream.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h
index 21188bc5e0..7b1ea624c5 100644
--- a/src/corelib/xml/qxmlstream.h
+++ b/src/corelib/xml/qxmlstream.h
@@ -75,6 +75,28 @@ public:
QXmlStreamAttribute(const QString &qualifiedName, const QString &value);
QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value);
QXmlStreamAttribute(const QXmlStreamAttribute &);
+#ifdef Q_COMPILER_RVALUE_REFS
+ QXmlStreamAttribute(QXmlStreamAttribute &&other) Q_DECL_NOTHROW // = default;
+ : m_name(std::move(other.m_name)),
+ m_namespaceUri(std::move(other.m_namespaceUri)),
+ m_qualifiedName(std::move(other.m_qualifiedName)),
+ m_value(std::move(other.m_value)),
+ reserved(other.reserved),
+ m_isDefault(other.m_isDefault)
+ {
+ other.reserved = Q_NULLPTR;
+ }
+ QXmlStreamAttribute &operator=(QXmlStreamAttribute &&other) Q_DECL_NOTHROW // = default;
+ {
+ m_name = std::move(other.m_name);
+ m_namespaceUri = std::move(other.m_namespaceUri);
+ m_qualifiedName = std::move(other.m_qualifiedName);
+ m_value = std::move(other.m_value);
+ qSwap(reserved, other.reserved);
+ m_isDefault = other.m_isDefault;
+ return *this;
+ }
+#endif
QXmlStreamAttribute& operator=(const QXmlStreamAttribute &);
~QXmlStreamAttribute();
inline QStringRef namespaceUri() const { return m_namespaceUri; }