diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-10-22 20:40:35 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-10-24 16:23:15 +0000 |
commit | 631211f7e24b1c0e993188c0f0ab84913ca77d1c (patch) | |
tree | a53c40a90768b8573e4813e5fee319b67093c396 /src/libs/utils/guard.cpp | |
parent | d6c8a974296acb7fe083380ee1a409569bb653ac (diff) |
Utils: Fix Guard documentation
Change-Id: I18a23c4410424f3799b9ec5bcacccac742713c63
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/utils/guard.cpp')
-rw-r--r-- | src/libs/utils/guard.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/utils/guard.cpp b/src/libs/utils/guard.cpp index 925bdb226f..69f872db00 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 |