summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-29 09:34:37 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-29 09:34:37 (GMT)
commit2f5a5804fb42a4c956f366d002a94076d6623a45 (patch)
treecf78d26f0c804d3d26c723784629440453c26246 /src/network
parentffe49ed60c9ee778b9999ee4145b44851b053f9f (diff)
parentf425c08d4f2e7f061a0ee8e4a1eee2b17fa64962 (diff)
downloadQt-2f5a5804fb42a4c956f366d002a94076d6623a45.zip
Qt-2f5a5804fb42a4c956f366d002a94076d6623a45.tar.gz
Qt-2f5a5804fb42a4c956f366d002a94076d6623a45.tar.bz2
Merge branch '4.6' into core-4.6
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qnativesocketengine.cpp52
-rw-r--r--src/network/ssl/qsslerror.cpp57
2 files changed, 54 insertions, 55 deletions
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index a150b26..ecf5ad9 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -194,82 +194,82 @@ void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, Er
switch (errorString) {
case NonBlockingInitFailedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unable to initialize non-blocking socket"));
+ socketErrorString = QNativeSocketEngine::tr("Unable to initialize non-blocking socket");
break;
case BroadcastingInitFailedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unable to initialize broadcast socket"));
+ socketErrorString = QNativeSocketEngine::tr("Unable to initialize broadcast socket");
break;
case NoIpV6ErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Attempt to use IPv6 socket on a platform with no IPv6 support"));
+ socketErrorString = QNativeSocketEngine::tr("Attempt to use IPv6 socket on a platform with no IPv6 support");
break;
case RemoteHostClosedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "The remote host closed the connection"));
+ socketErrorString = QNativeSocketEngine::tr("The remote host closed the connection");
break;
case TimeOutErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Network operation timed out"));
+ socketErrorString = QNativeSocketEngine::tr("Network operation timed out");
break;
case ResourceErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Out of resources"));
+ socketErrorString = QNativeSocketEngine::tr("Out of resources");
break;
case OperationUnsupportedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unsupported socket operation"));
+ socketErrorString = QNativeSocketEngine::tr("Unsupported socket operation");
break;
case ProtocolUnsupportedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Protocol type not supported"));
+ socketErrorString = QNativeSocketEngine::tr("Protocol type not supported");
break;
case InvalidSocketErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Invalid socket descriptor"));
+ socketErrorString = QNativeSocketEngine::tr("Invalid socket descriptor");
break;
case HostUnreachableErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Host unreachable"));
+ socketErrorString = QNativeSocketEngine::tr("Host unreachable");
break;
case NetworkUnreachableErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Network unreachable"));
+ socketErrorString = QNativeSocketEngine::tr("Network unreachable");
break;
case AccessErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Permission denied"));
+ socketErrorString = QNativeSocketEngine::tr("Permission denied");
break;
case ConnectionTimeOutErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Connection timed out"));
+ socketErrorString = QNativeSocketEngine::tr("Connection timed out");
break;
case ConnectionRefusedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Connection refused"));
+ socketErrorString = QNativeSocketEngine::tr("Connection refused");
break;
case AddressInuseErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "The bound address is already in use"));
+ socketErrorString = QNativeSocketEngine::tr("The bound address is already in use");
break;
case AddressNotAvailableErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "The address is not available"));
+ socketErrorString = QNativeSocketEngine::tr("The address is not available");
break;
case AddressProtectedErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "The address is protected"));
+ socketErrorString = QNativeSocketEngine::tr("The address is protected");
break;
case DatagramTooLargeErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Datagram was too large to send"));
+ socketErrorString = QNativeSocketEngine::tr("Datagram was too large to send");
break;
case SendDatagramErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unable to send a message"));
+ socketErrorString = QNativeSocketEngine::tr("Unable to send a message");
break;
case ReceiveDatagramErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unable to receive a message"));
+ socketErrorString = QNativeSocketEngine::tr("Unable to receive a message");
break;
case WriteErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unable to write"));
+ socketErrorString = QNativeSocketEngine::tr("Unable to write");
break;
case ReadErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Network error"));
+ socketErrorString = QNativeSocketEngine::tr("Network error");
break;
case PortInuseErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Another socket is already listening on the same port"));
+ socketErrorString = QNativeSocketEngine::tr("Another socket is already listening on the same port");
break;
case NotSocketErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Operation on non-socket"));
+ socketErrorString = QNativeSocketEngine::tr("Operation on non-socket");
break;
case InvalidProxyTypeString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "The proxy type is invalid for this operation"));
+ socketErrorString = QNativeSocketEngine::tr("The proxy type is invalid for this operation");
break;
case UnknownSocketErrorString:
- socketErrorString = QLatin1String(QT_TRANSLATE_NOOP("QNativeSocketEngine", "Unknown error"));
+ socketErrorString = QNativeSocketEngine::tr("Unknown error");
break;
}
}
diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp
index 62fcd4c..4bb58b1 100644
--- a/src/network/ssl/qsslerror.cpp
+++ b/src/network/ssl/qsslerror.cpp
@@ -91,6 +91,7 @@
*/
#include "qsslerror.h"
+#include "qsslsocket.h"
#ifndef QT_NO_DEBUG_STREAM
#include <QtCore/qdebug.h>
@@ -209,81 +210,79 @@ QString QSslError::errorString() const
QString errStr;
switch (d->error) {
case NoError:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "No error"));
+ errStr = QSslSocket::tr("No error");
break;
case UnableToGetIssuerCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The issuer certificate could not be found"));
+ errStr = QSslSocket::tr("The issuer certificate could not be found");
break;
case UnableToDecryptCertificateSignature:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate signature could not be decrypted"));
+ errStr = QSslSocket::tr("The certificate signature could not be decrypted");
break;
case UnableToDecodeIssuerPublicKey:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The public key in the certificate could not be read"));
+ errStr = QSslSocket::tr("The public key in the certificate could not be read");
break;
case CertificateSignatureFailed:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The signature of the certificate is invalid"));
+ errStr = QSslSocket::tr("The signature of the certificate is invalid");
break;
case CertificateNotYetValid:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate is not yet valid"));
+ errStr = QSslSocket::tr("The certificate is not yet valid");
break;
case CertificateExpired:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate has expired"));
+ errStr = QSslSocket::tr("The certificate has expired");
break;
case InvalidNotBeforeField:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate's notBefore field contains an invalid time"));
+ errStr = QSslSocket::tr("The certificate's notBefore field contains an invalid time");
break;
case InvalidNotAfterField:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate's notAfter field contains an invalid time"));
+ errStr = QSslSocket::tr("The certificate's notAfter field contains an invalid time");
break;
case SelfSignedCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The certificate is self-signed, and untrusted"));
+ errStr = QSslSocket::tr("The certificate is self-signed, and untrusted");
break;
case SelfSignedCertificateInChain:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The root certificate of the certificate chain is self-signed, and untrusted"));
+ errStr = QSslSocket::tr("The root certificate of the certificate chain is self-signed, and untrusted");
break;
case UnableToGetLocalIssuerCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The issuer certificate of a locally looked up certificate could not be found"));
+ errStr = QSslSocket::tr("The issuer certificate of a locally looked up certificate could not be found");
break;
case UnableToVerifyFirstCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "No certificates could be verified"));
+ errStr = QSslSocket::tr("No certificates could be verified");
break;
case InvalidCaCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "One of the CA certificates is invalid"));
+ errStr = QSslSocket::tr("One of the CA certificates is invalid");
break;
case PathLengthExceeded:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The basicConstraints pathlength parameter has been exceeded"));
+ errStr = QSslSocket::tr("The basicConstraints pathlength parameter has been exceeded");
break;
case InvalidPurpose:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The supplied certificate is unsuited for this purpose"));
+ errStr = QSslSocket::tr("The supplied certificate is unsuited for this purpose");
break;
case CertificateUntrusted:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The root CA certificate is not trusted for this purpose"));
+ errStr = QSslSocket::tr("The root CA certificate is not trusted for this purpose");
break;
case CertificateRejected:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The root CA certificate is marked to reject the specified purpose"));
+ errStr = QSslSocket::tr("The root CA certificate is marked to reject the specified purpose");
break;
case SubjectIssuerMismatch: // hostname mismatch
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError,
- "The current candidate issuer certificate was rejected because its"
- " subject name did not match the issuer name of the current certificate"));
+ errStr = QSslSocket::tr("The current candidate issuer certificate was rejected because its"
+ " subject name did not match the issuer name of the current certificate");
break;
case AuthorityIssuerSerialNumberMismatch:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The current candidate issuer certificate was rejected because"
- " its issuer name and serial number was present and did not match the"
- " authority key identifier of the current certificate"));
+ errStr = QSslSocket::tr("The current candidate issuer certificate was rejected because"
+ " its issuer name and serial number was present and did not match the"
+ " authority key identifier of the current certificate");
break;
case NoPeerCertificate:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "The peer did not present any certificate"));
+ errStr = QSslSocket::tr("The peer did not present any certificate");
break;
case HostNameMismatch:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError,
- "The host name did not match any of the valid hosts"
- " for this certificate"));
+ errStr = QSslSocket::tr("The host name did not match any of the valid hosts"
+ " for this certificate");
break;
case NoSslSupport:
break;
default:
- errStr = QObject::tr(QT_TRANSLATE_NOOP(QSslError, "Unknown error"));
+ errStr = QSslSocket::tr("Unknown error");
break;
}