diff options
author | Robert Griebl <rgriebl@trolltech.com> | 2009-06-10 11:46:23 (GMT) |
---|---|---|
committer | Robert Griebl <rgriebl@trolltech.com> | 2009-06-10 11:46:23 (GMT) |
commit | 7604f8087f88171ef933d8ae08f501467e647338 (patch) | |
tree | 51d071f462ed48d0b25884d9f62b8ba11c5dff13 /tests/auto/network-settings.h | |
parent | 8c265860b41214daade7c8a28237c1e07ea71a3c (diff) | |
download | Qt-7604f8087f88171ef933d8ae08f501467e647338.zip Qt-7604f8087f88171ef933d8ae08f501467e647338.tar.gz Qt-7604f8087f88171ef933d8ae08f501467e647338.tar.bz2 |
Make Qt exception safer.
Squashed commit of the branch haralds-haralds-qt-s60-topics/topic/exceptions,
which also contains the full history.
Rev-By: Harald Fernengel
Rev-By: Ralf Engels
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r-- | tests/auto/network-settings.h | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 22d8886..0924c57 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -59,27 +59,28 @@ // network tests. WINPCAP connectivity uses Symbian OS IP stack, // correspondingly as HW does. When using WINPCAP disable this define //#define SYMBIAN_WINSOCK_CONNECTIVITY -#endif - class QtNetworkSettingsRecord { - public: - QtNetworkSettingsRecord() { } +class QtNetworkSettingsRecord { +public: + QtNetworkSettingsRecord() { } + + QtNetworkSettingsRecord(const QString& recName, const QString& recVal) + : strRecordName(recName), strRecordValue(recVal) { } - QtNetworkSettingsRecord(const QString& recName, const QString& recVal) - : strRecordName(recName), strRecordValue(recVal) { } + QtNetworkSettingsRecord(const QtNetworkSettingsRecord & other) + : strRecordName(other.strRecordName), strRecordValue(other.strRecordValue) { } - QtNetworkSettingsRecord(const QtNetworkSettingsRecord & other) - : strRecordName(other.strRecordName), strRecordValue(other.strRecordValue) { } + ~QtNetworkSettingsRecord() { } - ~QtNetworkSettingsRecord() { } + const QString& recordName() const { return strRecordName; } + const QString& recordValue() const { return strRecordValue; } - const QString& recordName() const { return strRecordName; } - const QString& recordValue() const { return strRecordValue; } +private: + QString strRecordName; + QString strRecordValue; +}; - private: - QString strRecordName; - QString strRecordValue; - }; +#endif class QtNetworkSettings { @@ -171,6 +172,7 @@ public: static QByteArray expectedReplySSL() { +#ifdef Q_OS_SYMBIAN loadTestSettings(); if(QtNetworkSettings::entries.contains("imap.expectedreplyssl")) { @@ -180,12 +182,12 @@ public: imapExpectedReplySsl.append('\r').append('\n'); } return imapExpectedReplySsl.data(); - } else { - QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ); - expected = expected.append(QtNetworkSettings::serverLocalName().toAscii()); - expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); - return expected; } +#endif + QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ); + expected = expected.append(QtNetworkSettings::serverLocalName().toAscii()); + expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + return expected; } static QByteArray expectedReplyFtp() |