From 631211f7e24b1c0e993188c0f0ab84913ca77d1c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 22 Oct 2016 20:40:35 +0300 Subject: [PATCH] Utils: Fix Guard documentation Change-Id: I18a23c4410424f3799b9ec5bcacccac742713c63 Reviewed-by: Jarek Kobus Reviewed-by: Leena Miettinen Reviewed-by: Tobias Hunger --- src/libs/utils/guard.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libs/utils/guard.cpp b/src/libs/utils/guard.cpp index 925bdb226f9..69f872db00e 100644 --- a/src/libs/utils/guard.cpp +++ b/src/libs/utils/guard.cpp @@ -54,8 +54,8 @@ void MyClass::updateOtherObject() { - GuardLocker updatelocker(updateGuard); - otherObject->update(); // this may trigger a signal + GuardLocker updatelocker(updateGuard); + otherObject->update(); // this may trigger a signal } \endcode @@ -66,16 +66,16 @@ \code void MyClass::otherObjectUpdated() { - if (updateGuard.isLocked) - return; + if (updateGuard.isLocked()) + return; - // we didn't trigger the update - // so do update now - \dots + // we didn't trigger the update + // so do update now + \dots } \endcode - The GuardLock unlocks the Guard in it's destructor. + The GuardLocker unlocks the Guard in its destructor. The Guard object is recursive, you may declare many GuardLocker objects for the same Guard instance and the Guard will be locked