From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/irc/libkirc/ksslsocket.cpp | 82 ++++++++++++++--------------- 1 file changed, 41 insertions(+), 41 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 fb2d5161..afe78fed 100644 --- a/kopete/protocols/irc/libkirc/ksslsocket.cpp +++ b/kopete/protocols/irc/libkirc/ksslsocket.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -36,8 +36,8 @@ struct KSSLSocketPrivate mutable KSSL *kssl; KSSLCertificateCache *cc; DCOPClient *dcc; - QMap metaData; - QSocketNotifier *socketNotifier; + TQMap metaData; + TQSocketNotifier *socketNotifier; }; KSSLSocket::KSSLSocket() : KExtendedSocket() @@ -52,9 +52,9 @@ KSSLSocket::KSSLSocket() : KExtendedSocket() setBlockingMode(false); //Connect internal slots - QObject::connect( this, SIGNAL(connectionSuccess()), this, SLOT(slotConnected()) ); - QObject::connect( this, SIGNAL(closed(int)), this, SLOT(slotDisconnected()) ); - QObject::connect( this, SIGNAL(connectionFailed(int)), this, SLOT(slotDisconnected())); + TQObject::connect( this, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotConnected()) ); + TQObject::connect( this, TQT_SIGNAL(closed(int)), this, TQT_SLOT(slotDisconnected()) ); + TQObject::connect( this, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotDisconnected())); } KSSLSocket::~KSSLSocket() @@ -118,7 +118,7 @@ int KSSLSocket::bytesAvailable() const void KSSLSocket::slotReadData() { kdDebug(14120) << k_funcinfo << d->kssl->pending() << endl; - QByteArray buff(512); + TQByteArray buff(512); int bytesRead = d->kssl->read( buff.data(), 512 ); //Fill the read buffer @@ -148,11 +148,11 @@ void KSSLSocket::slotConnected() } //Disconnect the KExtSocket notifier slot, we use our own - QObject::disconnect( readNotifier(), SIGNAL(activated( int )), - this, SLOT(socketActivityRead()) ); + TQObject::disconnect( readNotifier(), TQT_SIGNAL(activated( int )), + this, TQT_SLOT(socketActivityRead()) ); - QObject::connect( readNotifier(), SIGNAL(activated( int )), - this, SLOT(slotReadData()) ); + TQObject::connect( readNotifier(), TQT_SIGNAL(activated( int )), + this, TQT_SLOT(slotReadData()) ); readNotifier()->setEnabled(true); @@ -182,34 +182,34 @@ void KSSLSocket::showInfoDialog() { if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList()); + KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); } - QByteArray data, ignore; - QCString ignoretype; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, ignore; + TQCString ignoretype; + TQDataStream arg(data, IO_WriteOnly); arg << "irc://" + peerAddress()->pretty() + ":" + port() << d->metaData; d->dcc->call("kio_uiserver", "UIServer", - "showSSLInfoDialog(QString,KIO::MetaData)", data, ignoretype, ignore); + "showSSLInfoDialog(TQString,KIO::MetaData)", data, ignoretype, ignore); } } -void KSSLSocket::setMetaData( const QString &key, const QVariant &data ) +void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data ) { - QVariant v = data; + TQVariant v = data; d->metaData[key] = v.asString(); } -bool KSSLSocket::hasMetaData( const QString &key ) +bool KSSLSocket::hasMetaData( const TQString &key ) { return d->metaData.contains(key); } -QString KSSLSocket::metaData( const QString &key ) +TQString KSSLSocket::metaData( const TQString &key ) { if( d->metaData.contains(key) ) return d->metaData[key]; - return QString::null; + return TQString::null; } /* @@ -220,27 +220,27 @@ I basically copied the below from tcpKIO::SlaveBase.hpp, with some modificaions * Copyright (C) 2001 Dawit Alemayehu */ -int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, const QString &caption, - const QString &buttonYes, const QString &buttonNo ) +int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, const TQString &caption, + const TQString &buttonYes, const TQString &buttonNo ) { kdDebug(14120) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl; - QByteArray data, result; - QCString returnType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, result; + TQCString returnType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)1 << (int)type << text << caption << buttonYes << buttonNo; if (!d->dcc->isApplicationRegistered("kio_uiserver")) { - KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList()); + KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList()); } d->dcc->call("kio_uiserver", "UIServer", - "messageBox(int,int,QString,QString,QString,QString)", data, returnType, result); + "messageBox(int,int,TQString,TQString,TQString,TQString)", data, returnType, result); if( returnType == "int" ) { int res; - QDataStream r(result, IO_ReadOnly); + TQDataStream r(result, IO_ReadOnly); r >> res; return res; } @@ -257,10 +257,10 @@ int KSSLSocket::verifyCertificate() bool _IPmatchesCN = false; int result; bool doAddHost = false; - QString ourHost = host(); - QString ourIp = peerAddress()->pretty(); + TQString ourHost = host(); + TQString ourIp = peerAddress()->pretty(); - QString theurl = "irc://" + ourHost + ":" + port(); + TQString theurl = "irc://" + ourHost + ":" + port(); if (!d->cc) d->cc = new KSSLCertificateCache; @@ -284,15 +284,15 @@ int KSSLSocket::verifyCertificate() setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher()); setMetaData("ssl_cipher_desc", d->kssl->connectionInfo().getCipherDescription()); setMetaData("ssl_cipher_version", d->kssl->connectionInfo().getCipherVersion()); - setMetaData("ssl_cipher_used_bits", QString::number(d->kssl->connectionInfo().getCipherUsedBits())); - setMetaData("ssl_cipher_bits", QString::number(d->kssl->connectionInfo().getCipherBits())); + setMetaData("ssl_cipher_used_bits", TQString::number(d->kssl->connectionInfo().getCipherUsedBits())); + setMetaData("ssl_cipher_bits", TQString::number(d->kssl->connectionInfo().getCipherBits())); setMetaData("ssl_peer_ip", ourIp ); - QString errorStr; + TQString errorStr; for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin(); it != ksvl.end(); ++it) { - errorStr += QString::number(*it)+":"; + errorStr += TQString::number(*it)+":"; } setMetaData("ssl_cert_errors", errorStr); @@ -300,8 +300,8 @@ int KSSLSocket::verifyCertificate() if (pc.chain().isValid() && pc.chain().depth() > 1) { - QString theChain; - QPtrList chain = pc.chain().getChain(); + TQString theChain; + TQPtrList chain = pc.chain().getChain(); for (KSSLCertificate *c = chain.first(); c; c = chain.next()) { theChain += c->toString(); @@ -314,7 +314,7 @@ int KSSLSocket::verifyCertificate() setMetaData("ssl_peer_chain", ""); } - setMetaData("ssl_cert_state", QString::number(ksv)); + setMetaData("ssl_cert_state", TQString::number(ksv)); if (ksv == KSSLCertificate::Ok) { @@ -364,7 +364,7 @@ int KSSLSocket::verifyCertificate() { if (ksv == KSSLCertificate::InvalidHost) { - QString msg = i18n("The IP address of the host %1 " + TQString msg = i18n("The IP address of the host %1 " "does not match the one the " "certificate was issued to."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, @@ -375,7 +375,7 @@ int KSSLSocket::verifyCertificate() } else { - QString msg = i18n("The server certificate failed the " + TQString msg = i18n("The server certificate failed the " "authenticity test (%1)."); result = messageBox( KIO::SlaveBase::WarningYesNoCancel, msg.arg(ourHost), -- cgit v1.2.1