summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:27:50 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:31:07 (GMT)
commitf390f9b51cf8686e9ed44f13a33c7349b9e96a09 (patch)
tree162c768769713a7215bca64daf8f2bdc75c9fbee /src/network/socket
parent0bb0699d403b7541472a72a4057ecf0ca366a7cd (diff)
downloadQt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.zip
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.gz
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.bz2
improved string operations all over the place
used character operations whenever possible better usage of QLatin1String
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qabstractsocket.cpp6
-rw-r--r--src/network/socket/qlocalsocket.cpp4
-rw-r--r--src/network/socket/qsocks5socketengine.cpp14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 4bb12e6..2d37e2e 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -852,7 +852,7 @@ void QAbstractSocketPrivate::_q_startConnecting(const QHostInfo &hostInfo)
if (i != 0) s += ", ";
s += addresses.at(i).toString();
}
- s += "}";
+ s += '}';
qDebug("QAbstractSocketPrivate::_q_startConnecting(hostInfo == %s)", s.toLatin1().constData());
#endif
@@ -2596,7 +2596,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketError er
debug << "QAbstractSocket::ProxyProtocolError";
break;
default:
- debug << "QAbstractSocket::SocketError(" << int(error) << ")";
+ debug << "QAbstractSocket::SocketError(" << int(error) << ')';
break;
}
return debug;
@@ -2627,7 +2627,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketState st
debug << "QAbstractSocket::ClosingState";
break;
default:
- debug << "QAbstractSocket::SocketState(" << int(state) << ")";
+ debug << "QAbstractSocket::SocketState(" << int(state) << ')';
break;
}
return debug;
diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp
index 327bfc6..9411130 100644
--- a/src/network/socket/qlocalsocket.cpp
+++ b/src/network/socket/qlocalsocket.cpp
@@ -468,7 +468,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketError error)
debug << "QLocalSocket::UnknownSocketError";
break;
default:
- debug << "QLocalSocket::SocketError(" << int(error) << ")";
+ debug << "QLocalSocket::SocketError(" << int(error) << ')';
break;
}
return debug;
@@ -490,7 +490,7 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketState state)
debug << "QLocalSocket::ClosingState";
break;
default:
- debug << "QLocalSocket::SocketState(" << int(state) << ")";
+ debug << "QLocalSocket::SocketState(" << int(state) << ')';
break;
}
return debug;
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp
index c41e32d..40d86ac 100644
--- a/src/network/socket/qsocks5socketengine.cpp
+++ b/src/network/socket/qsocks5socketengine.cpp
@@ -153,7 +153,7 @@ static inline QString dump(const QByteArray &) { return QString(); }
*/
static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, quint16 port, QByteArray *pBuf)
{
- QSOCKS5_DEBUG << "setting [" << address << ":" << port << "]";
+ QSOCKS5_DEBUG << "setting [" << address << ':' << port << ']';
union {
quint16 port;
@@ -186,7 +186,7 @@ static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, qui
*/
static bool qt_socks5_set_host_name_and_port(const QString &hostname, quint16 port, QByteArray *pBuf)
{
- QSOCKS5_DEBUG << "setting [" << hostname << ":" << port << "]";
+ QSOCKS5_DEBUG << "setting [" << hostname << ':' << port << ']';
QByteArray encodedHostName = QUrl::toAce(hostname);
QByteArray &buf = *pBuf;
@@ -265,7 +265,7 @@ static bool qt_socks5_get_host_address_and_port(const QByteArray &buf, QHostAddr
}
if (ret) {
- QSOCKS5_DEBUG << "got [" << address << ":" << port << "]";
+ QSOCKS5_DEBUG << "got [" << address << ':' << port << ']';
*pAddress = address;
*pPort = port;
*pPos = pos;
@@ -1124,7 +1124,7 @@ bool QSocks5SocketEngine::connectInternal()
bool QSocks5SocketEngine::connectToHost(const QHostAddress &address, quint16 port)
{
Q_D(QSocks5SocketEngine);
- QSOCKS5_DEBUG << "connectToHost" << address << ":" << port;
+ QSOCKS5_DEBUG << "connectToHost" << address << ':' << port;
setPeerAddress(address);
setPeerPort(port);
@@ -1379,7 +1379,7 @@ bool QSocks5SocketEngine::bind(const QHostAddress &address, quint16 port)
//### reset and error
return false;
}
- QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ":" << d->localPort;
+ QSOCKS5_DEBUG << "udp actual address and port" << d->localAddress << ':' << d->localPort;
return true;
#endif // QT_NO_UDPSOCKET
}
@@ -1478,7 +1478,7 @@ qint64 QSocks5SocketEngine::bytesAvailable() const
qint64 QSocks5SocketEngine::read(char *data, qint64 maxlen)
{
Q_D(QSocks5SocketEngine);
- QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ")";
+ QSOCKS5_Q_DEBUG << "read( , maxlen = " << maxlen << ')';
if (d->mode == QSocks5SocketEnginePrivate::ConnectMode) {
if (d->connectData->readBuffer.size() == 0) {
if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState) {
@@ -1766,7 +1766,7 @@ void QSocks5SocketEngine::setReadNotificationEnabled(bool enable)
{
Q_D(QSocks5SocketEngine);
- QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ")";
+ QSOCKS5_Q_DEBUG << "setReadNotificationEnabled(" << enable << ')';
bool emitSignal = false;
if (!d->readNotificationEnabled