summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-04-22 23:54:51 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-04-22 23:54:51 (GMT)
commit478e914638f2131d1547c4e2dc4659723657194d (patch)
treec9f63e6bd79dce411ae059b1bb65a66db6584264 /src/network
parent6b30ee9d2219308605e0d1b15ea1c74dc5cb67fe (diff)
parent4894e6dd57c31e0196c6fdae4d1b2fb16b9f1b16 (diff)
downloadQt-478e914638f2131d1547c4e2dc4659723657194d.zip
Qt-478e914638f2131d1547c4e2dc4659723657194d.tar.gz
Qt-478e914638f2131d1547c4e2dc4659723657194d.tar.bz2
Merge branch '4.7' of ../../qt/4.7 into 4.7
Conflicts: demos/multimedia/player/player.pro
Diffstat (limited to 'src/network')
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp2
-rw-r--r--src/network/kernel/qhostinfo.cpp22
-rw-r--r--src/network/kernel/qhostinfo_p.h3
3 files changed, 21 insertions, 6 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index a651dd1..a7bd2d5 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -381,7 +381,7 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),
this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)));
- QMetaObject::invokeMethod(engine, "requestUpdate");
+ QMetaObject::invokeMethod(engine, "initialize");
}
}
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index baf69e7..7e006e0 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -488,9 +488,23 @@ QHostInfoLookupManager::~QHostInfoLookupManager()
wasDeleted = true;
// don't qDeleteAll currentLookups, the QThreadPool has ownership
- qDeleteAll(postponedLookups);
- qDeleteAll(scheduledLookups);
- qDeleteAll(finishedLookups);
+ clear();
+}
+
+void QHostInfoLookupManager::clear()
+{
+ {
+ QMutexLocker locker(&mutex);
+ qDeleteAll(postponedLookups);
+ qDeleteAll(scheduledLookups);
+ qDeleteAll(finishedLookups);
+ postponedLookups.clear();
+ scheduledLookups.clear();
+ finishedLookups.clear();
+ }
+
+ threadPool.waitForDone();
+ cache.clear();
}
void QHostInfoLookupManager::work()
@@ -636,7 +650,7 @@ void qt_qhostinfo_clear_cache()
{
QHostInfoLookupManager* manager = theHostInfoLookupManager();
if (manager) {
- manager->cache.clear();
+ manager->clear();
}
}
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index 4fc74e9..e11766b 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -116,7 +116,7 @@ public:
// These functions are outside of the QHostInfo class and strictly internal.
// Do NOT use them outside of QAbstractSocket.
QHostInfo Q_NETWORK_EXPORT qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *member, bool *valid, int *id);
-void Q_NETWORK_EXPORT qt_qhostinfo_clear_cache();
+void Q_AUTOTEST_EXPORT qt_qhostinfo_clear_cache();
void Q_AUTOTEST_EXPORT qt_qhostinfo_enable_cache(bool e);
class QHostInfoCache
@@ -161,6 +161,7 @@ public:
QHostInfoLookupManager();
~QHostInfoLookupManager();
+ void clear();
void work();
// called from QHostInfo