mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
restart timer in QHostInfoCache::put() instead of recreating it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
01f49cca22
commit
61f4bb5e9f
1 changed files with 1 additions and 2 deletions
|
@ -427,8 +427,7 @@ void QHostInfoCache::put(const QString &name, const QHostInfo &info)
|
||||||
|
|
||||||
QHostInfoCacheElement* element = new QHostInfoCacheElement();
|
QHostInfoCacheElement* element = new QHostInfoCacheElement();
|
||||||
element->info = info;
|
element->info = info;
|
||||||
element->age = QElapsedTimer();
|
element->age.restart();
|
||||||
element->age.start();
|
|
||||||
|
|
||||||
QMutexLocker locker(&this->mutex);
|
QMutexLocker locker(&this->mutex);
|
||||||
cache.insert(name, element); // cache will take ownership
|
cache.insert(name, element); // cache will take ownership
|
||||||
|
|
Loading…
Add table
Reference in a new issue