diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-24 14:43:12 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-24 14:43:12 (GMT) |
commit | 4b344fd9f4eec8cb4271f38e8dfdc88905375e66 (patch) | |
tree | 6b9cbdf514802248d065f6697e956c33f41c618b /src/network | |
parent | 3dd48b423b3651e296d845cf734347bfb48d3137 (diff) | |
download | Qt-4b344fd9f4eec8cb4271f38e8dfdc88905375e66.zip Qt-4b344fd9f4eec8cb4271f38e8dfdc88905375e66.tar.gz Qt-4b344fd9f4eec8cb4271f38e8dfdc88905375e66.tar.bz2 |
Remove QObject::tr() in the network module code.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkaccessdatabackend.cpp | 7 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessdebugpipebackend.cpp | 4 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 2 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 2 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_unix.cpp | 4 |
5 files changed, 12 insertions, 7 deletions
diff --git a/src/network/access/qnetworkaccessdatabackend.cpp b/src/network/access/qnetworkaccessdatabackend.cpp index a2e7ef5..efb6e3e 100644 --- a/src/network/access/qnetworkaccessdatabackend.cpp +++ b/src/network/access/qnetworkaccessdatabackend.cpp @@ -44,6 +44,7 @@ #include "qnetworkreply.h" #include "qurlinfo.h" #include "private/qdataurl_p.h" +#include <qcoreapplication.h> QT_BEGIN_NAMESPACE @@ -72,7 +73,8 @@ void QNetworkAccessDataBackend::open() if (operation() != QNetworkAccessManager::GetOperation && operation() != QNetworkAccessManager::HeadOperation) { // data: doesn't support anything but GET - QString msg = QObject::tr("Operation not supported on %1") + const QString msg = QCoreApplication::translate("QNetworkAccessDataBackend", + "Operation not supported on %1") .arg(uri.toString()); error(QNetworkReply::ContentOperationNotPermittedError, msg); finished(); @@ -96,7 +98,8 @@ void QNetworkAccessDataBackend::open() } // something wrong with this URI - QString msg = QObject::tr("Invalid URI: %1").arg(uri.toString()); + const QString msg = QCoreApplication::translate("QNetworkAccessDataBackend", + "Invalid URI: %1").arg(uri.toString()); error(QNetworkReply::ProtocolFailure, msg); finished(); } diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp index 5926d0b..cd077e7 100644 --- a/src/network/access/qnetworkaccessdebugpipebackend.cpp +++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp @@ -252,7 +252,7 @@ void QNetworkAccessDebugPipeBackend::socketError() break; } - error(code, QObject::tr("Socket error on %1: %2") + error(code, QNetworkAccessDebugPipeBackend::tr("Socket error on %1: %2") .arg(url().toString(), socket.errorString())); finished(); disconnect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected())); @@ -267,7 +267,7 @@ void QNetworkAccessDebugPipeBackend::socketDisconnected() // normal close } else { // abnormal close - QString msg = QObject::tr("Remote host closed the connection prematurely on %1") + QString msg = QNetworkAccessDebugPipeBackend::tr("Remote host closed the connection prematurely on %1") .arg(url().toString()); error(QNetworkReply::RemoteHostClosedError, msg); finished(); diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 2175686..b201380 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -565,7 +565,7 @@ void QNetworkReplyImplPrivate::finished() } } else { error(QNetworkReply::TemporaryNetworkFailureError, - q->tr("Temporary network failure.")); + QNetworkReply::tr("Temporary network failure.")); } } } diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 9de499e..93f6d13 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -165,7 +165,7 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver, if (name.isEmpty()) { QHostInfo hostInfo(id); hostInfo.setError(QHostInfo::HostNotFound); - hostInfo.setErrorString(QObject::tr("No host name given")); + hostInfo.setErrorString(QCoreApplication::translate("QHostInfo", "No host name given")); QScopedPointer<QHostInfoResult> result(new QHostInfoResult); QObject::connect(result.data(), SIGNAL(resultsReady(QHostInfo)), receiver, member, Qt::QueuedConnection); diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index be06b6e..a186e78 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -193,7 +193,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) results.setHostName(hostName); if (aceHostname.isEmpty()) { results.setError(QHostInfo::HostNotFound); - results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname")); + results.setErrorString(hostName.isEmpty() ? + QCoreApplication::translate("QHostInfoAgent", "No host name given") : + QCoreApplication::translate("QHostInfoAgent", "Invalid hostname")); return results; } |