summaryrefslogtreecommitdiffstats
path: root/tests/auto/networkselftest
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-10-28 08:45:04 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-10-28 08:45:04 (GMT)
commit1ec19ed5a69b8b0e11c81037c270072736f48e40 (patch)
tree869800a523b46e527d04c9973f36e294dd101978 /tests/auto/networkselftest
parent0444453661df0f56fd034778028c7abdc0b621cc (diff)
parent1583d643285641bf71e6a107331d788acca9850c (diff)
downloadQt-1ec19ed5a69b8b0e11c81037c270072736f48e40.zip
Qt-1ec19ed5a69b8b0e11c81037c270072736f48e40.tar.gz
Qt-1ec19ed5a69b8b0e11c81037c270072736f48e40.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-WM_NULL-driven
Diffstat (limited to 'tests/auto/networkselftest')
-rw-r--r--tests/auto/networkselftest/tst_networkselftest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp
index d58402b..a09d998 100644
--- a/tests/auto/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/networkselftest/tst_networkselftest.cpp
@@ -333,6 +333,11 @@ QHostAddress tst_NetworkSelfTest::serverIpAddress()
if (cachedIpAddress.protocol() == QAbstractSocket::UnknownNetworkLayerProtocol) {
// need resolving
QHostInfo resolved = QHostInfo::fromName(QtNetworkSettings::serverName());
+ if(resolved.error() != QHostInfo::NoError ||
+ !resolved.addresses().isEmpty()) {
+ qWarning("QHostInfo::fromName failed (%d).", resolved.error());
+ return QHostAddress(QHostAddress::Null);
+ }
cachedIpAddress = resolved.addresses().first();
}
return cachedIpAddress;