diff options
-rw-r--r-- | doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp index f0f4935..dd4f533 100644 --- a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp +++ b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp @@ -38,9 +38,9 @@ QReadWriteLock lock; QByteArray readData() { - locker.lockForRead(); + lock.lockForRead(); ... - locker.unlock(); + lock.unlock(); return data; } //! [2] @@ -62,8 +62,8 @@ QReadWriteLock lock; void writeData(const QByteArray &data) { - locker.lockForWrite(); + lock.lockForWrite(); ... - locker.unlock(); + lock.unlock(); } //! [4] |