QMac{,RootLevel}AutoReleasePool: mark ctors [[nodiscard]]
They're RAII classes, and QUIP-0019 says RAII class' constructors should be marked [[nodiscard]]. Pick-to: 6.6 Task-number: QTBUG-104164 Change-Id: I0080f5b6a3cea346c0860e00958a8c204849040e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
2a76cf8181
commit
ffed431293
@ -112,7 +112,7 @@ protected:
|
||||
class QMacAutoReleasePool
|
||||
{
|
||||
public:
|
||||
Q_CORE_EXPORT QMacAutoReleasePool();
|
||||
Q_NODISCARD_CTOR Q_CORE_EXPORT QMacAutoReleasePool();
|
||||
Q_CORE_EXPORT ~QMacAutoReleasePool();
|
||||
private:
|
||||
Q_DISABLE_COPY(QMacAutoReleasePool)
|
||||
@ -123,7 +123,7 @@ private:
|
||||
class QMacRootLevelAutoReleasePool
|
||||
{
|
||||
public:
|
||||
QMacRootLevelAutoReleasePool();
|
||||
Q_NODISCARD_CTOR QMacRootLevelAutoReleasePool();
|
||||
~QMacRootLevelAutoReleasePool();
|
||||
private:
|
||||
QScopedPointer<QMacAutoReleasePool> pool;
|
||||
|
Loading…
x
Reference in New Issue
Block a user