qt5base-lts/tests/auto/corelib/tools/qscopedvaluerollback
Richard Moe Gustavsen 77982c4823 qscopedvaluerollback: add convenience constructor
It's a common need to assign a variable to something when entering a
code block, and then revert it upon exit. qscopedvaluerollback can
be used for this. But as a convenience, this patch adds an
extra constructor so that you can "protect" and set a variable
in one go instead of using two lines.

Change-Id: If4b89d3a5ba32ef2304bda058b1b6050932612ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-21 02:15:10 +02:00
..
qscopedvaluerollback.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qscopedvaluerollback.cpp qscopedvaluerollback: add convenience constructor 2014-05-21 02:15:10 +02:00