diff --git a/src/blackmisc/pixmap.cpp b/src/blackmisc/pixmap.cpp index a4757ea95..54ea1ba37 100644 --- a/src/blackmisc/pixmap.cpp +++ b/src/blackmisc/pixmap.cpp @@ -32,7 +32,7 @@ namespace BlackMisc const QPixmap &CPixmap::pixmap() const { - QWriteLocker(&this->m_lock); + QWriteLocker lock(&this->m_lock); if (this->m_hasCachedPixmap) { return this->m_pixmap; } // this part here becomes relevant when marshalling via DBus is used @@ -47,7 +47,7 @@ namespace BlackMisc bool CPixmap::isNull() const { - QReadLocker(&this->m_lock); + QReadLocker lock(&this->m_lock); if (this->m_hasCachedPixmap) { return false; } return (this->m_array.isEmpty() || this->m_array.isNull()); } diff --git a/src/blackmisc/threadedreader.cpp b/src/blackmisc/threadedreader.cpp index 9524ff021..b0d28f93f 100644 --- a/src/blackmisc/threadedreader.cpp +++ b/src/blackmisc/threadedreader.cpp @@ -18,13 +18,13 @@ namespace BlackMisc QDateTime CThreadedReader::getUpdateTimestamp() const { - QReadLocker(&this->m_lock); + QReadLocker lock(&this->m_lock); return this->m_updateTimestamp; } void CThreadedReader::setUpdateTimestamp(const QDateTime &updateTimestamp) { - QWriteLocker(&this->m_lock); + QWriteLocker lock(&this->m_lock); this->m_updateTimestamp = updateTimestamp; }