Mark the class QPropertyObserverNodeProtector as [[nodiscard]]

And not its constructor, as GCC at least doesn't like that.

Change-Id: I4aada7ca7135dd9c599980640588e7c98d398171
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Lars Knoll 2020-10-13 10:25:21 +02:00
parent d5c53554e5
commit 3e08154582

View File

@ -454,7 +454,7 @@ void QPropertyObserverPointer::setBindingToMarkDirty(QPropertyBindingPrivate *bi
for QPropertyObserverPointer::notify (described ibidem)
*/
template <QPropertyObserver::ObserverTag tag>
struct QPropertyObserverNodeProtector {
struct [[nodiscard]] QPropertyObserverNodeProtector {
QPropertyObserver m_placeHolder;
QPropertyObserver *&m_observer;
union {