QBoolBlocker: make constructor explicit and disable copying

Change-Id: If294eff3f84f837ed554c572527d46a89660de9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2012-03-01 08:33:15 +01:00 committed by Qt by Nokia
parent e759f62124
commit 4908cf2a55
1 changed files with 2 additions and 1 deletions

View File

@ -284,8 +284,9 @@ private:
class QBoolBlocker
{
Q_DISABLE_COPY(QBoolBlocker)
public:
inline QBoolBlocker(bool &b, bool value=true):block(b), reset(b){block = value;}
explicit inline QBoolBlocker(bool &b, bool value=true):block(b), reset(b){block = value;}
inline ~QBoolBlocker(){block = reset; }
private:
bool &block;