diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/library/titleproxy.cpp | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/library/titleproxy.cpp')
-rw-r--r-- | noatun/library/titleproxy.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/noatun/library/titleproxy.cpp b/noatun/library/titleproxy.cpp index ee62863c..bda84b18 100644 --- a/noatun/library/titleproxy.cpp +++ b/noatun/library/titleproxy.cpp @@ -157,11 +157,11 @@ void Proxy::sendRequest() //SLOT "%3" "%4" "\r\n" ) - .arg( m_url.path( -1 ).isEmpty() ? "/" : m_url.path( -1 ) ) - .arg( m_url.host() ) - .arg( m_icyMode ? TQString( "Icy-MetaData:1\r\n" ) : TQString::null ) - .arg( auth ? TQString( "Authorization: Basic " ).append( authString ) : TQString::null ) - .arg( NOATUN_VERSION ); + .tqarg( m_url.path( -1 ).isEmpty() ? "/" : m_url.path( -1 ) ) + .tqarg( m_url.host() ) + .tqarg( m_icyMode ? TQString( "Icy-MetaData:1\r\n" ) : TQString() ) + .tqarg( auth ? TQString( "Authorization: Basic " ).append( authString ) : TQString() ) + .tqarg( NOATUN_VERSION ); m_sockRemote.writeBlock( request.latin1(), request.length() ); @@ -172,9 +172,9 @@ void Proxy::sendRequest() //SLOT void Proxy::readRemote() //SLOT { m_connectSuccess = true; - Q_LONG index = 0; - Q_LONG bytesWrite = 0; - Q_LONG bytesRead = m_sockRemote.readBlock( m_pBuf, BUFSIZE ); + TQ_LONG index = 0; + TQ_LONG bytesWrite = 0; + TQ_LONG bytesRead = m_sockRemote.readBlock( m_pBuf, BUFSIZE ); if ( bytesRead == -1 ) { kdDebug(66666) << k_funcinfo << "Could not read remote data from socket, aborting" << endl; @@ -246,7 +246,7 @@ void Proxy::connectError() //SLOT // PRIVATE ////////////////////////////////////////////////////////////////////////////////////////// -bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) +bool Proxy::processHeader( TQ_LONG &index, TQ_LONG bytesRead ) { while ( index < bytesRead ) { @@ -258,11 +258,11 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) // Handle redirection TQString loc( "Location: " ); - int index = m_headerStr.find( loc ); + int index = m_headerStr.tqfind( loc ); if ( index >= 0 ) { int start = index + loc.length(); - int end = m_headerStr.find( "\n", index ); + int end = m_headerStr.tqfind( "\n", index ); m_url = m_headerStr.mid( start, end - start - 1 ); kdDebug(66666) << k_funcinfo << @@ -304,7 +304,7 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) } } - if ( m_streamUrl.startsWith( "www.", true ) ) + if ( m_streamUrl.tqstartsWith( "www.", true ) ) m_streamUrl.prepend( "http://" ); m_sockProxy.writeBlock( m_headerStr.latin1(), m_headerStr.length() ); @@ -339,8 +339,8 @@ void Proxy::transmitData( const TQString &data ) emit metaData( m_streamName, m_streamGenre, m_streamUrl, m_bitRate, - extractStr(data, TQString::fromLatin1("StreamTitle")), - extractStr(data, TQString::fromLatin1("StreamUrl"))); + extractStr(data, TQString::tqfromLatin1("StreamTitle")), + extractStr(data, TQString::tqfromLatin1("StreamUrl"))); } @@ -360,15 +360,15 @@ void Proxy::error() TQString Proxy::extractStr( const TQString &str, const TQString &key ) { - int index = str.find( key, 0, true ); + int index = str.tqfind( key, 0, true ); if ( index == -1 ) { - return TQString::null; + return TQString(); } else { - index = str.find( "'", index ) + 1; - int indexEnd = str.find( "'", index ); + index = str.tqfind( "'", index ) + 1; + int indexEnd = str.tqfind( "'", index ); return str.mid( index, indexEnd - index ); } } |