diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-06-22 22:14:31 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-06-23 21:54:31 +0000 |
commit | e79e850c28b18a21ed1a0e05d5c888337901c5e7 (patch) | |
tree | 6038ffbc9b6bd18d0e3bc5422f7836b4d9a0c9b6 /src/qml/qml/ftw | |
parent | 018d26955fe8d9fb74c3f8225b56751b3fe6a384 (diff) |
QQmlRefPointer: mark ctors as [[nodiscard]]
This is a smart pointer class for which QUIP-0019 demands all ctors to be marked as [[nodiscard]].
As a drive-by, remove unneeded <T> adornments.
Task-number: QTBUG-104168
Pick-to: 6.6
Change-Id: Ib6bc30f9c4dc1fb824e52515278d0e8d922527ab
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r-- | src/qml/qml/ftw/qqmlrefcount_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/ftw/qqmlrefcount_p.h b/src/qml/qml/ftw/qqmlrefcount_p.h index 8b4b5b1535..7a6371af34 100644 --- a/src/qml/qml/ftw/qqmlrefcount_p.h +++ b/src/qml/qml/ftw/qqmlrefcount_p.h @@ -46,10 +46,10 @@ public: AddRef, Adopt }; - inline QQmlRefPointer(); - inline QQmlRefPointer(T *, Mode m = AddRef); - inline QQmlRefPointer(const QQmlRefPointer<T> &); - inline QQmlRefPointer(QQmlRefPointer<T> &&); + Q_NODISCARD_CTOR inline QQmlRefPointer(); + Q_NODISCARD_CTOR inline QQmlRefPointer(T *, Mode m = AddRef); + Q_NODISCARD_CTOR inline QQmlRefPointer(const QQmlRefPointer &); + Q_NODISCARD_CTOR inline QQmlRefPointer(QQmlRefPointer &&); inline ~QQmlRefPointer(); void swap(QQmlRefPointer &other) noexcept { qt_ptr_swap(o, other.o); } |