diff options
author | Timothy Pearson <[email protected]> | 2011-12-19 11:39:49 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-19 11:39:49 -0600 |
commit | bb37c4052a9edfff2196984cef241b1ce2df7bb3 (patch) | |
tree | 20f184005dcb8d5315aec18cb3253c7ff452c8ca /libktorrent/net | |
parent | a90eb215f53c95d81f95b32255098066d90556d9 (diff) | |
download | ktorrent-bb37c4052a9edfff2196984cef241b1ce2df7bb3.tar.gz ktorrent-bb37c4052a9edfff2196984cef241b1ce2df7bb3.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'libktorrent/net')
-rw-r--r-- | libktorrent/net/address.cpp | 8 | ||||
-rw-r--r-- | libktorrent/net/socket.cpp | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/libktorrent/net/address.cpp b/libktorrent/net/address.cpp index e1de8d0..d4877da 100644 --- a/libktorrent/net/address.cpp +++ b/libktorrent/net/address.cpp @@ -58,10 +58,10 @@ namespace net TQString Address::toString() const { return TQString("%1.%2.%3.%4") - .tqarg((m_ip & 0xFF000000) >> 24) - .tqarg((m_ip & 0x00FF0000) >> 16) - .tqarg((m_ip & 0x0000FF00) >> 8) - .tqarg(m_ip & 0x000000FF); + .arg((m_ip & 0xFF000000) >> 24) + .arg((m_ip & 0x00FF0000) >> 16) + .arg((m_ip & 0x0000FF00) >> 8) + .arg(m_ip & 0x000000FF); } } diff --git a/libktorrent/net/socket.cpp b/libktorrent/net/socket.cpp index ff09a34..e1e67ea 100644 --- a/libktorrent/net/socket.cpp +++ b/libktorrent/net/socket.cpp @@ -60,7 +60,7 @@ namespace net int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_NOSIGPIPE,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").tqarg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").arg(strerror(errno)) << endl; } #endif cacheAddress(); @@ -71,14 +71,14 @@ namespace net int fd = socket(PF_INET,tcp ? SOCK_STREAM : SOCK_DGRAM,0); if (fd < 0) { - Out(SYS_GEN|LOG_IMPORTANT) << TQString("Cannot create socket : %1").tqarg(strerror(errno)) << endl; + Out(SYS_GEN|LOG_IMPORTANT) << TQString("Cannot create socket : %1").arg(strerror(errno)) << endl; } m_fd = fd; #if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && !defined(__DragonFly__) && __FreeBSD_version < 600020) int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_NOSIGPIPE,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").tqarg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the NOSIGPIPE option : %1").arg(strerror(errno)) << endl; } #endif } @@ -127,7 +127,7 @@ namespace net else { Out(SYS_CON|LOG_NOTICE) << TQString("Cannot connect to host %1:%2 : %3") - .tqarg(a.toString()).tqarg(a.port()).tqarg(strerror(errno)) << endl; + .arg(a.toString()).arg(a.port()).arg(strerror(errno)) << endl; return false; } } @@ -145,20 +145,20 @@ namespace net if (::bind(m_fd,(struct sockaddr*)&addr,sizeof(struct sockaddr)) < 0) { - Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot bind to port %1 : %2").tqarg(port).tqarg(strerror(errno)) << endl; + Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot bind to port %1 : %2").arg(port).arg(strerror(errno)) << endl; return false; } if (also_listen && listen(m_fd,5) < 0) { - Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot listen to port %1 : %2").tqarg(port).tqarg(strerror(errno)) << endl; + Out(SYS_CON|LOG_IMPORTANT) << TQString("Cannot listen to port %1 : %2").arg(port).arg(strerror(errno)) << endl; return false; } int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_REUSEADDR,&val,sizeof(int)) < 0) { - Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the reuseaddr option : %1").tqarg(strerror(errno)) << endl; + Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set the reuseaddr option : %1").arg(strerror(errno)) << endl; } m_state = BOUND; return true; @@ -272,7 +272,7 @@ namespace net if (setsockopt(m_fd,IPPROTO_IP,IP_TOS,&c,sizeof(c)) < 0) { Out(SYS_CON|LOG_NOTICE) << TQString("Failed to set TOS to %1 : %2") - .tqarg(type_of_service).tqarg(strerror(errno)) << endl; + .arg(type_of_service).arg(strerror(errno)) << endl; return false; } return true; |