diff options
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index a9a80054f4..68752660ba 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -724,8 +724,7 @@ QHostInfo QHostInfoCache::get(const QString &name, bool *valid) QMutexLocker locker(&this->mutex); *valid = false; - if (cache.contains(name)) { - QHostInfoCacheElement *element = cache.object(name); + if (QHostInfoCacheElement *element = cache.object(name)) { if (element->age.elapsed() < max_age*1000) *valid = true; return element->info; |