From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/irc/libkirc/ksslsocket.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'kopete/protocols/irc/libkirc/ksslsocket.cpp') diff --git a/kopete/protocols/irc/libkirc/ksslsocket.cpp b/kopete/protocols/irc/libkirc/ksslsocket.cpp index afe78fed..f14f1a3e 100644 --- a/kopete/protocols/irc/libkirc/ksslsocket.cpp +++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp @@ -73,10 +73,10 @@ KSSLSocket::~KSSLSocket() delete d; } -Q_LONG KSSLSocket::readBlock( char* data, Q_ULONG maxLen ) +TQ_LONG KSSLSocket::readBlock( char* data, TQ_ULONG maxLen ) { //Re-implemented because KExtSocket doesn't use this when not in buffered mode - Q_LONG retval = consumeReadBuffer(maxLen, data); + TQ_LONG retval = consumeReadBuffer(maxLen, data); if( retval == 0 ) { @@ -101,12 +101,16 @@ int KSSLSocket::peekBlock( char* data, uint maxLen ) return consumeReadBuffer(maxLen, data, false); } -Q_LONG KSSLSocket::writeBlock( const char* data, Q_ULONG len ) +TQ_LONG KSSLSocket::writeBlock( const char* data, TQ_ULONG len ) { return d->kssl->write( data, len ); } +#ifdef USE_QT4 +qint64 KSSLSocket::bytesAvailable() const +#else // USE_QT4 int KSSLSocket::bytesAvailable() const +#endif // USE_QT4 { if( socketStatus() < connected ) return -2; @@ -202,14 +206,14 @@ void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data ) bool KSSLSocket::hasMetaData( const TQString &key ) { - return d->metaData.contains(key); + return d->metaData.tqcontains(key); } TQString KSSLSocket::metaData( const TQString &key ) { - if( d->metaData.contains(key) ) + if( d->metaData.tqcontains(key) ) return d->metaData[key]; - return TQString::null; + return TQString(); } /* @@ -322,7 +326,7 @@ int KSSLSocket::verifyCertificate() setMetaData("ssl_action", "accept"); } - // Since we're the parent, we need to teach the child. + // Since we're the tqparent, we need to teach the child. setMetaData("ssl_parent_ip", ourIp ); setMetaData("ssl_parent_cert", pc.toString()); @@ -368,7 +372,7 @@ int KSSLSocket::verifyCertificate() "does not match the one the " "certificate was issued to."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, - msg.arg(ourHost), + msg.tqarg(ourHost), i18n("Server Authentication"), i18n("&Details"), i18n("Co&ntinue") ); @@ -378,7 +382,7 @@ int KSSLSocket::verifyCertificate() TQString msg = i18n("The server certificate failed the " "authenticity test (%1)."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, - msg.arg(ourHost), + msg.tqarg(ourHost), i18n("Server Authentication"), i18n("&Details"), i18n("Co&ntinue") ); -- cgit v1.2.1