summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 5b671bf..7204b27 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -39,6 +39,7 @@
**
****************************************************************************/
#include <QString>
+#include <QtNetwork/QHostInfo>
#ifdef Q_OS_SYMBIAN
#include <sys/socket.h>
@@ -307,6 +308,13 @@ private:
}
#endif
+#ifdef QT_NETWORK_LIB
+ static QHostAddress serverIP()
+ {
+ return QHostInfo::fromName(serverName()).addresses().first();
+ }
+#endif
+
};
#ifdef Q_OS_SYMBIAN
QHash<QString, QtNetworkSettingsRecord* > QtNetworkSettings::entries = QHash<QString, QtNetworkSettingsRecord* > ();