diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-28 10:55:47 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-28 21:29:19 +0200 |
commit | 6b6159e5afe94091d6e990297d8bdab3c5549b11 (patch) | |
tree | 804c8a7a779aa75c06058acdbb27986a654c4375 /src/qml/qml/ftw | |
parent | f1c00fcaa0042d072ba84aaabab0ad22205ecbd9 (diff) |
QQmlRefPointer: Make some life cycle methods noexcept
Change-Id: Ib3b13611cd13c4f40a0dd5d553703979bc0a7726
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r-- | src/qml/qml/ftw/qqmlrefcount_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/ftw/qqmlrefcount_p.h b/src/qml/qml/ftw/qqmlrefcount_p.h index 5fbc9074c5..3d7598898f 100644 --- a/src/qml/qml/ftw/qqmlrefcount_p.h +++ b/src/qml/qml/ftw/qqmlrefcount_p.h @@ -57,16 +57,16 @@ public: AddRef, Adopt }; - Q_NODISCARD_CTOR inline QQmlRefPointer(); + Q_NODISCARD_CTOR inline QQmlRefPointer() noexcept; Q_NODISCARD_CTOR inline QQmlRefPointer(T *, Mode m = AddRef); Q_NODISCARD_CTOR inline QQmlRefPointer(const QQmlRefPointer &); - Q_NODISCARD_CTOR inline QQmlRefPointer(QQmlRefPointer &&); + Q_NODISCARD_CTOR inline QQmlRefPointer(QQmlRefPointer &&) noexcept; inline ~QQmlRefPointer(); void swap(QQmlRefPointer &other) noexcept { qt_ptr_swap(o, other.o); } inline QQmlRefPointer<T> &operator=(const QQmlRefPointer<T> &o); - inline QQmlRefPointer<T> &operator=(QQmlRefPointer<T> &&o); + inline QQmlRefPointer<T> &operator=(QQmlRefPointer<T> &&o) noexcept; inline bool isNull() const { return !o; } @@ -155,7 +155,7 @@ int QQmlRefCount::count() const } template<class T> -QQmlRefPointer<T>::QQmlRefPointer() +QQmlRefPointer<T>::QQmlRefPointer() noexcept : o(nullptr) { } @@ -176,7 +176,7 @@ QQmlRefPointer<T>::QQmlRefPointer(const QQmlRefPointer<T> &other) } template <class T> -QQmlRefPointer<T>::QQmlRefPointer(QQmlRefPointer<T> &&other) +QQmlRefPointer<T>::QQmlRefPointer(QQmlRefPointer<T> &&other) noexcept : o(other.take()) { } @@ -201,7 +201,7 @@ QQmlRefPointer<T> &QQmlRefPointer<T>::operator=(const QQmlRefPointer<T> &other) } template <class T> -QQmlRefPointer<T> &QQmlRefPointer<T>::operator=(QQmlRefPointer<T> &&other) +QQmlRefPointer<T> &QQmlRefPointer<T>::operator=(QQmlRefPointer<T> &&other) noexcept { QQmlRefPointer<T> m(std::move(other)); swap(m); |