Commit 631211f7 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Utils: Fix Guard documentation

Change-Id: I18a23c4410424f3799b9ec5bcacccac742713c63
Reviewed-by: Jaroslaw Kobus's avatarJarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent d6c8a974
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment