mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kunitconversion: use scoped lock in KUnitConversion::Currency::convert()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
63ed5b9f3c
commit
221e195882
1 changed files with 2 additions and 2 deletions
|
@ -529,7 +529,7 @@ Value Currency::convert(const Value& value, UnitPtr to)
|
|||
{
|
||||
static QMutex mutex;
|
||||
|
||||
mutex.lock();
|
||||
QMutexLocker lock(&mutex);
|
||||
QFileInfo info(m_cache);
|
||||
if (!info.exists() || info.lastModified().secsTo(QDateTime::currentDateTime()) > 86400) {
|
||||
#ifndef KUNITCONVERSION_NO_SOLID
|
||||
|
@ -568,7 +568,7 @@ Value Currency::convert(const Value& value, UnitPtr to)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
mutex.unlock();
|
||||
lock.unlock();
|
||||
|
||||
if (m_update) {
|
||||
QFile file(m_cache);
|
||||
|
|
Loading…
Add table
Reference in a new issue