diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-28 08:45:04 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-28 08:45:04 (GMT) |
commit | 1ec19ed5a69b8b0e11c81037c270072736f48e40 (patch) | |
tree | 869800a523b46e527d04c9973f36e294dd101978 /tests/auto/networkselftest | |
parent | 0444453661df0f56fd034778028c7abdc0b621cc (diff) | |
parent | 1583d643285641bf71e6a107331d788acca9850c (diff) | |
download | Qt-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.cpp | 5 |
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; |