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 <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
91e210137c
commit
602a186cb4
@ -75,7 +75,7 @@ private:
|
|||||||
T &varRef;
|
T &varRef;
|
||||||
T oldValue;
|
T oldValue;
|
||||||
|
|
||||||
Q_DISABLE_COPY(QScopedValueRollback)
|
Q_DISABLE_COPY_MOVE(QScopedValueRollback)
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
Reference in New Issue
Block a user