summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-09 12:44:53 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-09-09 12:44:53 (GMT)
commite6e61be80973e2fcf9a57c5b6472f913e5846991 (patch)
tree15669cb7a248f5ad7afe337116ffebadeee8a347 /tests/auto/network-settings.h
parent21cf7b4c4317421da4b7ba63473b639e33386ffc (diff)
downloadQt-e6e61be80973e2fcf9a57c5b6472f913e5846991.zip
Qt-e6e61be80973e2fcf9a57c5b6472f913e5846991.tar.gz
Qt-e6e61be80973e2fcf9a57c5b6472f913e5846991.tar.bz2
Added #ifdef Q_OS_SYMBIAN quard for ealier commit d78717e7
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 3a5bed7..059d7b8 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -334,6 +334,7 @@ QByteArray QtNetworkSettings::imapExpectedReplySsl;
class QtNetworkSettingsInitializerCode {
public:
QtNetworkSettingsInitializerCode() {
+#ifdef Q_OS_SYMBIAN
// We have a non-trivial constructor in global static.
// The QtNetworkSettings::serverName() uses native API which assumes
// Cleanup-stack to exist. That's why we create it here and install
@@ -346,9 +347,18 @@ public:
qWarning() << "Please configure the test environment!";
qWarning() << "See /etc/hosts or network-settings.h";
qFatal("Exiting");
- }
- )
+ }
+ )
delete cleanupStack;
+#else
+ QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName());
+ if (testServerResult.error() != QHostInfo::NoError) {
+ qWarning() << "Could not lookup" << QtNetworkSettings::serverName();
+ qWarning() << "Please configure the test environment!";
+ qWarning() << "See /etc/hosts or network-settings.h";
+ qFatal("Exiting");
+ }
+#endif
}
};
QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer;