From 602a186cb4fe673edd394682b822cec0ca85d0d3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 30 Dec 2021 10:51:49 +0100 Subject: [PATCH] QScopedValueRollback: explicitly disable move semantics For RAII objects, it's natural to have move semantics enabled these days. So if a RAII type does _not_ offer it (and, as in this case, cannot be made to offer it), be explicit and disable moves, too. Change-Id: I5636a0c7ff2fc51982ce9a406f975b07d51af01a Reviewed-by: Giuseppe D'Angelo --- src/corelib/tools/qscopedvaluerollback.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qscopedvaluerollback.h b/src/corelib/tools/qscopedvaluerollback.h index 9b14308ec2c..f8989cce7f3 100644 --- a/src/corelib/tools/qscopedvaluerollback.h +++ b/src/corelib/tools/qscopedvaluerollback.h @@ -75,7 +75,7 @@ private: T &varRef; T oldValue; - Q_DISABLE_COPY(QScopedValueRollback) + Q_DISABLE_COPY_MOVE(QScopedValueRollback) }; QT_END_NAMESPACE