diff options
Diffstat (limited to 'src/corelib/json/qjsondocument.h')
-rw-r--r-- | src/corelib/json/qjsondocument.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h index 19885a8d56..82f223709e 100644 --- a/src/corelib/json/qjsondocument.h +++ b/src/corelib/json/qjsondocument.h @@ -93,6 +93,23 @@ public: QJsonDocument(const QJsonDocument &other); QJsonDocument &operator =(const QJsonDocument &other); + QJsonDocument(QJsonDocument &&other) Q_DECL_NOTHROW + : d(other.d) + { + other.d = nullptr; + } + + QJsonDocument &operator =(QJsonDocument &&other) Q_DECL_NOTHROW + { + swap(other); + return *this; + } + + void swap(QJsonDocument &other) Q_DECL_NOTHROW + { + qSwap(d, other.d); + } + enum DataValidation { Validate, BypassValidation @@ -147,6 +164,8 @@ private: QJsonPrivate::Data *d; }; +Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonDocument) + #if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &); #endif |