QFutureSynchronizer: mark ctors [[nodiscard]]
QFutureSynchronizer is a RAII class. QUIP-0019 says that RAII class ctors should be marked as [[nodiscard]]. Pick-to: 6.6 Task-number: QTBUG-104164 Change-Id: I0b6710f2b9a14d67f64150f240f819b8336e0929 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
e8dcbaaaf6
commit
f403ef428e
@ -17,7 +17,8 @@ class QFutureSynchronizer
|
||||
Q_DISABLE_COPY(QFutureSynchronizer)
|
||||
|
||||
public:
|
||||
QFutureSynchronizer() : m_cancelOnWait(false) { }
|
||||
Q_NODISCARD_CTOR QFutureSynchronizer() : m_cancelOnWait(false) { }
|
||||
Q_NODISCARD_CTOR
|
||||
explicit QFutureSynchronizer(QFuture<T> future)
|
||||
: m_cancelOnWait(false)
|
||||
{ addFuture(std::move(future)); }
|
||||
|
Loading…
Reference in New Issue
Block a user