diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-04-07 10:07:07 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-04-08 00:20:10 +0200 |
commit | 54a71e8c83de9b0312c920bc52378efcf20d537b (patch) | |
tree | 3906653c53aed828e06b47066617a46f4688c490 /src/qml/qml/qqmlerror.h | |
parent | f8c94e4c01795f00934d5a98656f340a105de194 (diff) |
Make QQmlError movable
This silences a code-checker warning, and is a good idea in general.
Change-Id: I79642d57e53d4be7312e9066f72c2a069f079bca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlerror.h')
-rw-r--r-- | src/qml/qml/qqmlerror.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlerror.h b/src/qml/qml/qqmlerror.h index 53a28b244b..bb24717714 100644 --- a/src/qml/qml/qqmlerror.h +++ b/src/qml/qml/qqmlerror.h @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -// ### Qt 6: should this be called QQmlMessage, since it can have a message type? +// ### Qt 7: should this be called QQmlMessage, since it can have a message type? class QDebug; class QQmlErrorPrivate; class Q_QML_EXPORT QQmlError @@ -55,9 +55,17 @@ class Q_QML_EXPORT QQmlError public: QQmlError(); QQmlError(const QQmlError &); + QQmlError(QQmlError &&other) noexcept + : d(std::exchange(other.d, nullptr)) + {} + QQmlError &operator=(const QQmlError &); + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QQmlError) ~QQmlError(); + void swap(QQmlError &other) + { qt_ptr_swap(d, other.d); } + bool isValid() const; QUrl url() const; |