summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/msn
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn')
-rw-r--r--kopete/protocols/msn/config/msnpreferences.cpp2
-rw-r--r--kopete/protocols/msn/dispatcher.cpp166
-rw-r--r--kopete/protocols/msn/dispatcher.h42
-rw-r--r--kopete/protocols/msn/incomingtransfer.cpp66
-rw-r--r--kopete/protocols/msn/incomingtransfer.h4
-rw-r--r--kopete/protocols/msn/messageformatter.cpp36
-rw-r--r--kopete/protocols/msn/messageformatter.h8
-rw-r--r--kopete/protocols/msn/msnaccount.cpp324
-rw-r--r--kopete/protocols/msn/msnaccount.h82
-rw-r--r--kopete/protocols/msn/msnaddcontactpage.cpp16
-rw-r--r--kopete/protocols/msn/msnaddcontactpage.h10
-rw-r--r--kopete/protocols/msn/msnchallengehandler.cpp38
-rw-r--r--kopete/protocols/msn/msnchallengehandler.h18
-rw-r--r--kopete/protocols/msn/msnchatsession.cpp182
-rw-r--r--kopete/protocols/msn/msnchatsession.h34
-rw-r--r--kopete/protocols/msn/msncontact.cpp108
-rw-r--r--kopete/protocols/msn/msncontact.h40
-rw-r--r--kopete/protocols/msn/msndebugrawcmddlg.cpp14
-rw-r--r--kopete/protocols/msn/msndebugrawcmddlg.h8
-rw-r--r--kopete/protocols/msn/msnfiletransfersocket.cpp102
-rw-r--r--kopete/protocols/msn/msnfiletransfersocket.h34
-rw-r--r--kopete/protocols/msn/msninvitation.cpp34
-rw-r--r--kopete/protocols/msn/msninvitation.h20
-rw-r--r--kopete/protocols/msn/msnnotifysocket.cpp256
-rw-r--r--kopete/protocols/msn/msnnotifysocket.h84
-rw-r--r--kopete/protocols/msn/msnprotocol.cpp44
-rw-r--r--kopete/protocols/msn/msnprotocol.h20
-rw-r--r--kopete/protocols/msn/msnsecureloginhandler.cpp28
-rw-r--r--kopete/protocols/msn/msnsecureloginhandler.h14
-rw-r--r--kopete/protocols/msn/msnsocket.cpp170
-rw-r--r--kopete/protocols/msn/msnsocket.h68
-rw-r--r--kopete/protocols/msn/msnswitchboardsocket.cpp298
-rw-r--r--kopete/protocols/msn/msnswitchboardsocket.h70
-rw-r--r--kopete/protocols/msn/outgoingtransfer.cpp68
-rw-r--r--kopete/protocols/msn/outgoingtransfer.h16
-rw-r--r--kopete/protocols/msn/p2p.cpp50
-rw-r--r--kopete/protocols/msn/p2p.h36
-rw-r--r--kopete/protocols/msn/sha1.cpp16
-rw-r--r--kopete/protocols/msn/sha1.h8
-rw-r--r--kopete/protocols/msn/transport.cpp60
-rw-r--r--kopete/protocols/msn/transport.h34
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.cpp90
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.h6
-rw-r--r--kopete/protocols/msn/webcam.cpp196
-rw-r--r--kopete/protocols/msn/webcam.h20
-rw-r--r--kopete/protocols/msn/webcam/mimicwrapper.cpp28
-rw-r--r--kopete/protocols/msn/webcam/mimicwrapper.h6
-rw-r--r--kopete/protocols/msn/webcam/msnwebcamdialog.cpp24
-rw-r--r--kopete/protocols/msn/webcam/msnwebcamdialog.h6
49 files changed, 1552 insertions, 1552 deletions
diff --git a/kopete/protocols/msn/config/msnpreferences.cpp b/kopete/protocols/msn/config/msnpreferences.cpp
index b28c2ea3..a6f5371f 100644
--- a/kopete/protocols/msn/config/msnpreferences.cpp
+++ b/kopete/protocols/msn/config/msnpreferences.cpp
@@ -26,7 +26,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_msn, MSNProtocolConfigFactory( "kcm_kopet
class MSNPreferences : public KCAutoConfigModule
{
public:
- MSNPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args )
+ MSNPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( MSNProtocolConfigFactory::instance(), parent, args )
{
setMainWidget( new msnPrefsUI( this ) , "MSN");
}
diff --git a/kopete/protocols/msn/dispatcher.cpp b/kopete/protocols/msn/dispatcher.cpp
index 8b8bbed6..fb88e8bc 100644
--- a/kopete/protocols/msn/dispatcher.cpp
+++ b/kopete/protocols/msn/dispatcher.cpp
@@ -37,11 +37,11 @@ using P2P::OutgoingTransfer;
#include <ktempfile.h>
// Qt includes
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
// Kopete includes
#include <kopetechatsession.h> // Just for getting the contact
@@ -50,8 +50,8 @@ using P2P::OutgoingTransfer;
#include <stdlib.h>
-Dispatcher::Dispatcher(QObject *parent, const QString& contact, const QStringList &ip)
- : QObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip)
+Dispatcher::Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip)
+ : TQObject(parent) , m_contact(contact) , m_callbackChannel(0l) , m_ip(ip)
{}
Dispatcher::~Dispatcher()
@@ -71,12 +71,12 @@ void Dispatcher::detach(TransferContext* transfer)
transfer->deleteLater();
}
-QString Dispatcher::localContact()
+TQString Dispatcher::localContact()
{
return m_contact;
}
-void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObject)
+void Dispatcher::requestDisplayIcon(const TQString& from, const TQString& msnObject)
{
Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4;
TransferContext* current =
@@ -91,13 +91,13 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec
kdDebug(14140) << k_funcinfo << "Requesting, " << msnObject << endl;
- QString context = QString::fromUtf8(KCodecs::base64Encode(msnObject.utf8()));
+ TQString context = TQString::fromUtf8(KCodecs::base64Encode(msnObject.utf8()));
// NOTE remove the \0 character automatically
- // appended to a QCString.
- context.replace("=", QString::null);
- QString content =
+ // appended to a TQCString.
+ context.replace("=", TQString::null);
+ TQString content =
"EUF-GUID: {A4268EEC-FEC5-49E5-95C3-F126696BDBF6}\r\n"
- "SessionID: " + QString::number(sessionId) + "\r\n"
+ "SessionID: " + TQString::number(sessionId) + "\r\n"
"AppID: 1\r\n"
"Context: " + context + "\r\n"
"\r\n";
@@ -105,7 +105,7 @@ void Dispatcher::requestDisplayIcon(const QString& from, const QString& msnObjec
current->sendMessage(INVITE, content);
}
-void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString& to)
+void Dispatcher::sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to)
{
// Create a new transfer context that will handle
// the file transfer.
@@ -119,14 +119,14 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
m_sessions.insert(sessionId, current);
// Set the transfer context file.
- current->m_file = new QFile(path);
+ current->m_file = new TQFile(path);
// Create the file context data.
- QString context;
+ TQString context;
- QByteArray header(638);
+ TQByteArray header(638);
header.fill('\0');
- QDataStream writer(header, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(header, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
// Write the header length to the stream.
writer << (Q_INT32)638;
@@ -138,8 +138,8 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
// TODO support file preview. For now disable file preview.
writer << (Q_INT32)1;
// Write the file name in utf-16 to the stream.
- QTextStream ts(header, IO_WriteOnly);
- ts.setEncoding(QTextStream::RawUnicode);
+ TQTextStream ts(header, IO_WriteOnly);
+ ts.setEncoding(TQTextStream::RawUnicode);
ts.device()->at(20);
ts << path.section('/', -1);
// NOTE Background Sharing base64 [540..569]
@@ -151,21 +151,21 @@ void Dispatcher::sendFile(const QString& path, Q_INT64 fileSize, const QString&
writer << (Q_UINT32)0xFFFFFFFF;
// Encode the file context header to base64 encoding.
- context = QString::fromUtf8(KCodecs::base64Encode(header));
+ context = TQString::fromUtf8(KCodecs::base64Encode(header));
// Send an INVITE message to the recipient.
- QString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n"
- "SessionID: " + QString::number(sessionId) + "\r\n"
+ TQString content = "EUF-GUID: {5D3E02AB-6190-11D3-BBBB-00C04F795683}\r\n"
+ "SessionID: " + TQString::number(sessionId) + "\r\n"
"AppID: 2\r\n"
"Context: " + context + "\r\n"
"\r\n";
current->sendMessage(INVITE, content);
}
-void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/)
+void Dispatcher::sendImage(const TQString& /*fileName*/, const TQString& /*to*/)
{
// TODO kdDebug(14140) << k_funcinfo << endl;
-// QFile imageFile(fileName);
+// TQFile imageFile(fileName);
// if(!imageFile.open(IO_ReadOnly))
// {
// kdDebug(14140) << k_funcinfo << "Error opening image file."
@@ -180,7 +180,7 @@ void Dispatcher::sendImage(const QString& /*fileName*/, const QString& /*to*/)
}
#if MSN_WEBCAM
-void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHandle, bool wantToReceive)
+void Dispatcher::startWebcam(const TQString &/*myHandle*/, const TQString &msgHandle, bool wantToReceive)
{
Q_UINT32 sessionId = rand()%0xFFFFFF00 + 4;
Webcam::Who who= wantToReceive ? Webcam::wViewer : Webcam::wProducer;
@@ -195,10 +195,10 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand
// {4BD96FC0-AB17-4425-A14A-439185962DC8} <- i want to show you my webcam
// {1C9AA97E-9C05-4583-A3BD-908A196F1E92} <- i want to see your webcam
- QString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ;
+ TQString GUID= (who==Webcam::wProducer) ? "4BD96FC0-AB17-4425-A14A-439185962DC8" : "1C9AA97E-9C05-4583-A3BD-908A196F1E92" ;
- QString content="EUF-GUID: {"+GUID+"}\r\n"
- "SessionID: "+ QString::number(sessionId)+"\r\n"
+ TQString content="EUF-GUID: {"+GUID+"}\r\n"
+ "SessionID: "+ TQString::number(sessionId)+"\r\n"
"AppID: 4\r\n"
"Context: ewBCADgAQgBFADcAMABEAEUALQBFADIAQwBBAC0ANAA0ADAAMAAtAEEARQAwADMALQA4ADgARgBGADgANQBCADkARgA0AEUAOAB9AA==\r\n\r\n";
@@ -210,7 +210,7 @@ void Dispatcher::startWebcam(const QString &/*myHandle*/, const QString &msgHand
-void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
+void Dispatcher::slotReadMessage(const TQString &from, const TQByteArray& stream)
{
P2P::Message receivedMessage =
m_messageFormatter.readMessage(stream);
@@ -222,7 +222,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
if((receivedMessage.header.dataSize == 0)/* && ((receivedMessage.header.flag & 0x02) == 0x02)*/)
{
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
if(receivedMessage.header.ackSessionIdentifier == it.data()->m_identifier){
@@ -250,7 +250,7 @@ void Dispatcher::slotReadMessage(const QString &from, const QByteArray& stream)
if(m_messageBuffer.contains(receivedMessage.header.identifier))
{
kdDebug(14140) << k_funcinfo
- << QString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier)
+ << TQString("retrieving buffered messsage, %1").arg(receivedMessage.header.identifier)
<< endl;
// The message was split, try to reconstruct the message
@@ -288,9 +288,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
}
else
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
- QRegExp regex("SessionID: ([0-9]*)\r\n");
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
+ TQRegExp regex("SessionID: ([0-9]*)\r\n");
if(regex.search(body) > 0)
{
Q_UINT32 sessionId = regex.cap(1).toUInt();
@@ -312,12 +312,12 @@ void Dispatcher::dispatch(const P2P::Message& message)
{
// If the message handler still has not been found,
// try to retrieve the handler based on the call id.
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString callId = regex.cap(1);
+ TQString callId = regex.cap(1);
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
current = it.data();
@@ -347,14 +347,14 @@ void Dispatcher::dispatch(const P2P::Message& message)
// The entire message has not been received;
// buffer the recevied portion of the original message.
kdDebug(14140) << k_funcinfo
- << QString("Buffering messsage, %1").arg(message.header.identifier)
+ << TQString("Buffering messsage, %1").arg(message.header.identifier)
<< endl;
m_messageBuffer.insert(message.header.identifier, message);
return;
}
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("INVITE"))
@@ -362,23 +362,23 @@ void Dispatcher::dispatch(const P2P::Message& message)
// Retrieve the branch, call id, and session id.
// These fields will be used later on in the p2p
// transaction.
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString branch = regex.cap(1);
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ TQString branch = regex.cap(1);
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
- QString callId = regex.cap(1);
- regex = QRegExp("SessionID: ([0-9]*)\r\n");
+ TQString callId = regex.cap(1);
+ regex = TQRegExp("SessionID: ([0-9]*)\r\n");
regex.search(body);
- QString sessionId = regex.cap(1);
+ TQString sessionId = regex.cap(1);
// Retrieve the contact that requested the session.
- regex = QRegExp("From: <msnmsgr:([^>]*)>");
+ regex = TQRegExp("From: <msnmsgr:([^>]*)>");
regex.search(body);
- QString from = regex.cap(1);
+ TQString from = regex.cap(1);
// Retrieve the application identifier which
// is used to determine what type of session
// is being requested.
- regex = QRegExp("AppID: ([0-9]*)\r\n");
+ regex = TQRegExp("AppID: ([0-9]*)\r\n");
regex.search(body);
Q_UINT32 applicationId = regex.cap(1).toUInt();
@@ -387,9 +387,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
// A contact has requested a session to download
// a display icon (User Display Icon or CustomEmotion).
- regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)");
regex.search(body);
- QCString msnobj;
+ TQCString msnobj;
// Decode the msn object from base64 encoding.
KCodecs::base64Decode(regex.cap(1).utf8() , msnobj);
@@ -407,10 +407,10 @@ void Dispatcher::dispatch(const P2P::Message& message)
m_sessions.insert(sessionId.toUInt(), current);
// Determine the display icon being requested.
- QString fileName = objectList.contains(msnobj)
+ TQString fileName = objectList.contains(msnobj)
? objectList[msnobj]
: m_pictureUrl;
- QFile *source = new QFile(fileName);
+ TQFile *source = new TQFile(fileName);
// Try to open the source file for reading.
// If an error occurs, send an internal
// error message to the recipient.
@@ -427,7 +427,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
current->m_ackSessionIdentifier = message.header.identifier;
current->m_ackUniqueIdentifier = message.header.ackSessionIdentifier;
// Send a 200 OK message to the recipient.
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
current->sendMessage(OK, content);
}
else if(applicationId == 2)
@@ -447,14 +447,14 @@ void Dispatcher::dispatch(const P2P::Message& message)
// Add the transfer to the list.
m_sessions.insert(sessionId.toUInt(), transfer);
- regex = QRegExp("Context: ([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("Context: ([0-9a-zA-Z+/=]*)");
regex.search(body);
- QByteArray context;
+ TQByteArray context;
// Decode the file context from base64 encoding.
KCodecs::base64Decode(regex.cap(1).utf8(), context);
- QDataStream reader(context, IO_ReadOnly);
- reader.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream reader(context, IO_ReadOnly);
+ reader.setByteOrder(TQDataStream::LittleEndian);
//Retrieve the file info from the context field.
// File Size [8..15] Int64
reader.device()->at(8);
@@ -468,17 +468,17 @@ void Dispatcher::dispatch(const P2P::Message& message)
reader >> flag;
kdDebug(14140) << flag << endl;
// FileName UTF16 (Unicode) [19..539]
- QByteArray bytes(520);
+ TQByteArray bytes(520);
reader.readRawBytes(bytes.data(), bytes.size());
- QTextStream ts(bytes, IO_ReadOnly);
- ts.setEncoding(QTextStream::Unicode);
- QString fileName;
+ TQTextStream ts(bytes, IO_ReadOnly);
+ ts.setEncoding(TQTextStream::Unicode);
+ TQString fileName;
fileName = ts.readLine().utf8();
emit incomingTransfer(from, fileName, fileSize);
kdDebug(14140) <<
- QString("%1, %2 bytes.").arg(fileName, QString::number(fileSize))
+ TQString("%1, %2 bytes.").arg(fileName, TQString::number(fileSize))
<< endl
<< endl;
@@ -493,11 +493,11 @@ void Dispatcher::dispatch(const P2P::Message& message)
transfer->m_ackSessionIdentifier = message.header.identifier;
transfer->m_ackUniqueIdentifier = message.header.ackSessionIdentifier;
- QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(accepted(Kopete::Transfer*, const QString&)), transfer, SLOT(slotTransferAccepted(Kopete::Transfer*, const QString&)));
- QObject::connect(Kopete::TransferManager::transferManager(), SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, SLOT(slotTransferRefused(const Kopete::FileTransferInfo&)));
+ TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(accepted(Kopete::Transfer*, const TQString&)), transfer, TQT_SLOT(slotTransferAccepted(Kopete::Transfer*, const TQString&)));
+ TQObject::connect(Kopete::TransferManager::transferManager(), TQT_SIGNAL(refused(const Kopete::FileTransferInfo&)), transfer, TQT_SLOT(slotTransferRefused(const Kopete::FileTransferInfo&)));
// Show the file transfer accept/decline dialog.
- Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, QString::null, sessionId);
+ Kopete::TransferManager::transferManager()->askIncomingTransfer(contact, fileName, fileSize, TQString::null, sessionId);
}
else
{
@@ -512,9 +512,9 @@ void Dispatcher::dispatch(const P2P::Message& message)
else if(applicationId == 4)
{
#if MSN_WEBCAM
- regex = QRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}");
+ regex = TQRegExp("EUF-GUID: \\{([0-9a-zA-Z\\-]*)\\}");
regex.search(body);
- QString GUID=regex.cap(1);
+ TQString GUID=regex.cap(1);
kdDebug(14140) << k_funcinfo << "webcam " << GUID << endl;
@@ -542,7 +542,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
m_sessions.insert(sessionId.toUInt(), current);
// Acknowledge the session request.
current->acknowledge(message);
- QTimer::singleShot(0,current, SLOT(askIncommingInvitation()) );
+ TQTimer::singleShot(0,current, TQT_SLOT(askIncommingInvitation()) );
#endif
}
}
@@ -550,26 +550,26 @@ void Dispatcher::dispatch(const P2P::Message& message)
{
// A contact has sent an inkformat (handwriting) gif.
// NOTE The entire message body is UTF16 encoded.
- QString body = "";
+ TQString body = "";
for (Q_UINT32 i=0; i < message.header.totalDataSize; i++){
- if (message.body[i] != QChar('\0')){
- body += QChar(message.body[i]);
+ if (message.body[i] != TQChar('\0')){
+ body += TQChar(message.body[i]);
}
}
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(body);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType == "image/gif")
{
IncomingTransfer transfer(message.source, this, message.header.sessionId);
transfer.acknowledge(message);
- regex = QRegExp("base64:([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)");
regex.search(body);
- QString base64 = regex.cap(1);
- QByteArray image;
+ TQString base64 = regex.cap(1);
+ TQByteArray image;
// Convert from base64 encoding to byte array.
KCodecs::base64Decode(base64.utf8(), image);
// Create a temporary file to store the image data.
@@ -590,7 +590,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv
if(fullReceive)
{
TransferContext *current = 0l;
- QMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
+ TQMap<Q_UINT32, TransferContext*>::Iterator it = m_sessions.begin();
for(; it != m_sessions.end(); it++)
{
current = it.data();
@@ -604,7 +604,7 @@ void Dispatcher::messageAcknowledged(unsigned int correlationId, bool fullReceiv
}
}
-Kopete::Contact* Dispatcher::getContactByAccountId(const QString& accountId)
+Kopete::Contact* Dispatcher::getContactByAccountId(const TQString& accountId)
{
Kopete::Contact *contact = 0l;
if(parent())
@@ -628,7 +628,7 @@ Dispatcher::CallbackChannel::CallbackChannel(MSNSwitchBoardSocket *switchboard)
Dispatcher::CallbackChannel::~CallbackChannel()
{}
-Q_UINT32 Dispatcher::CallbackChannel::send(const QByteArray& stream)
+Q_UINT32 Dispatcher::CallbackChannel::send(const TQByteArray& stream)
{
return m_switchboard->sendCommand("MSG", "D", true, stream, true);
}
diff --git a/kopete/protocols/msn/dispatcher.h b/kopete/protocols/msn/dispatcher.h
index 56bd1856..72a9cc12 100644
--- a/kopete/protocols/msn/dispatcher.h
+++ b/kopete/protocols/msn/dispatcher.h
@@ -17,8 +17,8 @@
#ifndef DISPATCHER_H
#define DISPATCHER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "kopete_export.h"
@@ -41,30 +41,30 @@ namespace P2P{
class KOPETE_EXPORT Dispatcher : public QObject
{ Q_OBJECT
public:
- Dispatcher(QObject *parent, const QString& contact, const QStringList &ip);
+ Dispatcher(TQObject *parent, const TQString& contact, const TQStringList &ip);
~Dispatcher();
void detach(TransferContext* transfer);
- QString localContact();
- void requestDisplayIcon(const QString& from, const QString& msnObject);
- void sendFile(const QString& path, Q_INT64 fileSize, const QString& to);
- void sendImage(const QString& fileName, const QString& to);
- QString m_pictureUrl;
- QMap<QString, QString> objectList;
+ TQString localContact();
+ void requestDisplayIcon(const TQString& from, const TQString& msnObject);
+ void sendFile(const TQString& path, Q_INT64 fileSize, const TQString& to);
+ void sendImage(const TQString& fileName, const TQString& to);
+ TQString m_pictureUrl;
+ TQMap<TQString, TQString> objectList;
#if MSN_WEBCAM
- void startWebcam(const QString &myHandle, const QString &msgHandle, bool wantToReceive);
+ void startWebcam(const TQString &myHandle, const TQString &msgHandle, bool wantToReceive);
#endif
public slots:
- void slotReadMessage(const QString &from, const QByteArray& stream);
+ void slotReadMessage(const TQString &from, const TQByteArray& stream);
void messageAcknowledged(unsigned int correlationId, bool fullReceive);
signals:
- void sendCommand(const QString &cmd, const QString &args = QString::null, bool addId = true, const QByteArray &body = QByteArray(), bool binary=false);
- void displayIconReceived(KTempFile* file, const QString& msnObject);
- void incomingTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize);
+ void sendCommand(const TQString &cmd, const TQString &args = TQString::null, bool addId = true, const TQByteArray &body = TQByteArray(), bool binary=false);
+ void displayIconReceived(KTempFile* file, const TQString& msnObject);
+ void incomingTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize);
private:
class CallbackChannel
@@ -73,7 +73,7 @@ namespace P2P{
CallbackChannel(MSNSwitchBoardSocket *switchboard);
~CallbackChannel();
- Q_UINT32 send(const QByteArray& stream);
+ Q_UINT32 send(const TQByteArray& stream);
private:
MSNSwitchBoardSocket *m_switchboard;
@@ -84,19 +84,19 @@ namespace P2P{
/**
* IP's of this compiter, the first one is the one seen by the server.
*/
- QStringList localIp() { return m_ip; }
+ TQStringList localIp() { return m_ip; }
private:
void dispatch(const P2P::Message& message);
- Kopete::Contact* getContactByAccountId(const QString& accountId);
+ Kopete::Contact* getContactByAccountId(const TQString& accountId);
P2P::MessageFormatter m_messageFormatter;
- QMap<Q_UINT32, P2P::TransferContext*> m_sessions;
- QMap<Q_UINT32, P2P::Message> m_messageBuffer;
- QString m_contact;
+ TQMap<Q_UINT32, P2P::TransferContext*> m_sessions;
+ TQMap<Q_UINT32, P2P::Message> m_messageBuffer;
+ TQString m_contact;
CallbackChannel *m_callbackChannel;
- QStringList m_ip;
+ TQStringList m_ip;
friend class P2P::TransferContext;
friend class P2P::IncomingTransfer;
diff --git a/kopete/protocols/msn/incomingtransfer.cpp b/kopete/protocols/msn/incomingtransfer.cpp
index aefbdbfe..c7757219 100644
--- a/kopete/protocols/msn/incomingtransfer.cpp
+++ b/kopete/protocols/msn/incomingtransfer.cpp
@@ -29,13 +29,13 @@ using P2P::Message;
using namespace KNetwork;
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
// Kopete includes
#include <kopetetransfermanager.h>
-IncomingTransfer::IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+IncomingTransfer::IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
: TransferContext(from,dispatcher,sessionId)
{
m_direction = P2P::Incoming;
@@ -59,19 +59,19 @@ IncomingTransfer::~IncomingTransfer()
}
-void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const QString& /*fileName*/)
+void IncomingTransfer::slotTransferAccepted(Kopete::Transfer* transfer, const TQString& /*fileName*/)
{
Q_UINT32 sessionId = transfer->info().internalId().toUInt();
if(sessionId!=m_sessionId)
return;
- QObject::connect(transfer , SIGNAL(transferCanceled()), this, SLOT(abort()));
+ TQObject::connect(transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
m_transfer = transfer;
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
sendMessage(OK, content);
- QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
+ TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
}
void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info)
@@ -80,12 +80,12 @@ void IncomingTransfer::slotTransferRefused(const Kopete::FileTransferInfo& info)
if(sessionId!=m_sessionId)
return;
- QString content = QString("SessionID: %1\r\n\r\n").arg(sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(sessionId);
// Send the sending client a cancelation message.
sendMessage(DECLINE, content);
m_state=Finished;
- QObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
+ TQObject::disconnect(Kopete::TransferManager::transferManager(), 0l, this, 0l);
}
@@ -106,7 +106,7 @@ void IncomingTransfer::acknowledged()
// should follow. Otherwise, the file transfer may start right away.
if(m_transfer)
{
- QFile *destination = new QFile(m_transfer->destinationURL().path());
+ TQFile *destination = new TQFile(m_transfer->destinationURL().path());
if(!destination->open(IO_WriteOnly))
{
m_transfer->slotError(KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Cannot open file for writing"));
@@ -141,7 +141,7 @@ void IncomingTransfer::processMessage(const Message& message)
{
// UserDisplayIcon data or File data is in this message.
// Write the recieved data to the file.
- kdDebug(14140) << k_funcinfo << QString("Received, %1 bytes").arg(message.header.dataSize) << endl;
+ kdDebug(14140) << k_funcinfo << TQString("Received, %1 bytes").arg(message.header.dataSize) << endl;
m_file->writeBlock(message.body.data(), message.header.dataSize);
if(m_transfer){
@@ -178,7 +178,7 @@ void IncomingTransfer::processMessage(const Message& message)
{
// Data preparation message.
//if (m_tempFile->name().isEmpty() == false) {
- // QFile::remove(m_tempFile->name());
+ // TQFile::remove(m_tempFile->name());
//}
m_tempFile = new KTempFile(locateLocal("tmp", "msnpicture--"), ".png");
m_tempFile->setAutoDelete(true);
@@ -189,30 +189,30 @@ void IncomingTransfer::processMessage(const Message& message)
}
else
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
// kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("INVITE"))
{
// Retrieve some MSNSLP headers used when
// replying to this INVITE message.
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_branch = regex.cap(1);
// NOTE Call-ID never changes.
- regex = QRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Call-ID: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_callId = regex.cap(1);
- regex = QRegExp("Bridges: ([^\r\n]*)\r\n");
+ regex = TQRegExp("Bridges: ([^\r\n]*)\r\n");
regex.search(body);
- QString bridges = regex.cap(1);
+ TQString bridges = regex.cap(1);
// The NetID field is 0 if the Conn-Type is
// Direct-Connect or Firewall, otherwise, it is
// a randomly generated number.
- regex = QRegExp("NetID: (\\-?\\d+)\r\n");
+ regex = TQRegExp("NetID: (\\-?\\d+)\r\n");
regex.search(body);
- QString netId = regex.cap(1);
+ TQString netId = regex.cap(1);
kdDebug(14140) << "net id, " << netId << endl;
// Connection Types
// - Direct-Connect
@@ -220,9 +220,9 @@ void IncomingTransfer::processMessage(const Message& message)
// - IP-Restrict-NAT
// - Symmetric-NAT
// - Firewall
- regex = QRegExp("Conn-Type: ([^\r\n]+)\r\n");
+ regex = TQRegExp("Conn-Type: ([^\r\n]+)\r\n");
regex.search(body);
- QString connType = regex.cap(1);
+ TQString connType = regex.cap(1);
bool wouldListen = false;
if(netId.toUInt() == 0 && connType == "Direct-Connect"){
@@ -235,7 +235,7 @@ void IncomingTransfer::processMessage(const Message& message)
#if 1
wouldListen = false; // TODO Direct connection support
#endif
- QString content;
+ TQString content;
if(wouldListen)
{
@@ -243,8 +243,8 @@ void IncomingTransfer::processMessage(const Message& message)
m_listener = new KServerSocket("", "");
m_listener->setResolutionEnabled(true);
// Create the callback that will try to accept incoming connections.
- QObject::connect(m_listener, SIGNAL(readyAccept()), SLOT(slotAccept()));
- QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int)));
+ TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(slotAccept()));
+ TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int)));
// Listen for incoming connections.
bool isListening = m_listener->listen(1);
kdDebug(14140) << k_funcinfo << (isListening ? "listening" : "not listening") << endl;
@@ -254,9 +254,9 @@ void IncomingTransfer::processMessage(const Message& message)
content = "Bridge: TCPv1\r\n"
"Listening: true\r\n" +
- QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
- QString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) +
- QString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) +
+ TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
+ TQString("IPv4Internal-Addrs: %1\r\n").arg(m_listener->localAddress().nodeName()) +
+ TQString("IPv4Internal-Port: %1\r\n").arg(m_listener->localAddress().serviceName()) +
"\r\n";
}
else
@@ -349,11 +349,11 @@ void IncomingTransfer::slotAccept()
m_socket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
- QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
}
void IncomingTransfer::slotSocketRead()
@@ -362,10 +362,10 @@ void IncomingTransfer::slotSocketRead()
kdDebug(14140) << k_funcinfo << available << ", bytes available." << endl;
if(available > 0)
{
- QByteArray buffer(available);
+ TQByteArray buffer(available);
m_socket->readBlock(buffer.data(), buffer.size());
- if(QString(buffer) == "foo"){
+ if(TQString(buffer) == "foo"){
kdDebug(14140) << "Connection Check." << endl;
}
}
diff --git a/kopete/protocols/msn/incomingtransfer.h b/kopete/protocols/msn/incomingtransfer.h
index 23e101b3..ca879deb 100644
--- a/kopete/protocols/msn/incomingtransfer.h
+++ b/kopete/protocols/msn/incomingtransfer.h
@@ -31,7 +31,7 @@ namespace P2P{
class IncomingTransfer : public P2P::TransferContext
{ Q_OBJECT
public:
- IncomingTransfer(const QString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
+ IncomingTransfer(const TQString& from, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
virtual ~IncomingTransfer();
private slots:
@@ -41,7 +41,7 @@ namespace P2P{
void slotSocketClosed();
void slotSocketError(int errorCode);
- void slotTransferAccepted(Kopete::Transfer* transfer, const QString& fileName);
+ void slotTransferAccepted(Kopete::Transfer* transfer, const TQString& fileName);
void slotTransferRefused(const Kopete::FileTransferInfo& info);
diff --git a/kopete/protocols/msn/messageformatter.cpp b/kopete/protocols/msn/messageformatter.cpp
index 3a698ac4..7d830ea6 100644
--- a/kopete/protocols/msn/messageformatter.cpp
+++ b/kopete/protocols/msn/messageformatter.cpp
@@ -17,8 +17,8 @@
#include "p2p.h"
// Qt includes
-#include <qdatastream.h>
-#include <qregexp.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
// Kde includes
#include <kdebug.h>
@@ -26,13 +26,13 @@
using P2P::MessageFormatter;
using P2P::Message;
-MessageFormatter::MessageFormatter(QObject *parent, const char *name) : QObject(parent, name)
+MessageFormatter::MessageFormatter(TQObject *parent, const char *name) : TQObject(parent, name)
{}
MessageFormatter::~MessageFormatter()
{}
-Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
+Message MessageFormatter::readMessage(const TQByteArray& stream, bool compact)
{
Message inbound;
@@ -49,30 +49,30 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
}
// Retrieve the message header.
- QString messageHeader = QCString(stream.data(), index);
+ TQString messageHeader = TQCString(stream.data(), index);
// Retrieve the message mime version, content type,
// and p2p destination.
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(messageHeader);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType != "application/x-msnmsgrp2p")
return inbound;
// kdDebug(14140) << k_funcinfo << endl;
- regex = QRegExp("MIME-Version: (\\d.\\d)");
+ regex = TQRegExp("MIME-Version: (\\d.\\d)");
regex.search(messageHeader);
inbound.mimeVersion = regex.cap(1);
inbound.contentType = contentType;
- regex = QRegExp("P2P-Dest: ([^\r\n]*)");
+ regex = TQRegExp("P2P-Dest: ([^\r\n]*)");
regex.search(messageHeader);
- QString destination = regex.cap(1);
+ TQString destination = regex.cap(1);
}
- QDataStream reader(stream, IO_ReadOnly);
- reader.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream reader(stream, IO_ReadOnly);
+ reader.setByteOrder(TQDataStream::LittleEndian);
// Seek to the start position of the message
// transport header.
reader.device()->at(index);
@@ -108,7 +108,7 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
if(compact == false)
{
- reader.setByteOrder(QDataStream::BigEndian);
+ reader.setByteOrder(TQDataStream::BigEndian);
// Read the message application identifier from the stream.
reader >> inbound.applicationIdentifier;
@@ -120,16 +120,16 @@ Message MessageFormatter::readMessage(const QByteArray& stream, bool compact)
return inbound;
}
-void MessageFormatter::writeMessage(const Message& message, QByteArray& stream, bool compact)
+void MessageFormatter::writeMessage(const Message& message, TQByteArray& stream, bool compact)
{
// kdDebug(14140) << k_funcinfo << endl;
- QDataStream writer(stream, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(stream, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
if(compact == false)
{
- const QCString messageHeader = QString("MIME-Version: 1.0\r\n"
+ const TQCString messageHeader = TQString("MIME-Version: 1.0\r\n"
"Content-Type: application/x-msnmsgrp2p\r\n"
"P2P-Dest: " + message.destination + "\r\n"
"\r\n").utf8();
@@ -178,7 +178,7 @@ void MessageFormatter::writeMessage(const Message& message, QByteArray& stream,
if(compact == false)
{
// Seek to the message application identifier section.
- writer.setByteOrder(QDataStream::BigEndian);
+ writer.setByteOrder(TQDataStream::BigEndian);
// Write the message application identifier to the stream.
writer << message.applicationIdentifier;
diff --git a/kopete/protocols/msn/messageformatter.h b/kopete/protocols/msn/messageformatter.h
index 9eae8682..f86d679d 100644
--- a/kopete/protocols/msn/messageformatter.h
+++ b/kopete/protocols/msn/messageformatter.h
@@ -16,7 +16,7 @@
#ifndef MESSAGEFORMATTER_H
#define MESSAGEFORMATTER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace P2P{
class Message;
@@ -29,11 +29,11 @@ namespace P2P{
class MessageFormatter : public QObject
{ Q_OBJECT
public:
- MessageFormatter(QObject *parent = 0, const char *name = 0);
+ MessageFormatter(TQObject *parent = 0, const char *name = 0);
~MessageFormatter();
- Message readMessage(const QByteArray& stream, bool compact=false);
- void writeMessage(const Message& message, QByteArray& stream, bool compact=false);
+ Message readMessage(const TQByteArray& stream, bool compact=false);
+ void writeMessage(const Message& message, TQByteArray& stream, bool compact=false);
};
}
diff --git a/kopete/protocols/msn/msnaccount.cpp b/kopete/protocols/msn/msnaccount.cpp
index 01caec11..267cd0d7 100644
--- a/kopete/protocols/msn/msnaccount.cpp
+++ b/kopete/protocols/msn/msnaccount.cpp
@@ -31,10 +31,10 @@
#include <kmdcodec.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qvalidator.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
+#include <tqimage.h>
#include "msncontact.h"
#include "msnnotifysocket.h"
@@ -61,7 +61,7 @@
#include "avdevice/videodevicepool.h"
#endif
-MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const char *name )
+MSNAccount::MSNAccount( MSNProtocol *parent, const TQString& AccountID, const char *name )
: Kopete::PasswordedAccount ( parent, AccountID.lower(), 0, name )
{
m_notifySocket = 0L;
@@ -73,16 +73,16 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
setMyself( new MSNContact( this, accountId(), Kopete::ContactList::self()->myself() ) );
//myself()->setOnlineStatus( MSNProtocol::protocol()->FLN );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ),
- SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ),
- SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ),
+ TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ),
+ TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ));
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ));
- m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" );
- m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), QString::null, 0, this, SLOT( slotChangePublicName() ), this, "renameAction" );
- m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, SLOT( slotStartChat() ), this, "startChatAction" );
+ m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" );
+ m_changeDNAction = new KAction( i18n( "&Change Display Name..." ), TQString::null, 0, this, TQT_SLOT( slotChangePublicName() ), this, "renameAction" );
+ m_startChatAction = new KAction( i18n( "&Start Chat..." ), "mail_generic", 0, this, TQT_SLOT( slotStartChat() ), this, "startChatAction" );
KConfigGroup *config=configGroup();
@@ -92,7 +92,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
m_reverseList = config->readListEntry( "reverseList" ) ;
// Load the avatar
- m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(QRegExp("[./~]"),"-") +".png" );
+ m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(TQRegExp("[./~]"),"-") +".png" );
resetPictureObject(true);
static_cast<MSNContact *>( myself() )->setInfo( "PHH", config->readEntry("PHH") );
@@ -103,10 +103,10 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
//construct the group list
//Before 2003-11-14 the MSN server allowed us to download the group list without downloading the whole contactlist, but it's not possible anymore
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
for ( Kopete::Group *g = groupList.first(); g; g = groupList.next() )
{
- QString groupGuid=g->pluginData( protocol(), accountId() + " id" );
+ TQString groupGuid=g->pluginData( protocol(), accountId() + " id" );
if ( !groupGuid.isEmpty() )
m_groupList.insert( groupGuid , g );
}
@@ -124,7 +124,7 @@ MSNAccount::MSNAccount( MSNProtocol *parent, const QString& AccountID, const cha
}
-QString MSNAccount::serverName()
+TQString MSNAccount::serverName()
{
return configGroup()->readEntry( "serverName" , "messenger.hotmail.com" );
}
@@ -139,12 +139,12 @@ bool MSNAccount::useHttpMethod() const
return configGroup()->readBoolEntry( "useHttpMethod" , false );
}
-QString MSNAccount::myselfClientId() const
+TQString MSNAccount::myselfClientId() const
{
- return QString::number(m_clientId, 10);
+ return TQString::number(m_clientId, 10);
}
-void MSNAccount::connectWithPassword( const QString &passwd )
+void MSNAccount::connectWithPassword( const TQString &passwd )
{
m_newContactList=false;
if ( isConnected() )
@@ -181,13 +181,13 @@ void MSNAccount::connectWithPassword( const QString &passwd )
createNotificationServer(serverName(), serverPort());
}
-void MSNAccount::createNotificationServer( const QString &host, uint port )
+void MSNAccount::createNotificationServer( const TQString &host, uint port )
{
if(m_notifySocket) //we are switching from one to another notifysocket.
{
//remove every slots to that socket, so we won't delete receive signals
// from the old socket thinking they are from the new one
- QObject::disconnect( m_notifySocket , 0, this, 0 );
+ TQObject::disconnect( m_notifySocket , 0, this, 0 );
m_notifySocket->deleteLater(); //be sure it will be deleted
m_notifySocket=0L;
}
@@ -200,36 +200,36 @@ void MSNAccount::createNotificationServer( const QString &host, uint port )
m_notifySocket = new MSNNotifySocket( this, accountId() , m_password);
m_notifySocket->setUseHttpMethod( useHttpMethod() );
- QObject::connect( m_notifySocket, SIGNAL( groupAdded( const QString&, const QString& ) ),
- SLOT( slotGroupAdded( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupRenamed( const QString&, const QString& ) ),
- SLOT( slotGroupRenamed( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupListed( const QString&, const QString& ) ),
- SLOT( slotGroupAdded( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( groupRemoved( const QString& ) ),
- SLOT( slotGroupRemoved( const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( contactList(const QString&, const QString&, const QString&, uint, const QString& ) ),
- SLOT( slotContactListed(const QString&, const QString&, const QString&, uint, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL(contactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotContactAdded(const QString&, const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( contactRemoved(const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotContactRemoved(const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ),
- SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) );
- QObject::connect( m_notifySocket, SIGNAL( invitedToChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ),
- SLOT( slotCreateChat( const QString&, const QString&, const QString&, const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( startChat( const QString&, const QString& ) ),
- SLOT( slotCreateChat( const QString&, const QString& ) ) );
- QObject::connect( m_notifySocket, SIGNAL( socketClosed() ),
- SLOT( slotNotifySocketClosed() ) );
- QObject::connect( m_notifySocket, SIGNAL( newContactList() ),
- SLOT( slotNewContactList() ) );
- QObject::connect( m_notifySocket, SIGNAL( receivedNotificationServer(const QString&, uint ) ),
- SLOT(createNotificationServer(const QString&, uint ) ) );
- QObject::connect( m_notifySocket, SIGNAL( hotmailSeted( bool ) ),
- m_openInboxAction, SLOT( setEnabled( bool ) ) );
- QObject::connect( m_notifySocket, SIGNAL( errorMessage(int, const QString& ) ),
- SLOT( slotErrorMessageReceived(int, const QString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupAdded( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRenamed( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupRenamed( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupListed( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotGroupAdded( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( groupRemoved( const TQString& ) ),
+ TQT_SLOT( slotGroupRemoved( const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( contactList(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ),
+ TQT_SLOT( slotContactListed(const TQString&, const TQString&, const TQString&, uint, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL(contactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotContactAdded(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( contactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotContactRemoved(const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( statusChanged( const Kopete::OnlineStatus & ) ),
+ TQT_SLOT( slotStatusChanged( const Kopete::OnlineStatus & ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( invitedToChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotCreateChat( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( startChat( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotCreateChat( const TQString&, const TQString& ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( socketClosed() ),
+ TQT_SLOT( slotNotifySocketClosed() ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( newContactList() ),
+ TQT_SLOT( slotNewContactList() ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( receivedNotificationServer(const TQString&, uint ) ),
+ TQT_SLOT(createNotificationServer(const TQString&, uint ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( hotmailSeted( bool ) ),
+ m_openInboxAction, TQT_SLOT( setEnabled( bool ) ) );
+ TQObject::connect( m_notifySocket, TQT_SIGNAL( errorMessage(int, const TQString& ) ),
+ TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) );
m_notifySocket->setStatus( m_connectstatus );
m_notifySocket->connect(host, port);
@@ -269,7 +269,7 @@ KActionMenu * MSNAccount::actionMenu()
#if !defined NDEBUG
KActionMenu *debugMenu = new KActionMenu( "Debug", m_actionMenu );
debugMenu->insert( new KAction( i18n( "Send Raw C&ommand..." ), 0,
- this, SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) );
+ this, TQT_SLOT( slotDebugRawCommand() ), debugMenu, "m_debugRawCommand" ) );
m_actionMenu->popupMenu()->insertSeparator();
m_actionMenu->insert( debugMenu );
#endif
@@ -283,7 +283,7 @@ MSNNotifySocket *MSNAccount::notifySocket()
}
-void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason)
+void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason)
{
kdDebug( 14140 ) << k_funcinfo << status.description() << endl;
@@ -298,7 +298,7 @@ void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const QSt
// since it's the same.
if( reason.contains("[Music]") )
{
- QString personalMessage = reason.section("[Music]", 1);
+ TQString personalMessage = reason.section("[Music]", 1);
setPersonalMessage( MSNProtocol::PersonalMessageMusic, personalMessage );
// Don't send un-needed status change.
@@ -329,8 +329,8 @@ void MSNAccount::slotStartChat()
{
bool ok;
- QString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ),
- i18n( "Please enter the email address of the person with whom you want to chat:" ), QString::null, &ok ).lower();
+ TQString handle = KInputDialog::getText( i18n( "Start Chat - MSN Plugin" ),
+ i18n( "Please enter the email address of the person with whom you want to chat:" ), TQString::null, &ok ).lower();
if ( ok )
{
if ( MSNProtocol::validContactId( handle ) )
@@ -356,7 +356,7 @@ void MSNAccount::slotDebugRawCommand()
MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L );
int result = dlg->exec();
- if ( result == QDialog::Accepted && m_notifySocket )
+ if ( result == TQDialog::Accepted && m_notifySocket )
{
m_notifySocket->sendCommand( dlg->command(), dlg->params(),
dlg->addId(), dlg->msg().replace( "\n", "\r\n" ).utf8() );
@@ -374,7 +374,7 @@ void MSNAccount::slotChangePublicName()
}
bool ok;
- QString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ),
+ TQString name = KInputDialog::getText( i18n( "Change Display Name - MSN Plugin" ),
i18n( "Enter the new display name by which you want to be visible to your friends on MSN:" ),
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(), &ok );
@@ -416,8 +416,8 @@ void MSNAccount::slotNotifySocketClosed()
if(reason == Kopete::Account::OtherClient)
{ //close all chat sessions, so new message will arive to the other client.
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- QValueList<Kopete::ChatSession*>::Iterator it;
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ TQValueList<Kopete::ChatSession*>::Iterator it;
for (it=sessions.begin() ; it != sessions.end() ; it++ )
{
MSNChatSession *msnCS = dynamic_cast<MSNChatSession *>( *it );
@@ -449,7 +449,7 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status )
{
m_newContactList=false;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( *it );
@@ -470,9 +470,9 @@ void MSNAccount::slotStatusChanged( const Kopete::OnlineStatus &status )
}
-void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage )
+void MSNAccount::slotPersonalMessageChanged( const TQString& personalMessage )
{
- QString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ;
+ TQString oldPersonalMessage=myself()->property(MSNProtocol::protocol()->propPersonalMessage).value().toString() ;
if ( personalMessage != oldPersonalMessage )
{
myself()->setProperty( MSNProtocol::protocol()->propPersonalMessage, personalMessage );
@@ -480,15 +480,15 @@ void MSNAccount::slotPersonalMessageChanged( const QString& personalMessage )
}
}
-void MSNAccount::setPublicName( const QString &publicName )
+void MSNAccount::setPublicName( const TQString &publicName )
{
if ( m_notifySocket )
{
- m_notifySocket->changePublicName( publicName, QString::null );
+ m_notifySocket->changePublicName( publicName, TQString::null );
}
}
-void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage )
+void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage )
{
if ( m_notifySocket )
{
@@ -501,7 +501,7 @@ void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, cons
}*/
}
-void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupGuid )
+void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &groupGuid )
{
if ( m_groupList.contains( groupGuid ) )
{
@@ -512,11 +512,11 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
}
//--------- Find the appropriate Kopete::Group, or create one ---------//
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
Kopete::Group *fallBack = 0L;
//check if we have one in the old group list. if yes, update the id translate map.
- for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
+ for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
{
Kopete::Group *g=it.data();
if (g && g->pluginData( protocol(), accountId() + " displayName" ) == groupName &&
@@ -543,7 +543,7 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
if ( g->pluginData( protocol(), accountId() + " id" ).toUInt() == groupNumber )
{
m_groupList.insert( groupNumber, g );
- QString oldGroupName;
+ TQString oldGroupName;
if ( g->pluginData( protocol(), accountId() + " displayName" ) != groupName )
{
// The displayName of the group has been modified by another client
@@ -589,14 +589,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
// We have pending groups that we need add a contact to
if ( tmp_addToNewGroup.contains(groupName) )
{
- QStringList list=tmp_addToNewGroup[groupName];
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list=tmp_addToNewGroup[groupName];
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString contactId = *it;
+ TQString contactId = *it;
kdDebug( 14140 ) << k_funcinfo << "Adding to new group: " << contactId << endl;
MSNContact *c = static_cast<MSNContact *>(contacts()[contactId]);
if(c && c->hasProperty(MSNProtocol::protocol()->propGuid.key()) )
- notifySocket()->addContact( contactId, MSNProtocol::FL, QString::null, c->guid(), groupGuid );
+ notifySocket()->addContact( contactId, MSNProtocol::FL, TQString::null, c->guid(), groupGuid );
else
{
// If we get to here, we're currently adding a new contact, add the groupGUID to the groupList
@@ -604,14 +604,14 @@ void MSNAccount::slotGroupAdded( const QString& groupName, const QString &groupG
if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupGuid);
else
- tmp_addNewContactToGroup.insert(contactId, QStringList(groupGuid) );
+ tmp_addNewContactToGroup.insert(contactId, TQStringList(groupGuid) );
}
}
tmp_addToNewGroup.remove(groupName);
}
}
-void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& groupName )
+void MSNAccount::slotGroupRenamed( const TQString &groupGuid, const TQString& groupName )
{
if ( m_groupList.contains( groupGuid ) )
{
@@ -625,16 +625,16 @@ void MSNAccount::slotGroupRenamed( const QString &groupGuid, const QString& grou
}
}
-void MSNAccount::slotGroupRemoved( const QString& groupGuid )
+void MSNAccount::slotGroupRemoved( const TQString& groupGuid )
{
if ( m_groupList.contains( groupGuid ) )
{
- m_groupList[ groupGuid ]->setPluginData( protocol(), QMap<QString,QString>() );
+ m_groupList[ groupGuid ]->setPluginData( protocol(), TQMap<TQString,TQString>() );
m_groupList.remove( groupGuid );
}
}
-void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd )
+void MSNAccount::addGroup( const TQString &groupName, const TQString& contactToAdd )
{
if ( !contactToAdd.isNull() )
{
@@ -648,7 +648,7 @@ void MSNAccount::addGroup( const QString &groupName, const QString& contactToAdd
}
else
{
- tmp_addToNewGroup.insert(groupName,QStringList(contactToAdd));
+ tmp_addToNewGroup.insert(groupName,TQStringList(contactToAdd));
kdDebug( 14140 ) << k_funcinfo << "preparing to add " << groupName << " for " << contactToAdd << endl;
}
}
@@ -682,7 +682,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() )
{
- QString groupGuid = g->pluginData( protocol(), accountId() + " id" );
+ TQString groupGuid = g->pluginData( protocol(), accountId() + " id" );
if ( !m_groupList.contains( groupGuid ) )
{
// the group is maybe already removed in the server
@@ -703,7 +703,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " id", "" );
Kopete::Group::topLevel()->setPluginData( protocol(), accountId() + " displayName", g->pluginData( protocol(), accountId() + " displayName" ) );
- g->setPluginData( protocol(), accountId() + " id", QString::null ); // the group should be soon deleted, but make sure
+ g->setPluginData( protocol(), accountId() + " id", TQString::null ); // the group should be soon deleted, but make sure
return;
}
@@ -712,7 +712,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
{
bool still_have_contact=false;
// if contact are contains only in the group we are removing, abort the
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( it.current() );
@@ -734,10 +734,10 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
void MSNAccount::slotNewContactList()
{
m_oldGroupList=m_groupList;
- for(QMap<QString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
+ for(TQMap<TQString, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; it != m_oldGroupList.end() ; ++it )
{ //they are about to be changed
if(it.data())
- it.data()->setPluginData( protocol(), accountId() + " id", QString::null );
+ it.data()->setPluginData( protocol(), accountId() + " id", TQString::null );
}
m_allowList.clear();
@@ -745,13 +745,13 @@ void MSNAccount::slotNewContactList()
m_reverseList.clear();
m_groupList.clear();
KConfigGroup *config=configGroup();
- config->writeEntry( "blockList" , QString::null ) ;
- config->writeEntry( "allowList" , QString::null );
- config->writeEntry( "reverseList" , QString::null );
+ config->writeEntry( "blockList" , TQString::null ) ;
+ config->writeEntry( "allowList" , TQString::null );
+ config->writeEntry( "reverseList" , TQString::null );
// clear all date information which will be received.
// if the information is not anymore on the server, it will not be received
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( *it );
@@ -759,15 +759,15 @@ void MSNAccount::slotNewContactList()
c->setAllowed( false );
c->setReversed( false );
c->setDeleted( true );
- c->setInfo( "PHH", QString::null );
- c->setInfo( "PHW", QString::null );
- c->setInfo( "PHM", QString::null );
+ c->setInfo( "PHH", TQString::null );
+ c->setInfo( "PHW", TQString::null );
+ c->setInfo( "PHM", TQString::null );
c->removeProperty( MSNProtocol::protocol()->propGuid );
}
m_newContactList=true;
}
-void MSNAccount::slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups )
+void MSNAccount::slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups )
{
// On empty lists handle might be empty, ignore that
// ignore also the myself contact.
@@ -778,7 +778,7 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
if ( lists & 1 ) // FL
{
- QStringList contactGroups = QStringList::split( ",", groups, false );
+ TQStringList contactGroups = TQStringList::split( ",", groups, false );
if ( c )
{
if( !c->metaContact() )
@@ -799,11 +799,11 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
c->removeProperty( Kopete::Global::Properties::self()->nickName() );
c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid);
- const QMap<QString, Kopete::Group *> oldServerGroups = c->serverGroups();
+ const TQMap<TQString, Kopete::Group *> oldServerGroups = c->serverGroups();
c->clearServerGroups();
- for ( QStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it )
+ for ( TQStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it )
{
- QString newServerGroupID = *it;
+ TQString newServerGroupID = *it;
if(m_groupList.contains(newServerGroupID))
{
Kopete::Group *newServerGroup=m_groupList[ newServerGroupID ] ;
@@ -816,12 +816,12 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
}
}
- for ( QMap<QString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it )
+ for ( TQMap<TQString, Kopete::Group *>::ConstIterator it = oldServerGroups.begin(); it != oldServerGroups.end(); ++it )
{
Kopete::Group *old_group=m_oldGroupList[it.key()];
if(old_group)
{
- QString oldnewID=old_group->pluginData(protocol() , accountId() +" id");
+ TQString oldnewID=old_group->pluginData(protocol() , accountId() +" id");
if ( !oldnewID.isEmpty() && contactGroups.contains( oldnewID ) )
continue; //ok, it's correctn no need to do anything.
@@ -847,10 +847,10 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
c->removeProperty( Kopete::Global::Properties::self()->nickName() );
c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid );
- for ( QStringList::Iterator it = contactGroups.begin();
+ for ( TQStringList::Iterator it = contactGroups.begin();
it != contactGroups.end(); ++it )
{
- QString groupGuid = *it;
+ TQString groupGuid = *it;
if(m_groupList.contains(groupGuid))
{
c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] );
@@ -874,25 +874,25 @@ void MSNAccount::slotContactListed( const QString& handle, const QString& public
}
}
if ( lists & 2 )
- slotContactAdded( handle, "AL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "AL", publicName, TQString::null, TQString::null );
else if(c)
c->setAllowed(false);
if ( lists & 4 )
- slotContactAdded( handle, "BL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "BL", publicName, TQString::null, TQString::null );
else if(c)
c->setBlocked(false);
if ( lists & 8 )
- slotContactAdded( handle, "RL", publicName, QString::null, QString::null );
+ slotContactAdded( handle, "RL", publicName, TQString::null, TQString::null );
else if(c)
c->setReversed(false);
if ( lists & 16 ) // This contact is on the pending list. Add to the reverse list and delete from the pending list
{
- notifySocket()->addContact( handle, MSNProtocol::RL, QString::null, QString::null, QString::null );
- notifySocket()->removeContact( handle, MSNProtocol::PL, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::RL, TQString::null, TQString::null, TQString::null );
+ notifySocket()->removeContact( handle, MSNProtocol::PL, TQString::null, TQString::null );
}
}
-void MSNAccount::slotContactAdded( const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid )
+void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid )
{
if ( list == "FL" )
{
@@ -912,17 +912,17 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
// Add the new contact to the group he belongs.
if ( tmp_addNewContactToGroup.contains(handle) )
{
- QStringList list = tmp_addNewContactToGroup[handle];
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = tmp_addNewContactToGroup[handle];
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
- QString groupGuid = *it;
+ TQString groupGuid = *it;
// If the group didn't exist yet (yay for async operations), don't add the contact to the group
// Let slotGroupAdded do it.
if( m_groupList.contains(groupGuid) )
{
kdDebug( 14140 ) << k_funcinfo << "Adding " << handle << " to group: " << groupGuid << endl;
- notifySocket()->addContact( handle, MSNProtocol::FL, QString::null, contactGuid, groupGuid );
+ notifySocket()->addContact( handle, MSNProtocol::FL, TQString::null, contactGuid, groupGuid );
c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] );
@@ -971,7 +971,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
if ( !handle.isEmpty() && !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
kdDebug(14140) << k_funcinfo << "Trying to add contact to AL. " << endl;
- notifySocket()->addContact(handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact(handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
}
}
else if ( list == "BL" )
@@ -1006,14 +1006,14 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
// before I declare it good :- )
if ( !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
- QString nick; //in most case, the public name is not know
+ TQString nick; //in most case, the public name is not know
if(publicName!=handle) // so we don't whos it if it is not know
nick=publicName;
Kopete::UI::ContactAddedNotifyDialog *dialog=
new Kopete::UI::ContactAddedNotifyDialog( handle,nick,this,
Kopete::UI::ContactAddedNotifyDialog::InfoButton );
- QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),
- this,SLOT(slotContactAddedNotifyDialogClosed(const QString& )));
+ TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),
+ this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& )));
dialog->show();
}
}
@@ -1026,7 +1026,7 @@ void MSNAccount::slotContactAdded( const QString& handle, const QString& list, c
}
}
-void MSNAccount::slotContactRemoved( const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid )
+void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid )
{
kdDebug( 14140 ) << k_funcinfo << "handle: " << handle << " list: " << list << " contact-uid: " << contactGuid << endl;
MSNContact *c=static_cast<MSNContact *>( contacts()[ handle ] );
@@ -1035,7 +1035,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
m_blockList.remove( handle );
configGroup()->writeEntry( "blockList" , m_blockList ) ;
if ( !m_allowList.contains( handle ) )
- notifySocket()->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
if(c)
c->setBlocked( false );
@@ -1045,7 +1045,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
m_allowList.remove( handle );
configGroup()->writeEntry( "allowList" , m_allowList ) ;
if ( !m_blockList.contains( handle ) )
- notifySocket()->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null );
+ notifySocket()->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
if(c)
c->setAllowed( false );
@@ -1063,7 +1063,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
/*
InfoWidget *info = new InfoWidget( 0 );
info->title->setText( "<b>" + i18n( "Contact removed!" ) +"</b>" );
- QString dummy;
+ TQString dummy;
dummy = "<center><b>" + imContact->getPublicName() + "( " +imContact->getHandle() +" )</b></center><br>";
dummy += i18n( "has removed you from his contact list!" ) + "<br>";
dummy += i18n( "This contact is now removed from your contact list" );
@@ -1077,15 +1077,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
{
// The FL list only use the contact GUID, use the contact referenced by the GUID.
MSNContact *contactRemoved = findContactByGuid(contactGuid);
- QStringList groupGuidList;
+ TQStringList groupGuidList;
bool deleteContact = groupGuid.isEmpty() ? true : false; // Delete the contact when the group GUID is empty.
// Remove the contact from the contact list for all the group he is a member.
if( groupGuid.isEmpty() )
{
if(contactRemoved)
{
- QPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups();
- for( QPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it )
+ TQPtrList<Kopete::Group> groupList = contactRemoved->metaContact()->groups();
+ for( TQPtrList<Kopete::Group>::Iterator it = groupList.begin(); it != groupList.end(); ++it )
{
Kopete::Group *group = *it;
if ( !group->pluginData( protocol(), accountId() + " id" ).isEmpty() )
@@ -1102,7 +1102,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
if( !groupGuidList.isEmpty() )
{
- QStringList::const_iterator stringIt;
+ TQStringList::const_iterator stringIt;
for( stringIt = groupGuidList.begin(); stringIt != groupGuidList.end(); ++stringIt )
{
// Contact is removed from the FL list, remove it from the group
@@ -1114,7 +1114,7 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
{
bool still_have_contact=false;
// if contact are contains only in the group we are removing, abort the
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c2 = static_cast<MSNContact *>( it.current() );
@@ -1137,15 +1137,15 @@ void MSNAccount::slotContactRemoved( const QString& handle, const QString& list,
}
}
-void MSNAccount::slotCreateChat( const QString& address, const QString& auth )
+void MSNAccount::slotCreateChat( const TQString& address, const TQString& auth )
{
slotCreateChat( 0L, address, auth, m_msgHandle.first(), m_msgHandle.first() );
}
-void MSNAccount::slotCreateChat( const QString& ID, const QString& address, const QString& auth,
- const QString& handle_, const QString& publicName )
+void MSNAccount::slotCreateChat( const TQString& ID, const TQString& address, const TQString& auth,
+ const TQString& handle_, const TQString& publicName )
{
- QString handle = handle_.lower();
+ TQString handle = handle_.lower();
if ( handle.isEmpty() )
{
@@ -1189,7 +1189,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons
if ( !ID.isEmpty() && notifyNewChat )
{
// this temporary message should open the window if they not exist
- QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
+ TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
Kopete::Message tmpMsg = Kopete::Message( c, manager->members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
manager->appendMessage( tmpMsg );
}
@@ -1200,7 +1200,7 @@ void MSNAccount::slotCreateChat( const QString& ID, const QString& address, cons
m_msgHandle.pop_front();
}
-void MSNAccount::slotStartChatSession( const QString& handle )
+void MSNAccount::slotStartChatSession( const TQString& handle )
{
// First create a message manager, because we might get an existing
// manager back, in which case we likely also have an active switchboard
@@ -1218,7 +1218,7 @@ void MSNAccount::slotStartChatSession( const QString& handle )
}
}
-void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle)
+void MSNAccount::slotContactAddedNotifyDialogClosed(const TQString& handle)
{
const Kopete::UI::ContactAddedNotifyDialog *dialog =
dynamic_cast<const Kopete::UI::ContactAddedNotifyDialog *>(sender());
@@ -1242,29 +1242,29 @@ void MSNAccount::slotContactAddedNotifyDialogClosed(const QString& handle)
if ( !dialog->authorized() )
{
if ( m_allowList.contains( handle ) )
- m_notifySocket->removeContact( handle, MSNProtocol::AL, QString::null, QString::null );
+ m_notifySocket->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null );
else if ( !m_blockList.contains( handle ) )
- m_notifySocket->addContact( handle, MSNProtocol::BL, QString::null, QString::null, QString::null );
+ m_notifySocket->addContact( handle, MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
}
else
{
if ( m_blockList.contains( handle ) )
- m_notifySocket->removeContact( handle, MSNProtocol::BL, QString::null, QString::null );
+ m_notifySocket->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null );
else if ( !m_allowList.contains( handle ) )
- m_notifySocket->addContact( handle, MSNProtocol::AL, QString::null, QString::null, QString::null );
+ m_notifySocket->addContact( handle, MSNProtocol::AL, TQString::null, TQString::null, TQString::null );
}
}
-void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant &value )
+void MSNAccount::slotGlobalIdentityChanged( const TQString &key, const TQVariant &value )
{
if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) )
{
if(key == Kopete::Global::Properties::self()->nickName().key())
{
- QString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
- QString newNick = value.toString();
+ TQString oldNick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString newNick = value.toString();
if(newNick != oldNick)
{
@@ -1280,9 +1280,9 @@ void MSNAccount::slotGlobalIdentityChanged( const QString &key, const QVariant &
}
}
-void MSNAccount::slotErrorMessageReceived( int type, const QString &msg )
+void MSNAccount::slotErrorMessageReceived( int type, const TQString &msg )
{
- QString caption = i18n( "MSN Plugin" );
+ TQString caption = i18n( "MSN Plugin" );
// Use different notification type based on the error context.
switch(type)
@@ -1316,7 +1316,7 @@ void MSNAccount::slotErrorMessageReceived( int type, const QString &msg )
}
}
-bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *metaContact )
+bool MSNAccount::createContact( const TQString &contactId, Kopete::MetaContact *metaContact )
{
if ( !metaContact->isTemporary() && m_notifySocket)
{
@@ -1339,14 +1339,14 @@ bool MSNAccount::createContact( const QString &contactId, Kopete::MetaContact *m
}
-void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList)
+void MSNAccount::addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList)
{
// First of all, fill the temporary group list. The contact will be moved to his group(s).
// When we receive back his contact GUID(required to move a contact between groups)
for( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
// TODO: It it time that libkopete generate a unique ID that contains protocols, account and contact id.
- QString groupId = group->pluginData( protocol(), accountId() + " id" );
+ TQString groupId = group->pluginData( protocol(), accountId() + " id" );
// If the groupId is empty, that's mean the Kopete group is not on the MSN server.
if( !groupId.isEmpty() )
{
@@ -1354,8 +1354,8 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
if( !m_groupList.contains(groupId) )
{
// Clear the group plugin data.
- group->setPluginData( protocol() , accountId() + " id" , QString::null);
- group->setPluginData( protocol() , accountId() + " displayName" , QString::null);
+ group->setPluginData( protocol() , accountId() + " id" , TQString::null);
+ group->setPluginData( protocol() , accountId() + " displayName" , TQString::null);
kdDebug( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" << groupId << " does not seems to be anymore on the server" << endl;
// Add the group on MSN server, will fix the corruption.
@@ -1368,7 +1368,7 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupId);
else
- tmp_addNewContactToGroup.insert(contactId, QStringList(groupId) );
+ tmp_addNewContactToGroup.insert(contactId, TQStringList(groupId) );
}
}
else
@@ -1383,13 +1383,13 @@ void MSNAccount::addContactServerside(const QString &contactId, QPtrList<Kopete:
// After add the contact to the top-level, it will be moved to required groups later.
kdDebug( 14140 ) << k_funcinfo << "Add the contact on the server " << endl;
- m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, QString::null, QString::null );
+ m_notifySocket->addContact( contactId, MSNProtocol::FL, contactId, TQString::null, TQString::null );
}
-MSNContact *MSNAccount::findContactByGuid(const QString &contactGuid)
+MSNContact *MSNAccount::findContactByGuid(const TQString &contactGuid)
{
kdDebug(14140) << k_funcinfo << "Looking for " << contactGuid << endl;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
MSNContact *c = dynamic_cast<MSNContact *>( it.current() );
@@ -1412,17 +1412,17 @@ bool MSNAccount::isHotmail() const
return m_openInboxAction->isEnabled();
}
-QString MSNAccount::pictureUrl()
+TQString MSNAccount::pictureUrl()
{
return m_pictureFilename;
}
-void MSNAccount::setPictureUrl(const QString &url)
+void MSNAccount::setPictureUrl(const TQString &url)
{
m_pictureFilename = url;
}
-QString MSNAccount::pictureObject()
+TQString MSNAccount::pictureObject()
{
if(m_pictureObj.isNull())
resetPictureObject(true); //silent=true to keep infinite loop away
@@ -1431,7 +1431,7 @@ QString MSNAccount::pictureObject()
void MSNAccount::resetPictureObject(bool silent, bool force)
{
- QString old=m_pictureObj;
+ TQString old=m_pictureObj;
if(!configGroup()->readBoolEntry("exportCustomPicture") && !force)
{
@@ -1441,7 +1441,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
else
{
// Check if the picture is a 96x96 image, if not scale, crop and save.
- QImage picture(m_pictureFilename);
+ TQImage picture(m_pictureFilename);
if(picture.isNull())
{
m_pictureObj="";
@@ -1452,7 +1452,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
if(picture.width() != 96 || picture.height() != 96)
{
// Save to a new location in msnpictures.
- QString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) );
+ TQString newLocation( locateLocal( "appdata", "msnpictures/"+ KURL(m_pictureFilename).fileName().lower() ) );
// Scale and crop the picture.
picture = MSNProtocol::protocol()->scalePicture(picture);
@@ -1467,7 +1467,7 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
}
}
- QFile pictFile( m_pictureFilename );
+ TQFile pictFile( m_pictureFilename );
if(!pictFile.open(IO_ReadOnly))
{
m_pictureObj="";
@@ -1475,12 +1475,12 @@ void MSNAccount::resetPictureObject(bool silent, bool force)
}
else
{
- QByteArray ar=pictFile.readAll();
- QString sha1d= QString((KCodecs::base64Encode(SHA1::hash(ar))));
+ TQByteArray ar=pictFile.readAll();
+ TQString sha1d= TQString((KCodecs::base64Encode(SHA1::hash(ar))));
- QString size=QString::number( pictFile.size() );
- QString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d;
- m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ QString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>";
+ TQString size=TQString::number( pictFile.size() );
+ TQString all= "Creator"+accountId()+"Size"+size+"Type3Locationkopete.tmpFriendlyAAA=SHA1D"+ sha1d;
+ m_pictureObj="<msnobj Creator=\"" + accountId() + "\" Size=\"" + size + "\" Type=\"3\" Location=\"kopete.tmp\" Friendly=\"AAA=\" SHA1D=\""+sha1d+"\" SHA1C=\""+ TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8()))) +"\"/>";
myself()->setProperty( Kopete::Global::Properties::self()->photo() , m_pictureFilename );
}
}
diff --git a/kopete/protocols/msn/msnaccount.h b/kopete/protocols/msn/msnaccount.h
index 7fbee16b..5f7352e3 100644
--- a/kopete/protocols/msn/msnaccount.h
+++ b/kopete/protocols/msn/msnaccount.h
@@ -19,7 +19,7 @@
#ifndef MSNACCOUNT_H
#define MSNACCOUNT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kopetepasswordedaccount.h"
@@ -42,7 +42,7 @@ class MSNAccount : public Kopete::PasswordedAccount
Q_OBJECT
public:
- MSNAccount( MSNProtocol *parent, const QString &accountID, const char *name = 0L );
+ MSNAccount( MSNProtocol *parent, const TQString &accountID, const char *name = 0L );
/*
* return the menu for this account
@@ -53,13 +53,13 @@ public:
/**
* change the publicName to this new name
*/
- void setPublicName( const QString &name );
- void setPersonalMessage(MSNProtocol::PersonalMessageType type, const QString &personalMessage );
+ void setPublicName( const TQString &name );
+ void setPersonalMessage(MSNProtocol::PersonalMessageType type, const TQString &personalMessage );
/**
* Returns the address of the MSN server
*/
- QString serverName();
+ TQString serverName();
/**
* Returns the address of the MSN server port
@@ -77,17 +77,17 @@ public:
/**
* Return the picture url.
*/
- QString pictureUrl();
+ TQString pictureUrl();
/**
* Set the picture url.
*/
- void setPictureUrl(const QString &url);
+ void setPictureUrl(const TQString &url);
/**
* return the <msnobj> tag of the display picture
*/
- QString pictureObject();
+ TQString pictureObject();
/**
* reset the <msnobj>. This method should be called if the displayimage has changed
@@ -107,25 +107,25 @@ public:
* Return the client ID for the myself contact of this account.
* It is dynamic to see if we really have a webcam or not.
*/
- QString myselfClientId() const;
+ TQString myselfClientId() const;
public slots:
- virtual void connectWithPassword( const QString &password ) ;
+ virtual void connectWithPassword( const TQString &password ) ;
virtual void disconnect() ;
- virtual void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = QString::null);
+ virtual void setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason = TQString::null);
/**
* Ask to the account to create a new chat session
*/
- void slotStartChatSession( const QString& handle );
+ void slotStartChatSession( const TQString& handle );
/**
* Single slot to display error message.
*/
- void slotErrorMessageReceived( int type, const QString &msg );
+ void slotErrorMessageReceived( int type, const TQString &msg );
protected:
- virtual bool createContact( const QString &contactId, Kopete::MetaContact *parentContact );
+ virtual bool createContact( const TQString &contactId, Kopete::MetaContact *parentContact );
private slots:
@@ -144,36 +144,36 @@ private slots:
// notifySocket related
void slotStatusChanged( const Kopete::OnlineStatus &status );
void slotNotifySocketClosed();
- void slotPersonalMessageChanged(const QString& personalMessage);
- void slotContactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid );
- void slotContactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString &groupGuid );
- void slotContactListed( const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups );
+ void slotPersonalMessageChanged(const TQString& personalMessage);
+ void slotContactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid );
+ void slotContactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString &groupGuid );
+ void slotContactListed( const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups );
void slotNewContactList();
/**
* The group has successful renamed in the server
* groupName: is new new group name
*/
- void slotGroupRenamed(const QString &groupGuid, const QString& groupName );
+ void slotGroupRenamed(const TQString &groupGuid, const TQString& groupName );
/**
* A new group was created on the server (or received durring an LSG command)
*/
- void slotGroupAdded( const QString& groupName, const QString &groupGuid );
+ void slotGroupAdded( const TQString& groupName, const TQString &groupGuid );
/**
* Group was removed from the server
*/
- void slotGroupRemoved( const QString &groupGuid );
+ void slotGroupRemoved( const TQString &groupGuid );
/**
* Incoming RING command: connect to the Switchboard server and send
* the startChat signal
*/
- void slotCreateChat( const QString& sessionID, const QString& address, const QString& auth,
- const QString& handle, const QString& publicName );
+ void slotCreateChat( const TQString& sessionID, const TQString& address, const TQString& auth,
+ const TQString& handle, const TQString& publicName );
/**
* Incoming XFR command: this is an result from
* slotStartChatSession(handle)
* connect to the switchboard server and sen startChat signal
*/
- void slotCreateChat( const QString& address, const QString& auth);
+ void slotCreateChat( const TQString& address, const TQString& auth);
// ui related
@@ -190,17 +190,17 @@ private slots:
/**
* add contact ui
*/
- void slotContactAddedNotifyDialogClosed( const QString &handle);
+ void slotContactAddedNotifyDialogClosed( const TQString &handle);
/**
* When the dispatch server sends us the notification server to use.
*/
- void createNotificationServer( const QString &host, uint port );
+ void createNotificationServer( const TQString &host, uint port );
/**
* When a global identity key get changed.
*/
- void slotGlobalIdentityChanged( const QString &key, const QVariant &value );
+ void slotGlobalIdentityChanged( const TQString &key, const TQVariant &value );
private:
MSNNotifySocket *m_notifySocket;
@@ -211,7 +211,7 @@ private:
// status which will be using for connecting
Kopete::OnlineStatus m_connectstatus;
- QStringList m_msgHandle;
+ TQStringList m_msgHandle;
bool m_newContactList;
@@ -220,35 +220,35 @@ private:
* Add the contact on the server in the given groups.
* this is a helper function called bu createContact and slotStatusChanged
*/
- void addContactServerside(const QString &contactId, QPtrList<Kopete::Group> groupList);
+ void addContactServerside(const TQString &contactId, TQPtrList<Kopete::Group> groupList);
public: //FIXME: should be private
- QMap<QString, Kopete::Group*> m_groupList;
+ TQMap<TQString, Kopete::Group*> m_groupList;
- void addGroup( const QString &groupName, const QString &contactToAdd = QString::null );
+ void addGroup( const TQString &groupName, const TQString &contactToAdd = TQString::null );
/**
* Find and retrive a MSNContact by its contactGuid. (Helper function)
*/
- MSNContact *findContactByGuid(const QString &contactGuid);
+ MSNContact *findContactByGuid(const TQString &contactGuid);
private:
// server data
- QStringList m_allowList;
- QStringList m_blockList;
- QStringList m_reverseList;
+ TQStringList m_allowList;
+ TQStringList m_blockList;
+ TQStringList m_reverseList;
Kopete::MetaContact *m_addWizard_metaContact;
- QMap< QString, QStringList > tmp_addToNewGroup;
- QMap< QString, QStringList > tmp_addNewContactToGroup;
+ TQMap< TQString, TQStringList > tmp_addToNewGroup;
+ TQMap< TQString, TQStringList > tmp_addNewContactToGroup;
- QString m_pictureObj; //a cache of the <msnobj>
- QString m_pictureFilename; // the picture filename.
+ TQString m_pictureObj; //a cache of the <msnobj>
+ TQString m_pictureFilename; // the picture filename.
//this is the translation between old to new groups id when syncing from server.
- QMap<QString, Kopete::Group*> m_oldGroupList;
+ TQMap<TQString, Kopete::Group*> m_oldGroupList;
/**
* I need the password in createNotificationServer.
@@ -256,7 +256,7 @@ private:
* at this place. so i'm forced to keep it here.
* I would like an API to request the password WITHOUT askling it.
*/
- QString m_password;
+ TQString m_password;
/**
* Cliend ID is a bitfield that contains supported features for a MSN contact.
diff --git a/kopete/protocols/msn/msnaddcontactpage.cpp b/kopete/protocols/msn/msnaddcontactpage.cpp
index 337939e6..8bdf77a1 100644
--- a/kopete/protocols/msn/msnaddcontactpage.cpp
+++ b/kopete/protocols/msn/msnaddcontactpage.cpp
@@ -13,8 +13,8 @@
*/
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -25,10 +25,10 @@
#include "kopeteaccount.h"
#include "kopeteuiglobal.h"
-MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char *name )
+MSNAddContactPage::MSNAddContactPage(bool connected, TQWidget *parent, const char *name )
: AddContactPage(parent,name)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
/* if ( connected )
{*/
msndata = new msnAddUI(this);
@@ -41,8 +41,8 @@ MSNAddContactPage::MSNAddContactPage(bool connected, QWidget *parent, const char
/* }
else
{
- noaddMsg1 = new QLabel( i18n( "You need to be connected to be able to add contacts." ), this );
- noaddMsg2 = new QLabel( i18n( "Please connect to the MSN network and try again." ), this );
+ noaddMsg1 = new TQLabel( i18n( "You need to be connected to be able to add contacts." ), this );
+ noaddMsg2 = new TQLabel( i18n( "Please connect to the MSN network and try again." ), this );
canadd = false;
}*/
@@ -55,7 +55,7 @@ bool MSNAddContactPage::apply( Kopete::Account* i, Kopete::MetaContact*m )
{
if ( validateData() )
{
- QString userid = msndata->addID->text();
+ TQString userid = msndata->addID->text();
return i->addContact( userid , m, Kopete::Account::ChangeKABC );
}
return false;
@@ -67,7 +67,7 @@ bool MSNAddContactPage::validateData()
if(!canadd)
return false;
- QString userid = msndata->addID->text();
+ TQString userid = msndata->addID->text();
if(MSNProtocol::validContactId(userid))
return true;
diff --git a/kopete/protocols/msn/msnaddcontactpage.h b/kopete/protocols/msn/msnaddcontactpage.h
index c2e3fb3b..4b51a15e 100644
--- a/kopete/protocols/msn/msnaddcontactpage.h
+++ b/kopete/protocols/msn/msnaddcontactpage.h
@@ -2,9 +2,9 @@
#ifndef MSNADDCONTACTPAGE_H
#define MSNADDCONTACTPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <addcontactpage.h>
-#include <qlabel.h>
+#include <tqlabel.h>
/**
*@author duncan
@@ -16,11 +16,11 @@ class MSNAddContactPage : public AddContactPage
{
Q_OBJECT
public:
- MSNAddContactPage(bool connected, QWidget *parent=0, const char *name=0);
+ MSNAddContactPage(bool connected, TQWidget *parent=0, const char *name=0);
~MSNAddContactPage();
msnAddUI *msndata;
- QLabel *noaddMsg1;
- QLabel *noaddMsg2;
+ TQLabel *noaddMsg1;
+ TQLabel *noaddMsg2;
bool canadd;
virtual bool validateData();
virtual bool apply( Kopete::Account*, Kopete::MetaContact* );
diff --git a/kopete/protocols/msn/msnchallengehandler.cpp b/kopete/protocols/msn/msnchallengehandler.cpp
index e0bcc987..46d4b8a0 100644
--- a/kopete/protocols/msn/msnchallengehandler.cpp
+++ b/kopete/protocols/msn/msnchallengehandler.cpp
@@ -19,12 +19,12 @@
#include "msnchallengehandler.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <kdebug.h>
#include <kmdcodec.h>
-MSNChallengeHandler::MSNChallengeHandler(const QString& productKey, const QString& productId)
+MSNChallengeHandler::MSNChallengeHandler(const TQString& productKey, const TQString& productId)
{
m_productKey = productKey;
m_productId = productId;
@@ -36,17 +36,17 @@ MSNChallengeHandler::~MSNChallengeHandler()
kdDebug(14140) << k_funcinfo << endl;
}
-QString MSNChallengeHandler::computeHash(const QString& challengeString)
+TQString MSNChallengeHandler::computeHash(const TQString& challengeString)
{
// Step One: THe MD5 Hash.
// Combine the received challenge string with the product key.
KMD5 md5((challengeString + m_productKey).utf8());
- QCString digest = md5.hexDigest();
+ TQCString digest = md5.hexDigest();
kdDebug(14140) << k_funcinfo << "md5: " << digest << endl;
- QValueVector<Q_INT32> md5Integers(4);
+ TQValueVector<Q_INT32> md5Integers(4);
for(Q_UINT32 i=0; i < md5Integers.count(); i++)
{
md5Integers[i] = hexSwap(digest.mid(i*8, 8)).toUInt(0, 16) & 0x7FFFFFFF;
@@ -55,21 +55,21 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString)
// Step Two: Create the challenge string key
- QString challengeKey = challengeString + m_productId;
+ TQString challengeKey = challengeString + m_productId;
// Pad to multiple of 8.
challengeKey = challengeKey.leftJustify(challengeKey.length() + (8 - challengeKey.length() % 8), '0');
kdDebug(14140) << k_funcinfo << "challenge key: " << challengeKey << endl;
- QValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4);
+ TQValueVector<Q_INT32> challengeIntegers(challengeKey.length() / 4);
for(Q_UINT32 i=0; i < challengeIntegers.count(); i++)
{
- QString sNum = challengeKey.mid(i*4, 4), sNumHex;
+ TQString sNum = challengeKey.mid(i*4, 4), sNumHex;
// Go through the number string, determining the hex equivalent of each value
// and add that to our new hex string for this number.
for(uint j=0; j < sNum.length(); j++) {
- sNumHex += QString::number((int)sNum[j].latin1(), 16);
+ sNumHex += TQString::number((int)sNum[j].latin1(), 16);
}
// swap because of the byte ordering issue.
@@ -87,19 +87,19 @@ QString MSNChallengeHandler::computeHash(const QString& challengeString)
// Step Four: Create the final hash key.
- QString upper = QString::number(QString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16);
+ TQString upper = TQString::number(TQString(digest.mid(0, 16)).toULongLong(0, 16)^key, 16);
if(upper.length() % 16 != 0)
upper = upper.rightJustify(upper.length() + (16 - upper.length() % 16), '0');
- QString lower = QString::number(QString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16);
+ TQString lower = TQString::number(TQString(digest.mid(16, 16)).toULongLong(0, 16)^key, 16);
if(lower.length() % 16 != 0)
lower = lower.rightJustify(lower.length() + (16 - lower.length() % 16), '0');
return (upper + lower);
}
-Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integers,
- const QValueVector<Q_INT32>& challengeIntegers)
+Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector<Q_INT32>& md5Integers,
+ const TQValueVector<Q_INT32>& challengeIntegers)
{
kdDebug(14140) << k_funcinfo << "Creating 64-bit key." << endl;
@@ -119,22 +119,22 @@ Q_INT64 MSNChallengeHandler::createHashKey(const QValueVector<Q_INT32>& md5Integ
high = (high + md5Integers[1]) % 0x7FFFFFFF;
low = (low + md5Integers[3]) % 0x7FFFFFFF;
- QDataStream buffer(QByteArray(8), IO_ReadWrite);
- buffer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream buffer(TQByteArray(8), IO_ReadWrite);
+ buffer.setByteOrder(TQDataStream::LittleEndian);
buffer << (Q_INT32)high;
buffer << (Q_INT32)low;
buffer.device()->reset();
- buffer.setByteOrder(QDataStream::BigEndian);
+ buffer.setByteOrder(TQDataStream::BigEndian);
Q_INT64 key;
buffer >> key;
return key;
}
-QString MSNChallengeHandler::hexSwap(const QString& in)
+TQString MSNChallengeHandler::hexSwap(const TQString& in)
{
- QString sHex = in, swapped;
+ TQString sHex = in, swapped;
while(sHex.length() > 0)
{
swapped = swapped + sHex.mid(sHex.length() - 2, 2);
@@ -143,7 +143,7 @@ QString MSNChallengeHandler::hexSwap(const QString& in)
return swapped;
}
-QString MSNChallengeHandler::productId()
+TQString MSNChallengeHandler::productId()
{
return m_productId;
}
diff --git a/kopete/protocols/msn/msnchallengehandler.h b/kopete/protocols/msn/msnchallengehandler.h
index 9e866560..8ae8c3aa 100644
--- a/kopete/protocols/msn/msnchallengehandler.h
+++ b/kopete/protocols/msn/msnchallengehandler.h
@@ -20,8 +20,8 @@
#ifndef MSNCHALLENGEHANDLER_H
#define MSNCHALLENGEHANDLER_H
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
/**
* Provides a simple way to compute a msn challenge response hash key.
@@ -32,33 +32,33 @@ class MSNChallengeHandler : public QObject
{
Q_OBJECT
public:
- MSNChallengeHandler(const QString& productKey, const QString& productId);
+ MSNChallengeHandler(const TQString& productKey, const TQString& productId);
~MSNChallengeHandler();
/**
* Computes the response hash string for the specified challenge string.
*/
- QString computeHash(const QString& challengeString);
+ TQString computeHash(const TQString& challengeString);
/**
* Returns the product id used by the challenge handler.
*/
- QString productId();
+ TQString productId();
private:
/**
* Creates a 64-bit hash key.
*/
- Q_INT64 createHashKey(const QValueVector<Q_INT32>& md5Integers, const QValueVector<Q_INT32>& challengeIntegers);
+ Q_INT64 createHashKey(const TQValueVector<Q_INT32>& md5Integers, const TQValueVector<Q_INT32>& challengeIntegers);
/**
* Swaps the bytes in a hex string.
*/
- QString hexSwap(const QString& in);
+ TQString hexSwap(const TQString& in);
- QString m_productKey;
- QString m_productId;
+ TQString m_productKey;
+ TQString m_productId;
};
#endif
diff --git a/kopete/protocols/msn/msnchatsession.cpp b/kopete/protocols/msn/msnchatsession.cpp
index 3bf5d0c6..f799edc1 100644
--- a/kopete/protocols/msn/msnchatsession.cpp
+++ b/kopete/protocols/msn/msnchatsession.cpp
@@ -17,11 +17,11 @@
#include "msnchatsession.h"
-#include <qlabel.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qiconset.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqiconset.h>
#include <kconfig.h>
@@ -66,43 +66,43 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac
setInstance(protocol->instance());
- connect( this, SIGNAL( messageSent( Kopete::Message&,
+ connect( this, TQT_SIGNAL( messageSent( Kopete::Message&,
Kopete::ChatSession* ) ),
- this, SLOT( slotMessageSent( Kopete::Message&,
+ this, TQT_SLOT( slotMessageSent( Kopete::Message&,
Kopete::ChatSession* ) ) );
- connect( this, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ,
- protocol, SIGNAL( invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ) ) );
+ connect( this, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) ,
+ protocol, TQT_SIGNAL( invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ) ) );
m_actionInvite = new KActionMenu( i18n( "&Invite" ), "kontact_contacts", actionCollection(), "msnInvite" );
- connect ( m_actionInvite->popupMenu() , SIGNAL( aboutToShow() ) , this , SLOT(slotActionInviteAboutToShow() ) ) ;
+ connect ( m_actionInvite->popupMenu() , TQT_SIGNAL( aboutToShow() ) , this , TQT_SLOT(slotActionInviteAboutToShow() ) ) ;
#if !defined NDEBUG
- new KAction( i18n( "Send Raw C&ommand..." ), 0, this, SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ;
+ new KAction( i18n( "Send Raw C&ommand..." ), 0, this, TQT_SLOT( slotDebugRawCommand() ), actionCollection(), "msnDebugRawCommand" ) ;
#endif
- m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ;
+ m_actionNudge=new KAction( i18n( "Send Nudge" ), "bell", 0, this, TQT_SLOT(slotSendNudge() ), actionCollection(), "msnSendNudge" ) ;
#if MSN_WEBCAM
// Invite to receive webcam action
- m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ;
+ m_actionWebcamReceive=new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive()), actionCollection(), "msnWebcamReceive" ) ;
//Send webcam action
- m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ;
+ m_actionWebcamSend=new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend()), actionCollection(), "msnWebcamSend" ) ;
#endif
- new KAction( i18n( "Send File" ),"attach", 0, this, SLOT( slotSendFile() ), actionCollection(), "msnSendFile" );
+ new KAction( i18n( "Send File" ),"attach", 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "msnSendFile" );
MSNContact *c = static_cast<MSNContact*>( others.first() );
- (new KAction( i18n( "Request Display Picture" ), "image", 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty());
+ (new KAction( i18n( "Request Display Picture" ), "image", 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnRequestDisplayPicture" ))->setEnabled(!c->object().isEmpty());
if ( !c->object().isEmpty() )
{
- connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) );
- m_image = new QLabel( 0L, "kde toolbar widget" );
- new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" );
+ connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) );
+ m_image = new TQLabel( 0L, "kde toolbar widget" );
+ new KWidgetAction( m_image, i18n( "MSN Display Picture" ), 0, this, TQT_SLOT( slotRequestPicture() ), actionCollection(), "msnDisplayPicture" );
if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) )
{
//if the view doesn't exist yet, we will be unable to get the size of the toolbar
@@ -110,7 +110,7 @@ MSNChatSession::MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contac
//How to know when a our view is created? We can't.
// but chances are the next created view will be for this KMM
// And if it is not? never mind. the icon will just be sized 22x22
- connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) );
+ connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) );
//it's viewActivated and not viewCreated because the view get his mainwindow only when it is shown.
}
}
@@ -132,7 +132,7 @@ MSNChatSession::~MSNChatSession()
// if(m_chatService)
// delete m_chatService;
- QMap<unsigned long int, MSNInvitation*>::Iterator it;
+ TQMap<unsigned long int, MSNInvitation*>::Iterator it;
for( it = m_invitations.begin(); it != m_invitations.end() ; it = m_invitations.begin())
{
delete *it;
@@ -140,8 +140,8 @@ MSNChatSession::~MSNChatSession()
}
}
-void MSNChatSession::createChat( const QString &handle,
- const QString &address, const QString &auth, const QString &ID )
+void MSNChatSession::createChat( const TQString &handle,
+ const TQString &address, const TQString &auth, const TQString &ID )
{
/* disabled because i don't want to reopen a chatwindow if we just closed it
* and the contact take much time to type his message
@@ -163,46 +163,46 @@ void MSNChatSession::createChat( const QString &handle,
m_chatService->setMsgHandle( handle );
m_chatService->connectToSwitchBoard( ID, address, auth );
- connect( m_chatService, SIGNAL( userJoined(const QString&,const QString&,bool)),
- this, SLOT( slotUserJoined(const QString&,const QString&,bool) ) );
- connect( m_chatService, SIGNAL( userLeft(const QString&,const QString&)),
- this, SLOT( slotUserLeft(const QString&,const QString&) ) );
- connect( m_chatService, SIGNAL( msgReceived( Kopete::Message & ) ),
- this, SLOT( slotMessageReceived( Kopete::Message & ) ) );
- connect( m_chatService, SIGNAL( switchBoardClosed() ),
- this, SLOT( slotSwitchBoardClosed() ) );
- connect( m_chatService, SIGNAL( receivedTypingMsg( const QString &, bool ) ),
- this, SLOT( receivedTypingMsg( const QString &, bool ) ) );
+ connect( m_chatService, TQT_SIGNAL( userJoined(const TQString&,const TQString&,bool)),
+ this, TQT_SLOT( slotUserJoined(const TQString&,const TQString&,bool) ) );
+ connect( m_chatService, TQT_SIGNAL( userLeft(const TQString&,const TQString&)),
+ this, TQT_SLOT( slotUserLeft(const TQString&,const TQString&) ) );
+ connect( m_chatService, TQT_SIGNAL( msgReceived( Kopete::Message & ) ),
+ this, TQT_SLOT( slotMessageReceived( Kopete::Message & ) ) );
+ connect( m_chatService, TQT_SIGNAL( switchBoardClosed() ),
+ this, TQT_SLOT( slotSwitchBoardClosed() ) );
+ connect( m_chatService, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ),
+ this, TQT_SLOT( receivedTypingMsg( const TQString &, bool ) ) );
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
if(config->readBoolEntry( "SendTypingNotification" , true) )
{
- connect( this, SIGNAL( myselfTyping( bool ) ),
- m_chatService, SLOT( sendTypingMsg( bool ) ) );
+ connect( this, TQT_SIGNAL( myselfTyping( bool ) ),
+ m_chatService, TQT_SLOT( sendTypingMsg( bool ) ) );
}
- connect( m_chatService, SIGNAL( msgAcknowledgement(unsigned int, bool) ),
- this, SLOT( slotAcknowledgement(unsigned int, bool) ) );
- connect( m_chatService, SIGNAL( invitation( const QString&, const QString& ) ),
- this, SLOT( slotInvitation( const QString&, const QString& ) ) );
- connect( m_chatService, SIGNAL( nudgeReceived(const QString&) ),
- this, SLOT( slotNudgeReceived(const QString&) ) );
- connect( m_chatService, SIGNAL( errorMessage(int, const QString& ) ), static_cast<MSNAccount *>(myself()->account()), SLOT( slotErrorMessageReceived(int, const QString& ) ) );
+ connect( m_chatService, TQT_SIGNAL( msgAcknowledgement(unsigned int, bool) ),
+ this, TQT_SLOT( slotAcknowledgement(unsigned int, bool) ) );
+ connect( m_chatService, TQT_SIGNAL( invitation( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotInvitation( const TQString&, const TQString& ) ) );
+ connect( m_chatService, TQT_SIGNAL( nudgeReceived(const TQString&) ),
+ this, TQT_SLOT( slotNudgeReceived(const TQString&) ) );
+ connect( m_chatService, TQT_SIGNAL( errorMessage(int, const TQString& ) ), static_cast<MSNAccount *>(myself()->account()), TQT_SLOT( slotErrorMessageReceived(int, const TQString& ) ) );
if(!m_timeoutTimer)
{
- m_timeoutTimer=new QTimer(this);
- connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) );
+ m_timeoutTimer=new TQTimer(this);
+ connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) );
}
m_timeoutTimer->start(20000,true);
}
-void MSNChatSession::slotUserJoined( const QString &handle, const QString &publicName, bool IRO )
+void MSNChatSession::slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO )
{
delete m_timeoutTimer;
m_timeoutTimer=0L;
if( !account()->contacts()[ handle ] )
- account()->addContact( handle, QString::null, 0L, Kopete::Account::Temporary);
+ account()->addContact( handle, TQString::null, 0L, Kopete::Account::Temporary);
MSNContact *c = static_cast<MSNContact*>( account()->contacts()[ handle ] );
@@ -229,7 +229,7 @@ void MSNChatSession::slotUserJoined( const QString &handle, const QString &publi
slotRequestPicture();
}
-void MSNChatSession::slotUserLeft( const QString &handle, const QString& reason )
+void MSNChatSession::slotUserLeft( const TQString &handle, const TQString& reason )
{
MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] );
if(c)
@@ -274,7 +274,7 @@ void MSNChatSession::slotMessageSent(Kopete::Message &message,Kopete::ChatSessio
else
{
m_messagesSent.insert( id, message );
- message.setBg(QColor()); // clear the bgColor
+ message.setBg(TQColor()); // clear the bgColor
message.setBody(message.plainBody() , Kopete::Message::PlainText ); //clear every custom tag which are not sent
appendMessage(message); // send the own msg to chat window
}
@@ -294,8 +294,8 @@ void MSNChatSession::slotMessageReceived( Kopete::Message &msg )
if( msg.plainBody().startsWith( "AutoMessage: " ) )
{
//FIXME: HardCodded color are not so good
- msg.setFg( QColor( "SlateGray3" ) );
- QFont f;
+ msg.setFg( TQColor( "SlateGray3" ) );
+ TQFont f;
f.setItalic( true );
msg.setFont( f );
}
@@ -313,18 +313,18 @@ void MSNChatSession::slotActionInviteAboutToShow()
m_actionInvite->popupMenu()->clear();
- QDictIterator<Kopete::Contact> it( account()->contacts() );
+ TQDictIterator<Kopete::Contact> it( account()->contacts() );
for( ; it.current(); ++it )
{
if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() )
{
KAction *a=new KopeteContactAction( it.current(), this,
- SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
+ TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
m_actionInvite->insert( a );
m_inviteactions.append( a ) ;
}
}
- KAction *b=new KAction( i18n ("Other..."), 0, this, SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
+ KAction *b=new KAction( i18n ("Other..."), 0, this, TQT_SLOT( slotInviteOtherContact() ), m_actionInvite, "actionOther" );
m_actionInvite->insert( b );
m_inviteactions.append( b ) ;
}
@@ -342,7 +342,7 @@ void MSNChatSession::slotInviteContact( Kopete::Contact *contact )
inviteContact( contact->contactId() );
}
-void MSNChatSession::inviteContact(const QString &contactId)
+void MSNChatSession::inviteContact(const TQString &contactId)
{
if( m_chatService )
m_chatService->slotInviteContact( contactId );
@@ -353,9 +353,9 @@ void MSNChatSession::inviteContact(const QString &contactId)
void MSNChatSession::slotInviteOtherContact()
{
bool ok;
- QString handle = KInputDialog::getText(i18n( "MSN Plugin" ),
+ TQString handle = KInputDialog::getText(i18n( "MSN Plugin" ),
i18n( "Please enter the email address of the person you want to invite:" ),
- QString::null, &ok );
+ TQString::null, &ok );
if( !ok )
return;
@@ -378,7 +378,7 @@ void MSNChatSession::sendMessageQueue()
return;
}
// kdDebug(14140) << "MSNChatSession::sendMessageQueue: " << m_messagesQueue.count() <<endl;
- for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
+ for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
{
//m_chatService->sendMsg( *it) ;
slotMessageSent(*it , this);
@@ -386,7 +386,7 @@ void MSNChatSession::sendMessageQueue()
}
- QMap<unsigned long int, MSNInvitation*>::Iterator it;
+ TQMap<unsigned long int, MSNInvitation*>::Iterator it;
for( it = m_invitations.begin(); it != m_invitations.end() ; ++it)
{
if(! (*it)->incoming() && (*it)->state()<MSNInvitation::Invited)
@@ -408,7 +408,7 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack)
if ( !ack )
{
Kopete::Message m = m_messagesSent[ id ];
- QString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() );
+ TQString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() );
Kopete::Message msg = Kopete::Message( m.to().first(), members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
appendMessage( msg );
//stop the stupid animation
@@ -422,14 +422,14 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack)
m_messagesSent.remove( id );
}
-void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
+void MSNChatSession::slotInvitation(const TQString &handle, const TQString &msg)
{
//FIXME! a contact from another account can send a file
MSNContact *c = static_cast<MSNContact*>( myself()->account()->contacts()[ handle ] );
if(!c)
return;
- QRegExp rx("Invitation-Cookie: ([0-9]*)");
+ TQRegExp rx("Invitation-Cookie: ([0-9]*)");
rx.search(msg);
long unsigned int cookie=rx.cap(1).toUInt();
@@ -443,7 +443,7 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
if( msg.contains(MSNFileTransferSocket::applicationID()) )
{
MSNFileTransferSocket *MFTS=new MSNFileTransferSocket(myself()->account()->accountId(),c,true,this);
- connect(MFTS, SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) ));
+ connect(MFTS, TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) ));
m_invitations.insert( cookie , MFTS);
MFTS->parseInvitation(msg);
setCanBeDeleted(false);
@@ -460,11 +460,11 @@ void MSNChatSession::slotInvitation(const QString &handle, const QString &msg)
}
else
{
- rx=QRegExp("Application-Name: ([^\\r\\n]*)");
+ rx=TQRegExp("Application-Name: ([^\\r\\n]*)");
rx.search(msg);
- QString inviteName = rx.cap( 1 );
+ TQString inviteName = rx.cap( 1 );
- QString body = i18n(
+ TQString body = i18n(
"%1 has sent an unimplemented invitation, the invitation was rejected.\n"
"The invitation was: %2" )
.arg( c->property( Kopete::Global::Properties::self()->nickName()).value().toString(), inviteName );
@@ -487,7 +487,7 @@ void MSNChatSession::invitationDone(MSNInvitation* MFTS)
setCanBeDeleted(true);
}
-void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*fileName*/,
+void MSNChatSession::sendFile(const TQString &fileLocation, const TQString &/*fileName*/,
long unsigned int fileSize)
{
// TODO create a switchboard to send the file is one is not available.
@@ -499,7 +499,7 @@ void MSNChatSession::sendFile(const QString &fileLocation, const QString &/*file
void MSNChatSession::initInvitation(MSNInvitation* invitation)
{
- connect(invitation->object(), SIGNAL( done(MSNInvitation*) ) , this , SLOT( invitationDone(MSNInvitation*) ));
+ connect(invitation->object(), TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) ));
m_invitations.insert( invitation->cookie() , invitation);
if(m_chatService)
@@ -515,7 +515,7 @@ void MSNChatSession::initInvitation(MSNInvitation* invitation)
void MSNChatSession::slotRequestPicture()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
MSNContact *c = static_cast<MSNContact*>( mb.first() );
if(!c)
return;
@@ -539,7 +539,7 @@ void MSNChatSession::slotRequestPicture()
void MSNChatSession::slotDisplayPictureChanged()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
MSNContact *c = static_cast<MSNContact *>( mb.first() );
if ( c && m_image )
{
@@ -552,9 +552,9 @@ void MSNChatSession::slotDisplayPictureChanged()
if(w)
{
//We connected that in the constructor. we don't need to keep this slot active.
- disconnect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) );
+ disconnect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) );
- QPtrListIterator<KToolBar> it=w->toolBarIterator() ;
+ TQPtrListIterator<KToolBar> it=w->toolBarIterator() ;
KAction *imgAction=actionCollection()->action("msnDisplayPicture");
if(imgAction) while(it)
{
@@ -563,15 +563,15 @@ void MSNChatSession::slotDisplayPictureChanged()
{
sz=tb->iconSize();
//ipdate if the size of the toolbar change.
- disconnect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged()));
- connect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged()));
+ disconnect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged()));
+ connect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged()));
break;
}
++it;
}
}
- QString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString();
- QImage scaledImg = QPixmap( imgURL ).convertToImage().smoothScale( sz, sz );
+ TQString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString();
+ TQImage scaledImg = TQPixmap( imgURL ).convertToImage().smoothScale( sz, sz );
if(!scaledImg.isNull())
m_image->setPixmap( scaledImg );
else
@@ -579,7 +579,7 @@ void MSNChatSession::slotDisplayPictureChanged()
c->removeProperty(Kopete::Global::Properties::self()->photo());
//slotDisplayPictureChanged(); //don't do that or we might end in a infinite loop
}
- QToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" );
+ TQToolTip::add( m_image, "<qt><img src=\"" + imgURL + "\"></qt>" );
}
else
@@ -600,7 +600,7 @@ void MSNChatSession::slotDebugRawCommand()
MSNDebugRawCmdDlg *dlg = new MSNDebugRawCmdDlg( 0L );
int result = dlg->exec();
- if( result == QDialog::Accepted && m_chatService )
+ if( result == TQDialog::Accepted && m_chatService )
{
m_chatService->sendCommand( dlg->command(), dlg->params(),
dlg->addId(), dlg->msg().replace("\n","\r\n").utf8() );
@@ -610,7 +610,7 @@ void MSNChatSession::slotDebugRawCommand()
}
-void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b )
+void MSNChatSession::receivedTypingMsg( const TQString &contactId, bool b )
{
MSNContact *c = dynamic_cast<MSNContact *>( account()->contacts()[ contactId ] );
if(c && m_newSession && !view(false))
@@ -621,7 +621,7 @@ void MSNChatSession::receivedTypingMsg( const QString &contactId, bool b )
if ( notifyNewChat )
{
// this internal message should open the window if they not exist
- QString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
+ TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() );
Kopete::Message tmpMsg = Kopete::Message( c, members(), body, Kopete::Message::Internal, Kopete::Message::PlainText );
appendMessage( tmpMsg );
}
@@ -637,20 +637,20 @@ void MSNChatSession::slotSendNudge()
{
m_chatService->sendNudge();
Kopete::Message msg = Kopete::Message( myself(), members() , i18n ( "has sent a nudge" ), Kopete::Message::Outbound,
- Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
+ Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction );
appendMessage( msg );
}
}
-void MSNChatSession::slotNudgeReceived(const QString& handle)
+void MSNChatSession::slotNudgeReceived(const TQString& handle)
{
Kopete::Contact *c = account()->contacts()[ handle ] ;
if(!c)
c=members().getFirst();
Kopete::Message msg = Kopete::Message(c, myself(), i18n ( "has sent you a nudge" ), Kopete::Message::Inbound,
- Kopete::Message::PlainText, QString(), Kopete::Message::TypeAction );
+ Kopete::Message::PlainText, TQString(), Kopete::Message::TypeAction );
appendMessage( msg );
// Emit the nudge/buzz notification (configured by user).
emitNudgeNotification();
@@ -681,25 +681,25 @@ void MSNChatSession::slotWebcamSend()
void MSNChatSession::slotSendFile()
{
- QPtrList<Kopete::Contact>contacts = members();
+ TQPtrList<Kopete::Contact>contacts = members();
static_cast<MSNContact *>(contacts.first())->sendFile();
}
void MSNChatSession::startChatSession()
{
- QPtrList<Kopete::Contact> mb=members();
+ TQPtrList<Kopete::Contact> mb=members();
static_cast<MSNAccount*>( account() )->slotStartChatSession( mb.first()->contactId() );
if(!m_timeoutTimer)
{
- m_timeoutTimer=new QTimer(this);
- connect( m_timeoutTimer , SIGNAL(timeout()), this , SLOT(slotConnectionTimeout() ) );
+ m_timeoutTimer=new TQTimer(this);
+ connect( m_timeoutTimer , TQT_SIGNAL(timeout()), this , TQT_SLOT(slotConnectionTimeout() ) );
}
m_timeoutTimer->start(20000, true);
}
-void MSNChatSession::cleanMessageQueue( const QString & reason )
+void MSNChatSession::cleanMessageQueue( const TQString & reason )
{
delete m_timeoutTimer;
m_timeoutTimer=0L;
@@ -715,21 +715,21 @@ void MSNChatSession::cleanMessageQueue( const QString & reason )
else
m=m_messagesSent.begin().data();
- QString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody());
+ TQString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody());
Kopete::Message msg = Kopete::Message(m.to().first() , members() , body , Kopete::Message::Internal, Kopete::Message::PlainText);
appendMessage(msg);
}
else
{
Kopete::Message m;
- QString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason);
- for ( QMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() )
+ TQString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason);
+ for ( TQMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() )
{
m=it.data();
body+= "<li>"+m.escapedBody()+"</li>";
m_messagesSent.remove(it);
}
- for ( QValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
+ for ( TQValueList<Kopete::Message>::iterator it = m_messagesQueue.begin(); it!=m_messagesQueue.end(); it = m_messagesQueue.begin() )
{
m=(*it);
body+= "<li>"+m.escapedBody()+"</li>";
diff --git a/kopete/protocols/msn/msnchatsession.h b/kopete/protocols/msn/msnchatsession.h
index 8011574e..702fac8a 100644
--- a/kopete/protocols/msn/msnchatsession.h
+++ b/kopete/protocols/msn/msnchatsession.h
@@ -39,11 +39,11 @@ public:
MSNChatSession( Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 );
~MSNChatSession();
- void createChat( const QString &handle, const QString &address, const QString &auth, const QString &ID = QString::null );
+ void createChat( const TQString &handle, const TQString &address, const TQString &auth, const TQString &ID = TQString::null );
MSNSwitchBoardSocket *service() { return m_chatService; };
- void sendFile( const QString &fileLocation, const QString &fileName,
+ void sendFile( const TQString &fileLocation, const TQString &fileName,
long unsigned int fileSize );
/**
@@ -51,7 +51,7 @@ public:
*/
void initInvitation(MSNInvitation* invitation);
- virtual void inviteContact(const QString& );
+ virtual void inviteContact(const TQString& );
public slots:
void slotCloseSession();
@@ -65,7 +65,7 @@ public slots:
* this is a reimplementation of ChatSesstion slot.
* the original slot is not virtual, but that's not a problem because it's a slot.
*/
- virtual void receivedTypingMsg( const QString &, bool );
+ virtual void receivedTypingMsg( const TQString &, bool );
void slotConnectionTimeout();
@@ -73,12 +73,12 @@ private slots:
void slotMessageSent( Kopete::Message &message, Kopete::ChatSession *kmm );
void slotMessageReceived( Kopete::Message &message );
- void slotUserJoined( const QString &handle, const QString &publicName, bool IRO );
- void slotUserLeft( const QString &handle, const QString &reason );
+ void slotUserJoined( const TQString &handle, const TQString &publicName, bool IRO );
+ void slotUserLeft( const TQString &handle, const TQString &reason );
void slotSwitchBoardClosed();
void slotInviteContact( Kopete::Contact *contact );
void slotAcknowledgement( unsigned int id, bool ack );
- void slotInvitation( const QString &handle, const QString &msg );
+ void slotInvitation( const TQString &handle, const TQString &msg );
void slotActionInviteAboutToShow();
@@ -94,27 +94,27 @@ private slots:
void slotWebcamSend();
void slotSendFile();
- void slotNudgeReceived(const QString& handle);
+ void slotNudgeReceived(const TQString& handle);
private:
MSNSwitchBoardSocket *m_chatService;
- QString otherString;
+ TQString otherString;
KActionMenu *m_actionInvite;
- QPtrList<KAction> m_inviteactions;
+ TQPtrList<KAction> m_inviteactions;
KAction *m_actionNudge;
KAction *m_actionWebcamReceive;
KAction *m_actionWebcamSend;
//Messages sent before the ending of the connection are queued
- QValueList<Kopete::Message> m_messagesQueue;
+ TQValueList<Kopete::Message> m_messagesQueue;
void sendMessageQueue();
- void cleanMessageQueue( const QString &reason);
+ void cleanMessageQueue( const TQString &reason);
void startChatSession();
- QMap<unsigned int, Kopete::Message> m_messagesSent;
+ TQMap<unsigned int, Kopete::Message> m_messagesSent;
- QMap<long unsigned int, MSNInvitation*> m_invitations;
+ TQMap<long unsigned int, MSNInvitation*> m_invitations;
/**
@@ -122,8 +122,8 @@ private:
*/
bool m_newSession;
- QLabel *m_image;
- QTimer *m_timeoutTimer;
+ TQLabel *m_image;
+ TQTimer *m_timeoutTimer;
uint m_connectionTry;
@@ -131,7 +131,7 @@ signals:
/*
* This signal is relayed to the protocol and after, to plugins
*/
- void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+ void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
};
#endif
diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp
index 8a490a1b..c6ef14f8 100644
--- a/kopete/protocols/msn/msncontact.cpp
+++ b/kopete/protocols/msn/msncontact.cpp
@@ -21,7 +21,7 @@
#include "msncontact.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#undef KDE_NO_COMPAT
#include <kaction.h>
@@ -35,7 +35,7 @@
#include <ktempfile.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/job.h>
#include "kopetecontactlist.h"
@@ -50,7 +50,7 @@
#include "msnnotifysocket.h"
#include "msnaccount.h"
-MSNContact::MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent )
+MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent )
: Kopete::Contact( account, id, parent )
{
m_deleted = false;
@@ -125,30 +125,30 @@ Kopete::ChatSession *MSNContact::manager( Kopete::Contact::CanCreateFlags canCre
return manager;
}
-QPtrList<KAction> *MSNContact::customContextMenuActions()
+TQPtrList<KAction> *MSNContact::customContextMenuActions()
{
- QPtrList<KAction> *m_actionCollection = new QPtrList<KAction>;
+ TQPtrList<KAction> *m_actionCollection = new TQPtrList<KAction>;
// Block/unblock Contact
- QString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
+ TQString label = isBlocked() ? i18n( "Unblock User" ) : i18n( "Block User" );
if( !actionBlock )
{
- actionBlock = new KAction( label, "msn_blocked",0, this, SLOT( slotBlockUser() ),
+ actionBlock = new KAction( label, "msn_blocked",0, this, TQT_SLOT( slotBlockUser() ),
this, "actionBlock" );
//show profile
- actionShowProfile = new KAction( i18n("Show Profile") , 0, this, SLOT( slotShowProfile() ),
+ actionShowProfile = new KAction( i18n("Show Profile") , 0, this, TQT_SLOT( slotShowProfile() ),
this, "actionShowProfile" );
// Send mail (only available if it is an hotmail account)
- actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, SLOT( slotSendMail() ),
+ actionSendMail = new KAction( i18n("Send Email...") , "mail_generic",0, this, TQT_SLOT( slotSendMail() ),
this, "actionSendMail" );
// Invite to receive webcam
- actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
+ actionWebcamReceive = new KAction( i18n( "View Contact's Webcam" ), "webcamreceive", 0, this, TQT_SLOT(slotWebcamReceive() ), this, "msnWebcamReceive" ) ;
//Send webcam action
- actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
+ actionWebcamSend = new KAction( i18n( "Send Webcam" ), "webcamsend", 0, this, TQT_SLOT(slotWebcamSend() ), this, "msnWebcamSend" ) ;
}
else
actionBlock->setText( label );
@@ -178,22 +178,22 @@ void MSNContact::slotBlockUser()
if( m_blocked )
{
- notify->removeContact( contactId(), MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null );
}
else
{
if(m_allowed)
- notify->removeContact( contactId(), MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( contactId(), MSNProtocol::AL, TQString::null, TQString::null );
else
- notify->addContact( contactId(), MSNProtocol::BL, QString::null, QString::null, QString::null );
+ notify->addContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
}
}
void MSNContact::slotUserInfo()
{
- KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, QString::null, KDialogBase::Close , KDialogBase::Close, false );
- QString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
- QString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
+ KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString::null, KDialogBase::Close , KDialogBase::Close, false );
+ TQString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
+ TQString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
MSNInfo *info=new MSNInfo ( infoDialog,"info");
info->m_id->setText( contactId() );
info->m_displayName->setText(nick);
@@ -203,7 +203,7 @@ void MSNContact::slotUserInfo()
info->m_phm->setText(m_phoneMobile);
info->m_reversed->setChecked(m_reversed);
- connect( info->m_reversed, SIGNAL(toggled(bool)) , this, SLOT(slotUserInfoDialogReversedToggled()));
+ connect( info->m_reversed, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(slotUserInfoDialogReversedToggled()));
infoDialog->setMainWidget(info);
infoDialog->setCaption(nick);
@@ -213,9 +213,9 @@ void MSNContact::slotUserInfo()
void MSNContact::slotUserInfoDialogReversedToggled()
{
//workaround to make this checkboxe readonly
- const QCheckBox *cb=dynamic_cast<const QCheckBox*>(sender());
+ const TQCheckBox *cb=dynamic_cast<const TQCheckBox*>(sender());
if(cb && cb->isChecked()!=m_reversed)
- const_cast<QCheckBox*>(cb)->setChecked(m_reversed);
+ const_cast<TQCheckBox*>(cb)->setChecked(m_reversed);
}
void MSNContact::deleteContact()
@@ -228,7 +228,7 @@ void MSNContact::deleteContact()
if( hasProperty(MSNProtocol::protocol()->propGuid.key()) )
{
// Remove from all groups he belongs (if applicable)
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
kdDebug(14140) << k_funcinfo << "Removing contact from group \"" << it.key() << "\"" << endl;
notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() );
@@ -237,7 +237,7 @@ void MSNContact::deleteContact()
// Then trully remove it from server contact list,
// because only removing the contact from his groups isn't sufficent from MSNP11.
kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl;
- notify->removeContact( contactId(), MSNProtocol::FL, guid(), QString::null);
+ notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString::null);
}
else
{
@@ -325,7 +325,7 @@ void MSNContact::setClientFlags( uint flags )
m_clientFlags=flags;
}
-void MSNContact::setInfo(const QString &type,const QString &data )
+void MSNContact::setInfo(const TQString &type,const TQString &data )
{
if( type == "PHH" )
{
@@ -362,12 +362,12 @@ void MSNContact::setInfo(const QString &type,const QString &data )
}
-void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> & /* addressBookData */ )
+void MSNContact::serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> & /* addressBookData */ )
{
// Contact id and display name are already set for us, only add the rest
- QString groups;
+ TQString groups;
bool firstEntry = true;
- for( QMap<QString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
+ for( TQMap<TQString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it != m_serverGroups.end(); ++it )
{
if( !firstEntry )
{
@@ -377,7 +377,7 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
groups += it.key();
}
- QString lists="C";
+ TQString lists="C";
if(m_blocked)
lists +="B";
if(m_allowed)
@@ -395,14 +395,14 @@ void MSNContact::serialize( QMap<QString, QString> &serializedData, QMap<QString
}
-QString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
+TQString MSNContact::guid(){ return property(MSNProtocol::protocol()->propGuid).value().toString(); }
-QString MSNContact::phoneHome(){ return m_phoneHome ;}
-QString MSNContact::phoneWork(){ return m_phoneWork ;}
-QString MSNContact::phoneMobile(){ return m_phoneMobile ;}
+TQString MSNContact::phoneHome(){ return m_phoneHome ;}
+TQString MSNContact::phoneWork(){ return m_phoneWork ;}
+TQString MSNContact::phoneMobile(){ return m_phoneMobile ;}
-const QMap<QString, Kopete::Group*> MSNContact::serverGroups() const
+const TQMap<TQString, Kopete::Group*> MSNContact::serverGroups() const
{
return m_serverGroups;
}
@@ -451,21 +451,21 @@ void MSNContact::sync( unsigned int changed )
return;
//STEP ONE : add the contact to every kopetegroups where the MC is
- QPtrList<Kopete::Group> groupList = metaContact()->groups();
+ TQPtrList<Kopete::Group> groupList = metaContact()->groups();
for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
//For each group, ensure it is on the MSN server
if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() )
{
- QString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
+ TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
// This shouln't be possible anymore 2004-06-10 -Olivier
//repair the problem
- group->setPluginData( protocol() , account()->accountId() + " id" , QString::null);
- group->setPluginData( protocol() , account()->accountId() + " displayName" , QString::null);
+ group->setPluginData( protocol() , account()->accountId() + " id" , TQString::null);
+ group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString::null);
kdWarning( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" <<Gid << " does not seems to be anymore on the server" << endl;
if(!group->displayName().isEmpty() && group->type() == Kopete::Group::Normal) //not the top-level
@@ -479,7 +479,7 @@ void MSNContact::sync( unsigned int changed )
else if( !m_serverGroups.contains(Gid) )
{
//Add the contact to the group on the server
- notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), Gid );
+ notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), Gid );
count++;
m_moving=true;
}
@@ -502,9 +502,9 @@ void MSNContact::sync( unsigned int changed )
//STEP TWO : remove the contact from groups where the MC is not, but let it at least in one group
//contact is not in that group. on the server. we will remove them dirrectly after the loop
- QValueList<QString> removinglist;
+ TQValueList<TQString> removinglist;
- for( QMap<QString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
+ for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
{
if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) )
{ // ohoh! something is corrupted on the contactlist.xml
@@ -531,7 +531,7 @@ void MSNContact::sync( unsigned int changed )
}
}
- for(QValueList<QString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
+ for(TQValueList<TQString>::Iterator it= removinglist.begin() ; it != removinglist.end() ; ++it )
contactRemovedFromGroup(*it);
//FINAL TEST: is the contact at least in a group..
@@ -539,17 +539,17 @@ void MSNContact::sync( unsigned int changed )
// we add the contact to the group #0 (the default one)
/*if(count==0)
{
-// notify->addContact( contactId(), MSNProtocol::FL, QString::null, guid(), "0");
+// notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), "0");
}*/
}
-void MSNContact::contactAddedToGroup( const QString& groupId, Kopete::Group *group )
+void MSNContact::contactAddedToGroup( const TQString& groupId, Kopete::Group *group )
{
m_serverGroups.insert( groupId, group );
m_moving=false;
}
-void MSNContact::contactRemovedFromGroup( const QString& groupId )
+void MSNContact::contactRemovedFromGroup( const TQString& groupId )
{
m_serverGroups.remove( groupId );
if(m_serverGroups.isEmpty() && !m_moving)
@@ -560,7 +560,7 @@ void MSNContact::contactRemovedFromGroup( const QString& groupId )
}
-void MSNContact::rename( const QString &newName )
+void MSNContact::rename( const TQString &newName )
{
//kdDebug( 14140 ) << k_funcinfo << "From: " << displayName() << ", to: " << newName << endl;
@@ -577,20 +577,20 @@ void MSNContact::rename( const QString &newName )
void MSNContact::slotShowProfile()
{
- KRun::runURL( KURL( QString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
+ KRun::runURL( KURL( TQString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
}
/**
* FIXME: Make this a standard KMM API call
*/
-void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, uint /*fileSize*/ )
+void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, uint /*fileSize*/ )
{
- QString filePath;
+ TQString filePath;
//If the file location is null, then get it from a file open dialog
if( !sourceURL.isValid() )
- filePath = KFileDialog::getOpenFileName( QString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
+ filePath = KFileDialog::getOpenFileName( TQString::null ,"*", 0l , i18n( "Kopete File Transfer" ));
else
filePath = sourceURL.path(-1);
@@ -598,7 +598,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const QString &altFileName, ui
if ( !filePath.isEmpty() )
{
- Q_UINT32 fileSize = QFileInfo(filePath).size();
+ Q_UINT32 fileSize = TQFileInfo(filePath).size();
//Send the file
static_cast<MSNChatSession*>( manager(Kopete::Contact::CanCreate) )->sendFile( filePath, altFileName, fileSize );
@@ -614,7 +614,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status)
(status.weight()==0) ? 0 : (status.weight() -1) ,
protocol() ,
status.internalStatus()+15 ,
- status.overlayIcons() + QStringList("msn_blocked") ,
+ status.overlayIcons() + TQStringList("msn_blocked") ,
i18n("%1|Blocked").arg( status.description() ) ) );
}
else if(!isBlocked() && status.internalStatus() >= 15)
@@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ );
@@ -680,17 +680,17 @@ void MSNContact::setDisplayPicture(KTempFile *f)
delete f;
//let the time to KIO to copy the file
- connect(j, SIGNAL(result(KIO::Job *)) , this, SLOT(slotEmitDisplayPictureChanged() ));
+ connect(j, TQT_SIGNAL(result(KIO::Job *)) , this, TQT_SLOT(slotEmitDisplayPictureChanged() ));
}
void MSNContact::slotEmitDisplayPictureChanged()
{
- QString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
-void MSNContact::setObject(const QString &obj)
+void MSNContact::setObject(const TQString &obj)
{
if(m_obj==obj && (obj.isEmpty() || hasProperty(Kopete::Global::Properties::self()->photo().key())))
return;
diff --git a/kopete/protocols/msn/msncontact.h b/kopete/protocols/msn/msncontact.h
index bcd6cc68..8b38d678 100644
--- a/kopete/protocols/msn/msncontact.h
+++ b/kopete/protocols/msn/msncontact.h
@@ -46,7 +46,7 @@ class MSNContact : public Kopete::Contact
Q_OBJECT
public:
- MSNContact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent );
+ MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent );
~MSNContact();
/**
@@ -77,12 +77,12 @@ public:
/**
* set one phone number
*/
- void setInfo(const QString &type, const QString &data);
+ void setInfo(const TQString &type, const TQString &data);
/**
* The groups in which the user is located on the server.
*/
- const QMap<QString, Kopete::Group *> serverGroups() const;
+ const TQMap<TQString, Kopete::Group *> serverGroups() const;
/**
* clear that map
*/
@@ -96,20 +96,20 @@ public:
virtual bool isReachable();
- virtual QPtrList<KAction> *customContextMenuActions();
+ virtual TQPtrList<KAction> *customContextMenuActions();
/**
* update the server group map
*/
- void contactRemovedFromGroup( const QString& groupId );
- void contactAddedToGroup(const QString& groupId, Kopete::Group *group );
+ void contactRemovedFromGroup( const TQString& groupId );
+ void contactAddedToGroup(const TQString& groupId, Kopete::Group *group );
- virtual void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
+ virtual void serialize( TQMap<TQString, TQString> &serializedData, TQMap<TQString, TQString> &addressBookData );
/**
* Rename contact on server
*/
- virtual void rename( const QString &newName ) KDE_DEPRECATED;
+ virtual void rename( const TQString &newName ) KDE_DEPRECATED;
/**
* Returns the MSN Message Manager associated with this contact
@@ -122,19 +122,19 @@ public:
*/
void setOnlineStatus(const Kopete::OnlineStatus&);
- QString guid();
- QString phoneHome();
- QString phoneWork();
- QString phoneMobile();
+ TQString guid();
+ TQString phoneHome();
+ TQString phoneWork();
+ TQString phoneMobile();
- void setObject(const QString &obj);
- QString object() const { return m_obj; }
+ void setObject(const TQString &obj);
+ TQString object() const { return m_obj; }
public slots:
virtual void slotUserInfo();
virtual void deleteContact();
virtual void sendFile( const KURL &sourceURL = KURL(),
- const QString &fileName = QString::null, uint fileSize = 0L );
+ const TQString &fileName = TQString::null, uint fileSize = 0L );
/**
* Every time the kopete's contactlist is modified, we sync the serverlist with it
@@ -159,7 +159,7 @@ private slots:
void slotUserInfoDialogReversedToggled();
private:
- QMap<QString, Kopete::Group *> m_serverGroups;
+ TQMap<TQString, Kopete::Group *> m_serverGroups;
bool m_blocked;
bool m_allowed;
@@ -170,9 +170,9 @@ private:
uint m_clientFlags;
- QString m_phoneHome;
- QString m_phoneWork;
- QString m_phoneMobile;
+ TQString m_phoneHome;
+ TQString m_phoneWork;
+ TQString m_phoneMobile;
KAction *actionBlock;
@@ -181,7 +181,7 @@ private:
KAction *actionWebcamReceive;
KAction *actionWebcamSend;
- QString m_obj; //the MSNObject
+ TQString m_obj; //the MSNObject
/**
* keep the current status here. (it's normally already in Kopete::Contact::d->onlineStatus)
diff --git a/kopete/protocols/msn/msndebugrawcmddlg.cpp b/kopete/protocols/msn/msndebugrawcmddlg.cpp
index 341c6808..48c4050e 100644
--- a/kopete/protocols/msn/msndebugrawcmddlg.cpp
+++ b/kopete/protocols/msn/msndebugrawcmddlg.cpp
@@ -21,18 +21,18 @@
#include "ui/msndebugrawcommand_base.h"
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include <ktextedit.h>
#include <klocale.h>
-MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( QWidget *parent )
+MSNDebugRawCmdDlg::MSNDebugRawCmdDlg( TQWidget *parent )
: KDialogBase( parent, 0L, true,
i18n( "DEBUG: Send Raw Command - MSN Plugin" ), Ok | Cancel,
Ok, true )
{
- setInitialSize( QSize( 350, 200 ) );
+ setInitialSize( TQSize( 350, 200 ) );
m_main = new MSNDebugRawCommand_base( this );
setMainWidget( m_main );
@@ -42,12 +42,12 @@ MSNDebugRawCmdDlg::~MSNDebugRawCmdDlg()
{
}
-QString MSNDebugRawCmdDlg::command()
+TQString MSNDebugRawCmdDlg::command()
{
return m_main->m_command->text();
}
-QString MSNDebugRawCmdDlg::params()
+TQString MSNDebugRawCmdDlg::params()
{
return m_main->m_params->text();
}
@@ -62,7 +62,7 @@ bool MSNDebugRawCmdDlg::addId()
return m_main->m_addId->isChecked();
}
-QString MSNDebugRawCmdDlg::msg()
+TQString MSNDebugRawCmdDlg::msg()
{
return m_main->m_msg->text();
}
diff --git a/kopete/protocols/msn/msndebugrawcmddlg.h b/kopete/protocols/msn/msndebugrawcmddlg.h
index 3721daae..7f9741e8 100644
--- a/kopete/protocols/msn/msndebugrawcmddlg.h
+++ b/kopete/protocols/msn/msndebugrawcmddlg.h
@@ -34,14 +34,14 @@ class MSNDebugRawCmdDlg : public KDialogBase
Q_OBJECT
public:
- MSNDebugRawCmdDlg( QWidget *parent );
+ MSNDebugRawCmdDlg( TQWidget *parent );
~MSNDebugRawCmdDlg();
- QString command();
- QString params();
+ TQString command();
+ TQString params();
bool addNewline();
bool addId();
- QString msg();
+ TQString msg();
private:
MSNDebugRawCommand_base *m_main;
diff --git a/kopete/protocols/msn/msnfiletransfersocket.cpp b/kopete/protocols/msn/msnfiletransfersocket.cpp
index 54a09e4a..c07fad06 100644
--- a/kopete/protocols/msn/msnfiletransfersocket.cpp
+++ b/kopete/protocols/msn/msnfiletransfersocket.cpp
@@ -21,7 +21,7 @@
#include <math.h>
//qt
-#include <qtimer.h>
+#include <tqtimer.h>
// kde
#include <kdebug.h>
@@ -40,7 +40,7 @@
using namespace KNetwork;
-MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Contact *c,bool incoming, QObject* parent)
+MSNFileTransferSocket::MSNFileTransferSocket(const TQString &handle, Kopete::Contact *c,bool incoming, TQObject* parent)
: MSNSocket(parent) , MSNInvitation(incoming, MSNFileTransferSocket::applicationID() , i18n("File Transfer - MSN Plugin"))
{
m_handle=handle;
@@ -50,8 +50,8 @@ MSNFileTransferSocket::MSNFileTransferSocket(const QString &handle, Kopete::Cont
m_contact=c;
ready=true;
- QObject::connect( this, SIGNAL( socketClosed() ), this, SLOT( slotSocketClosed() ) );
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ), this, SLOT(slotReadBlock( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( socketClosed() ), this, TQT_SLOT( slotSocketClosed() ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ), this, TQT_SLOT(slotReadBlock( const TQByteArray & ) ) );
}
MSNFileTransferSocket::~MSNFileTransferSocket()
@@ -61,7 +61,7 @@ MSNFileTransferSocket::~MSNFileTransferSocket()
kdDebug(14140) << "MSNFileTransferSocket::~MSNFileTransferSocket" <<endl;
}
-void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QString & data)
+void MSNFileTransferSocket::parseCommand(const TQString & cmd, uint id, const TQString & data)
{
if( cmd == "VER" )
{
@@ -83,7 +83,7 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt
m_size=id; //data.toUInt(); //BUG: the size is take as id bye MSNSocket because it is a number
m_downsize=0;
- m_file=new QFile(m_fileName);
+ m_file=new TQFile(m_fileName);
if( m_file->open( IO_WriteOnly ))
sendCommand( "TFR" ,NULL,false);
@@ -106,13 +106,13 @@ void MSNFileTransferSocket::parseCommand(const QString & cmd, uint id, const QSt
disconnect();
}
else
- sendCommand("FIL" , QString::number(size()) , false);
+ sendCommand("FIL" , TQString::number(size()) , false);
}
else if( cmd == "TFR" )
{
m_downsize=0;
ready=true;
- QTimer::singleShot( 0, this, SLOT(slotSendFile()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotSendFile()) );
}
else if( cmd == "CCL" )
{
@@ -131,12 +131,12 @@ void MSNFileTransferSocket::doneConnect()
MSNSocket::doneConnect();
}
-void MSNFileTransferSocket::bytesReceived(const QByteArray & head)
+void MSNFileTransferSocket::bytesReceived(const TQByteArray & head)
{
if(head[0]!='\0')
{
kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: transfer aborted" <<endl;
- QTimer::singleShot(0,this,SLOT(disconnect()));
+ TQTimer::singleShot(0,this,TQT_SLOT(disconnect()));
}
unsigned int sz=(int)((unsigned char)head.data()[2])*256+(int)((unsigned char)head.data()[1]);
// kdDebug(14140) << "MSNFileTransferSocket::bytesReceived: " << sz <<endl;
@@ -162,7 +162,7 @@ void MSNFileTransferSocket::slotSocketClosed()
emit done(this);
}
-void MSNFileTransferSocket::slotReadBlock(const QByteArray &block)
+void MSNFileTransferSocket::slotReadBlock(const TQByteArray &block)
{
m_file->writeBlock( block.data(), block.size() ); // write to file
@@ -175,7 +175,7 @@ void MSNFileTransferSocket::slotReadBlock(const QByteArray &block)
//the transfer seems to be finished.
sendCommand( "BYE" ,"16777989",false);
// if we are not already disconected in 30 seconds, do it.
- QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+ TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) );
}
}
@@ -185,8 +185,8 @@ void MSNFileTransferSocket::setKopeteTransfer(Kopete::Transfer *kt)
m_kopeteTransfer=kt;
if(kt)
{
- QObject::connect(kt , SIGNAL(transferCanceled()), this, SLOT(abort()));
- QObject::connect(kt, SIGNAL(destroyed()) , this , SLOT(slotKopeteTransferDestroyed()));
+ TQObject::connect(kt , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
+ TQObject::connect(kt, TQT_SIGNAL(destroyed()) , this , TQT_SLOT(slotKopeteTransferDestroyed()));
}
}
@@ -194,13 +194,13 @@ void MSNFileTransferSocket::listen(int port)
{
m_server = new KServerSocket();
- QObject::connect( m_server, SIGNAL(readyAccept()), this, SLOT(slotAcceptConnection()));
- m_server->setAddress(QString::number(port));
+ TQObject::connect( m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAcceptConnection()));
+ m_server->setAddress(TQString::number(port));
kdDebug(14140) << "MSNFileTransferSocket::listen: about to listen"<<endl;
bool listenResult = m_server->listen(1);
kdDebug(14140) << "MSNFileTransferSocket::listen: result: "<< listenResult <<endl;
- QTimer::singleShot( 60000, this, SLOT(slotTimer()) );
+ TQTimer::singleShot( 60000, this, TQT_SLOT(slotTimer()) );
kdDebug(14140) << "MSNFileTransferSocket::listen done" <<endl;
}
@@ -240,7 +240,7 @@ void MSNFileTransferSocket::abort()
}
else
{
- QByteArray bytes(3);
+ TQByteArray bytes(3);
bytes[0]='\1';
bytes[1]='\0';
bytes[2]='\0';
@@ -249,11 +249,11 @@ void MSNFileTransferSocket::abort()
}
//the timer wait one second, the time to send the CCL or the binary header
//retarding the disconnection keep away from a crash. (in KIO::Job::emitResult when `delete this`)
- QTimer::singleShot( 1000, this, SLOT(disconnect()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(disconnect()) );
ready=false;
}
-void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSize )
+void MSNFileTransferSocket::setFile( const TQString &fn, long unsigned int fileSize )
{
m_fileName=fn;
if(!m_incoming)
@@ -263,7 +263,7 @@ void MSNFileTransferSocket::setFile( const QString &fn, long unsigned int fileSi
kdDebug(14140) << "MSNFileTransferSocket::setFileName: WARNING m_file already exists" << endl;
delete m_file;
}
- m_file = new QFile( fn );
+ m_file = new TQFile( fn );
if(!m_file->open(IO_ReadOnly))
{
//FIXME: abort transfer here
@@ -286,7 +286,7 @@ void MSNFileTransferSocket::slotSendFile()
{
//the transfer seems to be finished.
// if we are not already disconected in 30 seconds, do it.
- QTimer::singleShot( 30000 , this, SLOT(disconnect() ) );
+ TQTimer::singleShot( 30000 , this, TQT_SLOT(disconnect() ) );
return;
}
@@ -295,7 +295,7 @@ void MSNFileTransferSocket::slotSendFile()
char data[2046];
int bytesRead = m_file->readBlock( data, 2045 );
- QByteArray block(bytesRead+3);
+ TQByteArray block(bytesRead+3);
// char i1= (char)fmod( bytesRead, 256 ) ;
// char i2= (char)floor( bytesRead / 256 ) ;
// kdDebug(14140) << "MSNFileTransferSocket::slotSendFile: " << (int)i1 <<" + 256* "<< (int)i2 <<" = " << bytesRead <<endl;
@@ -317,7 +317,7 @@ void MSNFileTransferSocket::slotSendFile()
}
ready=false;
- QTimer::singleShot( 10, this, SLOT(slotSendFile()) );
+ TQTimer::singleShot( 10, this, TQT_SLOT(slotSendFile()) );
}
void MSNFileTransferSocket::slotReadyWrite()
@@ -326,50 +326,50 @@ void MSNFileTransferSocket::slotReadyWrite()
MSNSocket::slotReadyWrite();
}
-QString MSNFileTransferSocket::invitationHead()
+TQString MSNFileTransferSocket::invitationHead()
{
- QTimer::singleShot( 10 * 60000, this, SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer
+ TQTimer::singleShot( 10 * 60000, this, TQT_SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer
- return QString( MSNInvitation::invitationHead()+
+ return TQString( MSNInvitation::invitationHead()+
"Application-File: "+ m_fileName.right( m_fileName.length() - m_fileName.findRev( '/' ) - 1 ) +"\r\n"
- "Application-FileSize: "+ QString::number(size()) +"\r\n\r\n").utf8();
+ "Application-FileSize: "+ TQString::number(size()) +"\r\n\r\n").utf8();
}
-void MSNFileTransferSocket::parseInvitation(const QString& msg)
+void MSNFileTransferSocket::parseInvitation(const TQString& msg)
{
- QRegExp rx("Invitation-Command: ([A-Z]*)");
+ TQRegExp rx("Invitation-Command: ([A-Z]*)");
rx.search(msg);
- QString command=rx.cap(1);
+ TQString command=rx.cap(1);
if( msg.contains("Invitation-Command: INVITE") )
{
- rx=QRegExp("Application-File: ([^\\r\\n]*)");
+ rx=TQRegExp("Application-File: ([^\\r\\n]*)");
rx.search(msg);
- QString filename = rx.cap(1);
- rx=QRegExp("Application-FileSize: ([0-9]*)");
+ TQString filename = rx.cap(1);
+ rx=TQRegExp("Application-FileSize: ([0-9]*)");
rx.search(msg);
unsigned long int filesize= rx.cap(1).toUInt();
MSNInvitation::parseInvitation(msg); //for the cookie
- Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, QString::null, QString::number( cookie() ) );
+ Kopete::TransferManager::transferManager()->askIncomingTransfer( m_contact , filename, filesize, TQString::null, TQString::number( cookie() ) );
- QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ),this, SLOT( slotFileTransferAccepted( Kopete::Transfer *, const QString& ) ) );
- QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) );
+ TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ),this, TQT_SLOT( slotFileTransferAccepted( Kopete::Transfer *, const TQString& ) ) );
+ TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, TQT_SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) );
}
else if( msg.contains("Invitation-Command: ACCEPT") )
{
if(incoming())
{
- rx=QRegExp("IP-Address: ([0-9\\.]*)");
+ rx=TQRegExp("IP-Address: ([0-9\\.]*)");
rx.search(msg);
- QString ip_address = rx.cap(1);
- rx=QRegExp("AuthCookie: ([0-9]*)");
+ TQString ip_address = rx.cap(1);
+ rx=TQRegExp("AuthCookie: ([0-9]*)");
rx.search(msg);
- QString authcook = rx.cap(1);
- rx=QRegExp("Port: ([0-9]*)");
+ TQString authcook = rx.cap(1);
+ rx=TQRegExp("Port: ([0-9]*)");
rx.search(msg);
- QString port = rx.cap(1);
+ TQString port = rx.cap(1);
setAuthCookie(authcook);
connect(ip_address, port.toUInt());
@@ -377,7 +377,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
else
{
unsigned long int auth = (rand()%(999999))+1;
- setAuthCookie(QString::number(auth));
+ setAuthCookie(TQString::number(auth));
setKopeteTransfer(Kopete::TransferManager::transferManager()->addTransfer(m_contact, fileName(), size(), m_contact->metaContact() ? m_contact->metaContact()->displayName() : m_contact->contactId() , Kopete::FileTransferInfo::Outgoing));
@@ -387,15 +387,15 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
MSNNotifySocket *notify=static_cast<MSNAccount*>(manager->account())->notifySocket();
if(notify){
- QCString message=QString(
+ TQCString message=TQString(
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: ACCEPT\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"IP-Address: " + notify->localIP() + "\r\n"
"Port: 6891\r\n"
- "AuthCookie: "+QString::number(auth)+"\r\n"
+ "AuthCookie: "+TQString::number(auth)+"\r\n"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n\r\n").utf8();
@@ -416,7 +416,7 @@ void MSNFileTransferSocket::parseInvitation(const QString& msg)
}
}
-void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const QString& fileName)
+void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, const TQString& fileName)
{
if(trans->info().internalId().toULong() != cookie())
return;
@@ -432,17 +432,17 @@ void MSNFileTransferSocket::slotFileTransferAccepted(Kopete::Transfer *trans, co
{
setFile(fileName);
- QCString message=QString(
+ TQCString message=TQString(
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: ACCEPT\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n" ).utf8();
manager->service()->sendCommand( "MSG" , "N", true, message );
- QTimer::singleShot( 3 * 60000, this, SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this
+ TQTimer::singleShot( 3 * 60000, this, TQT_SLOT(slotTimer()) ); //if after 3 minutes the transfer has not begin, delete this
}
else
{
diff --git a/kopete/protocols/msn/msnfiletransfersocket.h b/kopete/protocols/msn/msnfiletransfersocket.h
index 82ae0662..bf4a07a7 100644
--- a/kopete/protocols/msn/msnfiletransfersocket.h
+++ b/kopete/protocols/msn/msnfiletransfersocket.h
@@ -18,7 +18,7 @@
#ifndef MSNFILETRANSFERSOCKET_H
#define MSNFILETRANSFERSOCKET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "msnsocket.h"
#include "msninvitation.h"
@@ -42,24 +42,24 @@ class MSNFileTransferSocket : public MSNSocket , public MSNInvitation
Q_OBJECT
public:
- MSNFileTransferSocket(const QString &myID,Kopete::Contact* c, bool incoming, QObject* parent = 0L );
+ MSNFileTransferSocket(const TQString &myID,Kopete::Contact* c, bool incoming, TQObject* parent = 0L );
~MSNFileTransferSocket();
- static QString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; }
- QString invitationHead();
+ static TQString applicationID() { return "5D3E02AB-6190-11d3-BBBB-00C04F795683"; }
+ TQString invitationHead();
void setKopeteTransfer( Kopete::Transfer *kt );
Kopete::Transfer* kopeteTransfer() { return m_kopeteTransfer; }
- void setFile( const QString &fn, long unsigned int fileSize = 0L );
- void setAuthCookie( const QString &c ) { m_authcook = c; }
- QString fileName() { return m_fileName;}
+ void setFile( const TQString &fn, long unsigned int fileSize = 0L );
+ void setAuthCookie( const TQString &c ) { m_authcook = c; }
+ TQString fileName() { return m_fileName;}
long unsigned int size() { return m_size;}
void listen( int port );
- virtual void parseInvitation(const QString& invitation);
+ virtual void parseInvitation(const TQString& invitation);
- virtual QObject* object() { return this; }
+ virtual TQObject* object() { return this; }
public slots:
void abort();
@@ -78,35 +78,35 @@ protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand(const QString & cmd, uint id, const QString & data);
- virtual void bytesReceived(const QByteArray & data);
+ virtual void parseCommand(const TQString & cmd, uint id, const TQString & data);
+ virtual void bytesReceived(const TQByteArray & data);
protected slots:
virtual void slotReadyWrite();
private slots:
void slotSocketClosed();
- void slotReadBlock(const QByteArray &);
+ void slotReadBlock(const TQByteArray &);
void slotAcceptConnection();
void slotTimer();
void slotSendFile();
void slotFileTransferRefused( const Kopete::FileTransferInfo &info );
- void slotFileTransferAccepted( Kopete::Transfer *trans, const QString& fileName );
+ void slotFileTransferAccepted( Kopete::Transfer *trans, const TQString& fileName );
/* the Kopete::Transfer has been deleted */
void slotKopeteTransferDestroyed();
private:
- QString m_handle;
+ TQString m_handle;
Kopete::Contact *m_contact;
long unsigned int m_size;
long unsigned int m_downsize;
- QString m_authcook;
- QString m_fileName;
+ TQString m_authcook;
+ TQString m_fileName;
Kopete::Transfer* m_kopeteTransfer;
- QFile *m_file ;
+ TQFile *m_file ;
KNetwork::KServerSocket *m_server;
bool ready;
diff --git a/kopete/protocols/msn/msninvitation.cpp b/kopete/protocols/msn/msninvitation.cpp
index ddc8136a..8a64aa93 100644
--- a/kopete/protocols/msn/msninvitation.cpp
+++ b/kopete/protocols/msn/msninvitation.cpp
@@ -16,9 +16,9 @@
*/
#include "msninvitation.h"
#include <stdlib.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-MSNInvitation::MSNInvitation(bool incoming, const QString &applicationID , const QString &applicationName)
+MSNInvitation::MSNInvitation(bool incoming, const TQString &applicationID , const TQString &applicationName)
{
m_incoming=incoming;
m_applicationId=applicationID;
@@ -32,57 +32,57 @@ MSNInvitation::~MSNInvitation()
{
}
-QCString MSNInvitation::unimplemented(long unsigned int cookie)
+TQCString MSNInvitation::unimplemented(long unsigned int cookie)
{
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: CANCEL\r\n"
"Cancel-Code: REJECT_NOT_INSTALLED\r\n"
- "Invitation-Cookie: " + QString::number(cookie) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie) + "\r\n"
"Session-ID: {120019D9-C3F5-4F94-978D-CB33534C3309}\r\n\r\n").utf8();
//FIXME: i don't know at all what Seession-ID is
}
-QString MSNInvitation::invitationHead()
+TQString MSNInvitation::invitationHead()
{
setState(Invited);
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Application-Name: " + m_applicationName + "\r\n"
"Application-GUID: {" + m_applicationId + "}\r\n"
"Invitation-Command: INVITE\r\n"
- "Invitation-Cookie: " +QString::number(m_cookie) +"\r\n");
+ "Invitation-Cookie: " +TQString::number(m_cookie) +"\r\n");
}
-QCString MSNInvitation::rejectMessage(const QString & rejectcode)
+TQCString MSNInvitation::rejectMessage(const TQString & rejectcode)
{
- return QString( "MIME-Version: 1.0\r\n"
+ return TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: CANCEL\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"Cancel-Code: "+ rejectcode +"\r\n").utf8();
}
-void MSNInvitation::parseInvitation(const QString& msg)
+void MSNInvitation::parseInvitation(const TQString& msg)
{
- QRegExp rx("Invitation-Command: ([A-Z]*)");
+ TQRegExp rx("Invitation-Command: ([A-Z]*)");
rx.search(msg);
- QString command=rx.cap(1);
+ TQString command=rx.cap(1);
if(command=="INVITE")
{
- rx=QRegExp("Invitation-Cookie: ([0-9]*)");
+ rx=TQRegExp("Invitation-Cookie: ([0-9]*)");
rx.search(msg);
m_cookie=rx.cap(1).toUInt();
}
else if(command=="CANCEL")
{
- /*rx=QRegExp("Cancel-Code: ([0-9]*)");
+ /*rx=TQRegExp("Cancel-Code: ([0-9]*)");
rx.search(msg);
- QString code=rx.cap(1).toUInt();
+ TQString code=rx.cap(1).toUInt();
//TODO: parse the code*/
}
// else if(command=="ACCEPT")
diff --git a/kopete/protocols/msn/msninvitation.h b/kopete/protocols/msn/msninvitation.h
index 90010dc3..d8b48116 100644
--- a/kopete/protocols/msn/msninvitation.h
+++ b/kopete/protocols/msn/msninvitation.h
@@ -17,7 +17,7 @@
#ifndef MSNINVITATION_H
#define MSNINVITATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kopete_export.h"
@@ -27,7 +27,7 @@ class QObject;
* @author Olivier Goffart
*
* The invitation is the base class which handle an MSN invitation.
- * The implemented class must to herits from QObject too.
+ * The implemented class must to herits from TQObject too.
* You can accept the invitation by catching @ref MSNProtocol::invitation() signals
* or create one and insert it to a kmm with @ref MSNChatSession::initInvitation()
* you can add action with @ref Kopete::Plugin::customChatActions()
@@ -41,14 +41,14 @@ public:
* @param applicationID is the exadecimal id of the invitation
* @param applicationName is a i18n'ed string of the name of the application
*/
- MSNInvitation(bool incoming,const QString &applicationID , const QString &applicationName);
+ MSNInvitation(bool incoming,const TQString &applicationID , const TQString &applicationName);
virtual ~MSNInvitation();
/**
* @internal
* it is a reject invitation because the invitation is not implemented
*/
- static QCString unimplemented(long unsigned int cookie);
+ static TQCString unimplemented(long unsigned int cookie);
/**
* you can set manualy the cookie. note that a cookie is automatically generated when a new
@@ -71,24 +71,24 @@ public:
* the default implementation return the common begin.
* You can also set the state to Invited (the default implementation do that)
*/
- virtual QString invitationHead();
+ virtual TQString invitationHead();
/**
* This is the reject invitation string
* @param rejectcode is the code, it can be "REJECT" or "TIMEOUT"
*/
- QCString rejectMessage(const QString & rejectcode = "REJECT");
+ TQCString rejectMessage(const TQString & rejectcode = "REJECT");
/**
* reimplement this method. it is called when an invitation message with the invitation's cookie is received
* the default implementation parse the cookie, or the reject message
*/
- virtual void parseInvitation(const QString& invitation);
+ virtual void parseInvitation(const TQString& invitation);
/**
* return the qobject (this)
*/
- virtual QObject* object()=0;
+ virtual TQObject* object()=0;
//signals:
/**
* reimplement this as a signal, and emit it when the invitation has to be destroyed.
@@ -116,8 +116,8 @@ public:
protected:
bool m_incoming;
long unsigned int m_cookie;
- QString m_applicationId;
- QString m_applicationName;
+ TQString m_applicationId;
+ TQString m_applicationName;
State m_state;
diff --git a/kopete/protocols/msn/msnnotifysocket.cpp b/kopete/protocols/msn/msnnotifysocket.cpp
index e31e0257..3b3fc531 100644
--- a/kopete/protocols/msn/msnnotifysocket.cpp
+++ b/kopete/protocols/msn/msnnotifysocket.cpp
@@ -28,9 +28,9 @@
#include "msnsecureloginhandler.h"
#include "msnchallengehandler.h"
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -41,7 +41,7 @@
#include <ktempfile.h>
#include <krun.h>
#include <kio/job.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <knotification.h>
@@ -51,7 +51,7 @@
#include <ctime>
-MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/, const QString &password )
+MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const TQString& /*msnId*/, const TQString &password )
: MSNSocket( account )
{
m_newstatus = MSNProtocol::protocol()->NLN;
@@ -64,8 +64,8 @@ MSNNotifySocket::MSNNotifySocket( MSNAccount *account, const QString& /*msnId*/,
m_account = account;
m_password=password;
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ),
- this, SLOT( slotReadMessage( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ),
+ this, TQT_SLOT( slotReadMessage( const TQByteArray & ) ) );
m_keepaliveTimer = 0L;
m_isLogged = false;
}
@@ -91,7 +91,7 @@ void MSNNotifySocket::disconnect()
if( m_disconnectReason==Kopete::Account::Unknown )
m_disconnectReason=Kopete::Account::Manual;
if( onlineStatus() == Connected )
- sendCommand( "OUT", QString::null, false );
+ sendCommand( "OUT", TQString::null, false );
if( m_keepaliveTimer )
m_keepaliveTimer->stop();
@@ -107,11 +107,11 @@ void MSNNotifySocket::handleError( uint code, uint id )
{
kdDebug(14140) << k_funcinfo << endl;
- QString handle;
+ TQString handle;
if(m_tmpHandles.contains(id))
handle=m_tmpHandles[id];
- QString msg;
+ TQString msg;
MSNSocket::ErrorType type;
// See http://www.hypothetic.org/docs/msn/basics.php for a
// description of all possible error codes.
@@ -148,7 +148,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
}
/*else
{
- QString msg = i18n( "You are trying to change the display name of a user who has not "
+ TQString msg = i18n( "You are trying to change the display name of a user who has not "
"confirmed his or her email address;\n"
"the contact was not renamed on the server." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error, msg, i18n( "MSN Plugin" ) );
@@ -218,7 +218,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
{
/*
//if(handlev==m_account->accountId())
- QString msg = i18n( "Your email address has not been verified with the MSN server.\n"
+ TQString msg = i18n( "Your email address has not been verified with the MSN server.\n"
"You should have received a mail with a link to confirm your email address.\n"
"Some functions will be restricted if you do not confirm your email address." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) );//TODO don't show again
@@ -230,7 +230,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
//This happen when too much commends are sent to the server.
//the command will not be executed, too bad.
// ignore it for now, as we don't really know what command it was.
- /* QString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n"
+ /* TQString msg = i18#n( "You are trying to change your status, or your display name too rapidly.\n"
"This might happen if you added yourself to your own contact list." );
KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "MSN Plugin" ) );
//FIXME: try to fix this problem*/
@@ -262,7 +262,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
emit errorMessage( type, msg );
}
-void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &data )
+void MSNNotifySocket::parseCommand( const TQString &cmd, uint id, const TQString &data )
{
//kdDebug(14140) << "MSNNotifySocket::parseCommand: Command: " << cmd << endl;
@@ -288,9 +288,9 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
m_secureLoginHandler = new MSNSecureLoginHandler(m_account->accountId(), m_password, data.section( ' ' , 2 , 2 ));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginFailed()), this, SLOT(sslLoginFailed()));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginBadPassword()), this, SLOT(sslLoginIncorrect()));
- QObject::connect(m_secureLoginHandler, SIGNAL(loginSuccesful(QString )), this, SLOT(sslLoginSucceeded(QString )));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginFailed()), this, TQT_SLOT(sslLoginFailed()));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginBadPassword()), this, TQT_SLOT(sslLoginIncorrect()));
+ TQObject::connect(m_secureLoginHandler, TQT_SIGNAL(loginSuccesful(TQString )), this, TQT_SLOT(sslLoginSucceeded(TQString )));
m_secureLoginHandler->login();
}
@@ -300,7 +300,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
m_disconnectReason=Kopete::Account::Unknown;
// Synchronize with the server.
- QString lastSyncTime, lastChange;
+ TQString lastSyncTime, lastChange;
if(m_account->contacts().count() > 1)
{
@@ -331,10 +331,10 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
// LST N=passport@hotmail.com F=Display%20Name C=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 13 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// But can be
// LST N=passport@hotmail.com 10
- QString publicName, contactGuid, groups;
+ TQString publicName, contactGuid, groups;
uint lists;
- QRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
+ TQRegExp regex("N=([^ ]+)(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))? (\\d+)\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
regex.search(data);
// Capture passport email.
@@ -368,12 +368,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
MSNContact *c = static_cast<MSNContact*>( m_account->contacts()[ data.section( ' ', 1, 1 ) ] );
if( c && c->contactId() != m_account->accountId() )
{
- QString publicName=unescape( data.section( ' ', 2, 2 ) );
+ TQString publicName=unescape( data.section( ' ', 2, 2 ) );
if ( (publicName!=c->contactId() || c->hasProperty(Kopete::Global::Properties::self()->nickName().key()) ) &&
publicName!=c->property( Kopete::Global::Properties::self()->nickName()).value().toString() )
changePublicName(publicName,c->contactId());
- QString obj=unescape(data.section( ' ', 4, 4 ));
+ TQString obj=unescape(data.section( ' ', 4, 4 ));
c->setObject( obj );
c->setOnlineStatus( convertOnlineStatus( data.section( ' ', 0, 0 ) ) );
c->setClientFlags(data.section( ' ', 3, 3 ).toUInt());
@@ -391,7 +391,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
// UUX is sended to acknowledge that the server has received and processed the personal Message.
// if the result is 0, set the myself() contact personalMessage.
- if( data.section(' ', 0, 0) == QString::fromUtf8("0") )
+ if( data.section(' ', 0, 0) == TQString::fromUtf8("0") )
m_account->myself()->setProperty(MSNProtocol::protocol()->propPersonalMessage, m_propertyPersonalMessage);
}
else if( cmd == "FLN" )
@@ -405,7 +405,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "XFR" )
{
- QString stype=data.section( ' ', 0, 0 );
+ TQString stype=data.section( ' ', 0, 0 );
if( stype=="SB" ) //switchboard connection (chat)
{
// Address, AuthInfo
@@ -413,8 +413,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( stype=="NS" ) //notifysocket ; Got our notification server
{ //we are connecting and we receive the initial NS, or the msn server encounter a problem, and we are switching to another switchboard
- QString host = data.section( ' ', 1, 1 );
- QString server = host.section( ':', 0, 0 );
+ TQString host = data.section( ' ', 1, 1 );
+ TQString server = host.section( ':', 0, 0 );
uint port = host.section( ':', 1, 1 ).toUInt();
setOnlineStatus( Connected );
emit receivedNotificationServer( server, port );
@@ -425,12 +425,12 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
else if( cmd == "RNG" )
{
// SessionID, Address, AuthInfo, handle, publicName
- emit invitedToChat( QString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ),
+ emit invitedToChat( TQString::number( id ), data.section( ' ', 0, 0 ), data.section( ' ', 2, 2 ),
data.section( ' ', 3, 3 ), unescape( data.section( ' ', 4, 4 ) ) );
}
else if( cmd == "ADC" )
{
- QString msnId, list, publicName, contactGuid, groupGuid;
+ TQString msnId, list, publicName, contactGuid, groupGuid;
// Retrieve the list parameter (FL/AL/BL/RL)
list = data.section( ' ', 0, 0 );
@@ -441,7 +441,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
// ADC TrID RL N=example@passport.com F=friednly%20name
// ADC TrID FL N=ex@pas.com F=My%20Name C=contactGuid
// Thanks Gregg for that complex RegExp.
- QRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
+ TQRegExp regex("(?:N=([^ ]+))?(?: F=([^ ]+))?(?: C=([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}))?\\s?((?:[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12},?)*)$");
regex.search( data.section( ' ', 1 ) );
// Capture passport email.
@@ -460,7 +460,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "REM" ) // someone is removed from a list
{
- QString handle, list, contactGuid, groupGuid;
+ TQString handle, list, contactGuid, groupGuid;
list = data.section( ' ', 0, 0 );
if( list == "FL" )
{
@@ -495,13 +495,13 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
}
else if( cmd == "CHG" )
{
- QString status = data.section( ' ', 0, 0 );
+ TQString status = data.section( ' ', 0, 0 );
setOnlineStatus( Connected );
emit statusChanged( convertOnlineStatus( status ) );
}
else if( cmd == "SBP" )
{
- QString contactGuid, type, publicName;
+ TQString contactGuid, type, publicName;
contactGuid = data.section( ' ', 0, 0 );
type = data.section( ' ', 1, 1 );
if(type == "MFN" )
@@ -540,7 +540,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
m_challengeHandler = new MSNChallengeHandler("CFHUR$52U_{VIX5T", "PROD0101{0RM?UBW");
// Compute the challenge response hash, and send the response.
- QString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0));
+ TQString chlResponse = m_challengeHandler->computeHash(data.section(' ', 0, 0));
sendCommand("QRY", m_challengeHandler->productId(), true, chlResponse.utf8());
// Dispose of the challenge handler.
m_challengeHandler->deleteLater();
@@ -549,8 +549,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
else if( cmd == "SYN" )
{
// Retrieve the last synchronization timestamp known to the server.
- QString lastSyncTime = data.section( ' ', 1, 1 );
- QString lastChange = data.section( ' ', 0, 0 );
+ TQString lastSyncTime = data.section( ' ', 1, 1 );
+ TQString lastChange = data.section( ' ', 0, 0 );
if( lastSyncTime != m_account->configGroup()->readEntry("lastsynctime") ||
lastChange != m_account->configGroup()->readEntry("lastchange") )
{
@@ -576,8 +576,8 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
MSNContact *c = static_cast<MSNContact*>( m_account->myself() );
if( c )
{
- QString type = data.section( ' ', 0, 0 );
- QString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY????????
+ TQString type = data.section( ' ', 0, 0 );
+ TQString prpData = unescape( data.section( ' ', 1, 1 ) ); //SECURITY????????
c->setInfo( type, prpData );
m_account->configGroup()->writeEntry( type, prpData );
}
@@ -610,21 +610,21 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
{
// URL 6 /cgi-bin/HoTMaiL https://loginnet.passport.com/ppsecure/md5auth.srf?lc=1033 2
//example of reply: URL 10 /cgi-bin/HoTMaiL https://msnialogin.passport.com/ppsecure/md5auth.srf?lc=1036 3
- QString from_action_url = data.section( ' ', 1, 1 );
- QString rru = data.section( ' ', 0, 0 );
- QString id = data.section( ' ', 2, 2 );
+ TQString from_action_url = data.section( ' ', 1, 1 );
+ TQString rru = data.section( ' ', 0, 0 );
+ TQString id = data.section( ' ', 2, 2 );
//write the tmp file
- QString UserID=m_account->accountId();
+ TQString UserID=m_account->accountId();
time_t actualTime;
time(&actualTime);
- QString sl = QString::number( ( unsigned long ) actualTime - m_loginTime.toULong() );
+ TQString sl = TQString::number( ( unsigned long ) actualTime - m_loginTime.toULong() );
- QString md5this( m_MSPAuth + sl + m_password );
+ TQString md5this( m_MSPAuth + sl + m_password );
KMD5 md5( md5this.utf8() );
- QString hotmailRequest = "<html>\n"
+ TQString hotmailRequest = "<html>\n"
"<head>\n"
"<noscript>\n"
"<meta http-equiv=Refresh content=\"0; url=http://www.hotmail.com\">\n"
@@ -641,7 +641,7 @@ void MSNNotifySocket::parseCommand( const QString &cmd, uint id, const QString &
"<input type=\"hidden\" name=\"sl\" value=\"" + sl +"\">\n"
"<input type=\"hidden\" name=\"rru\" value=\"" + rru + "\">\n"
"<input type=\"hidden\" name=\"auth\" value=\"" + m_MSPAuth + "\">\n"
- "<input type=\"hidden\" name=\"creds\" value=\"" + QString::fromLatin1( md5.hexDigest() ) + "\">\n"
+ "<input type=\"hidden\" name=\"creds\" value=\"" + TQString::fromLatin1( md5.hexDigest() ) + "\">\n"
"<input type=\"hidden\" name=\"svc\" value=\"mail\">\n"
"<input type=\"hidden\" name=\"js\" value=\"yes\">\n"
"</form></body>\n</html>\n";
@@ -679,7 +679,7 @@ void MSNNotifySocket::sslLoginIncorrect()
disconnect();
}
-void MSNNotifySocket::sslLoginSucceeded(QString ticket)
+void MSNNotifySocket::sslLoginSucceeded(TQString ticket)
{
sendCommand("USR" , "TWN S " + ticket);
@@ -706,9 +706,9 @@ void MSNNotifySocket::slotOpenInbox()
sendCommand("URL", "INBOX" );
}
-void MSNNotifySocket::sendMail(const QString &email)
+void MSNNotifySocket::sendMail(const TQString &email)
{
- sendCommand("URL", QString("COMPOSE " + email).utf8() );
+ sendCommand("URL", TQString("COMPOSE " + email).utf8() );
}
bool MSNNotifySocket::setUseHttpMethod(bool useHttp)
@@ -723,17 +723,17 @@ bool MSNNotifySocket::setUseHttpMethod(bool useHttp)
}
else {
if( !m_keepaliveTimer ) {
- m_keepaliveTimer = new QTimer( this, "m_keepaliveTimer" );
- QObject::connect( m_keepaliveTimer, SIGNAL( timeout() ), SLOT( slotSendKeepAlive() ) );
+ m_keepaliveTimer = new TQTimer( this, "m_keepaliveTimer" );
+ TQObject::connect( m_keepaliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSendKeepAlive() ) );
}
}
return ret;
}
-void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
+void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
{
- QString msg = QString::fromUtf8(bytes, bytes.size());
+ TQString msg = TQString::fromUtf8(bytes, bytes.size());
if(msg.contains("text/x-msmsgsinitialmdatanotification"))
{
@@ -744,7 +744,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// IU - initial unread
// O - other mail
// OU - other unread.
- QRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>");
+ TQRegExp regex("<MD><E><I>(\\d+)?</I>(?:<IU>(\\d+)?</IU>)<O>(\\d+)?</O><OU>(\\d+)?</OU></E><Q>.*</Q></MD>");
regex.search(msg);
bool unread;
@@ -753,56 +753,56 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
if(unread && mailCount > 0)
{
// If there are new email message available, raise the unread email event.
- QObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.",
+ TQObject::connect(KNotification::event( "msn_mail", i18n( "You have one unread message in your MSN inbox.",
"You have %n unread messages in your MSN inbox.", mailCount ), 0 , 0 , i18n( "Open Inbox..." ) ),
- SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
+ TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
}
else if(msg.contains("text/x-msmsgsactivemailnotification"))
{
//this sends the server if mails are deleted
- QString m = msg.right(msg.length() - msg.find("Message-Delta:") );
+ TQString m = msg.right(msg.length() - msg.find("Message-Delta:") );
m = m.left(msg.find("\r\n"));
mailCount = mailCount - m.right(m.length() -m.find(" ")-1).toUInt();
}
else if(msg.contains("text/x-msmsgsemailnotification"))
{
//this sends the server if a new mail has arrived
- QRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)");
+ TQRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)");
rx.search(msg);
- QString m=rx.cap(1);
+ TQString m=rx.cap(1);
mailCount++;
//TODO: it is also possible to get the subject (but warning about the encoding)
- QObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m),
+ TQObject::connect(KNotification::event( "msn_mail",i18n( "You have one new email from %1 in your MSN inbox." ).arg(m),
0 , 0 , i18n( "Open Inbox..." ) ),
- SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
+ TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
else if(msg.contains("text/x-msmsgsprofile"))
{
//Hotmail profile
if(msg.contains("MSPAuth:"))
{
- QRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)");
+ TQRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)");
rx.search(msg);
m_MSPAuth=rx.cap(1);
}
if(msg.contains("sid:"))
{
- QRegExp rx("sid: ([0-9]*)");
+ TQRegExp rx("sid: ([0-9]*)");
rx.search(msg);
m_sid=rx.cap(1);
}
if(msg.contains("kv:"))
{
- QRegExp rx("kv: ([0-9]*)");
+ TQRegExp rx("kv: ([0-9]*)");
rx.search(msg);
m_kv=rx.cap(1);
}
if(msg.contains("LoginTime:"))
{
- QRegExp rx("LoginTime: ([0-9]*)");
+ TQRegExp rx("LoginTime: ([0-9]*)");
rx.search(msg);
m_loginTime=rx.cap(1);
}
@@ -810,18 +810,18 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
{
time_t actualTime;
time(&actualTime);
- m_loginTime=QString::number((unsigned long)actualTime);
+ m_loginTime=TQString::number((unsigned long)actualTime);
}
if(msg.contains("EmailEnabled:"))
{
- QRegExp rx("EmailEnabled: ([0-9]*)");
+ TQRegExp rx("EmailEnabled: ([0-9]*)");
rx.search(msg);
m_isHotmailAccount = (rx.cap(1).toUInt() == 1);
emit hotmailSeted(m_isHotmailAccount);
}
if(msg.contains("ClientIP:"))
{
- QRegExp rx("ClientIP: ([0-9.]*)");
+ TQRegExp rx("ClientIP: ([0-9.]*)");
rx.search(msg);
m_localIP = rx.cap(1);
}
@@ -846,29 +846,29 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// </NOTIFICATION>
// MSN sends out badly formed XML .. fix it for them (thanks MS!)
- QString notificationDOMAsString(msg);
+ TQString notificationDOMAsString(msg);
- QRegExp rx( "&(?!amp;)" ); // match ampersands but not &amp;
+ TQRegExp rx( "&(?!amp;)" ); // match ampersands but not &amp;
notificationDOMAsString.replace(rx, "&amp;");
- QDomDocument alertDOM;
+ TQDomDocument alertDOM;
alertDOM.setContent(notificationDOMAsString);
- QDomNodeList msgElements = alertDOM.elementsByTagName("MSG");
+ TQDomNodeList msgElements = alertDOM.elementsByTagName("MSG");
for (uint i = 0 ; i < msgElements.count() ; i++)
{
- QString subscString;
- QString actionString;
- QString textString;
+ TQString subscString;
+ TQString actionString;
+ TQString textString;
- QDomNode msgDOM = msgElements.item(i);
+ TQDomNode msgDOM = msgElements.item(i);
- QDomNodeList msgChildren = msgDOM.childNodes();
+ TQDomNodeList msgChildren = msgDOM.childNodes();
for (uint i = 0 ; i < msgChildren.length() ; i++) {
- QDomNode child = msgChildren.item(i);
- QDomElement element = child.toElement();
+ TQDomNode child = msgChildren.item(i);
+ TQDomElement element = child.toElement();
if (element.tagName() == "SUBSCR")
{
- QDomAttr subscElementURLAttribute;
+ TQDomAttr subscElementURLAttribute;
if (element.hasAttribute("url"))
{
subscElementURLAttribute = element.attributeNode("url");
@@ -878,7 +878,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
else if (element.tagName() == "ACTION")
{
// process ACTION node to pull out URL the alert is tied to
- QDomAttr actionElementURLAttribute;
+ TQDomAttr actionElementURLAttribute;
if (element.hasAttribute("url"))
{
actionElementURLAttribute = element.attributeNode("url");
@@ -888,10 +888,10 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
else if (element.tagName() == "BODY")
{
// process BODY node to get the text of the alert
- QDomNodeList textElements = element.elementsByTagName("TEXT");
+ TQDomNodeList textElements = element.elementsByTagName("TEXT");
if (textElements.count() >= 1)
{
- QDomElement textElement = textElements.item(0).toElement();
+ TQDomElement textElement = textElements.item(0).toElement();
textString = textElement.text();
}
}
@@ -901,7 +901,7 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
// kdDebug( 14140 ) << "subscString " << subscString << " actionString " << actionString << " textString " << textString << endl;
// build an internal list of actions ... we'll need to index into this list when we receive an event
- QStringList actions;
+ TQStringList actions;
actions.append(i18n("More Information"));
m_msnAlertURLs.append(actionString);
@@ -909,11 +909,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
m_msnAlertURLs.append(subscString);
// Don't do any MSN alerts notification for new blog updates
- if( subscString != QString::fromLatin1("s.htm") && actionString != QString::fromLatin1("a.htm") )
+ if( subscString != TQString::fromLatin1("s.htm") && actionString != TQString::fromLatin1("a.htm") )
{
KNotification* notification = KNotification::event("msn_alert", textString, 0L, 0L, actions);
- QObject::connect(notification, SIGNAL(activated(unsigned int)), this, SLOT(slotMSNAlertLink(unsigned int)));
- QObject::connect(notification, SIGNAL(closed()), this, SLOT(slotMSNAlertUnwanted()));
+ TQObject::connect(notification, TQT_SIGNAL(activated(unsigned int)), this, TQT_SLOT(slotMSNAlertLink(unsigned int)));
+ TQObject::connect(notification, TQT_SIGNAL(closed()), this, TQT_SLOT(slotMSNAlertUnwanted()));
}
} // end for each MSG tag
}
@@ -925,21 +925,21 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
if(!m_tmpLastHandle.isNull())
{
- QString personalMessage, currentMedia;
- QDomDocument psm;
+ TQString personalMessage, currentMedia;
+ TQDomDocument psm;
if( psm.setContent(msg) )
{
// Get the first child of the xml "document";
- QDomElement psmElement = psm.documentElement().firstChild().toElement();
+ TQDomElement psmElement = psm.documentElement().firstChild().toElement();
while( !psmElement.isNull() )
{
- if(psmElement.tagName() == QString::fromUtf8("PSM"))
+ if(psmElement.tagName() == TQString::fromUtf8("PSM"))
{
personalMessage = psmElement.text();
kdDebug(14140) << k_funcinfo << "Personnal Message received: " << personalMessage << endl;
}
- else if(psmElement.tagName() == QString::fromUtf8("CurrentMedia"))
+ else if(psmElement.tagName() == TQString::fromUtf8("CurrentMedia"))
{
if( !psmElement.text().isEmpty() )
{
@@ -956,11 +956,11 @@ void MSNNotifySocket::slotReadMessage( const QByteArray &bytes )
contact->setProperty(MSNProtocol::protocol()->propPersonalMessage, currentMedia.isEmpty() ? personalMessage : currentMedia);
}
}
- m_tmpLastHandle = QString::null;
+ m_tmpLastHandle = TQString::null;
}
}
-QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
+TQString MSNNotifySocket::processCurrentMedia( const TQString &mediaXmlElement )
{
/*
The value of the CurrentMedia tag you can think of like an array
@@ -985,10 +985,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
From http://msnpiki.msnfanatic.com/index.php/MSNP11:Changes
*/
- QString application, type, format, currentMedia;
+ TQString application, type, format, currentMedia;
bool enabled=false, test;
// \0 is textual, it's the "array" separator.
- QStringList argumentLists = QStringList::split(QString::fromUtf8("\\0"), mediaXmlElement, true);
+ TQStringList argumentLists = TQStringList::split(TQString::fromUtf8("\\0"), mediaXmlElement, true);
// Retrive the "stable" array elements.
application = argumentLists[0];
@@ -997,8 +997,8 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
format = argumentLists[3];
// Get the formatter strings
- QStringList formatterStrings;
- QStringList::ConstIterator it;
+ TQStringList formatterStrings;
+ TQStringList::ConstIterator it;
for( it = argumentLists.at(4); it != argumentLists.end(); ++it )
{
formatterStrings.append( *it );
@@ -1008,10 +1008,10 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
currentMedia = format;
for(uint i=0; i<formatterStrings.size(); i++)
{
- currentMedia = currentMedia.replace(QString("{%1}").arg(i), formatterStrings[i]);
+ currentMedia = currentMedia.replace(TQString("{%1}").arg(i), formatterStrings[i]);
}
- if( type == QString::fromUtf8("Music") )
+ if( type == TQString::fromUtf8("Music") )
{
// the "♫" is encoded in utf8 (and should be in utf8)
currentMedia = i18n("Now Listening: ♫ %1 ♫").arg(currentMedia);
@@ -1022,26 +1022,26 @@ QString MSNNotifySocket::processCurrentMedia( const QString &mediaXmlElement )
return currentMedia;
}
-void MSNNotifySocket::addGroup(const QString& groupName)
+void MSNNotifySocket::addGroup(const TQString& groupName)
{
// escape spaces
sendCommand( "ADG", escape( groupName ) );
}
-void MSNNotifySocket::renameGroup( const QString& groupName, const QString& groupGuid )
+void MSNNotifySocket::renameGroup( const TQString& groupName, const TQString& groupGuid )
{
// escape spaces
sendCommand( "REG", groupGuid + " " + escape( groupName ) );
}
-void MSNNotifySocket::removeGroup( const QString& groupGuid )
+void MSNNotifySocket::removeGroup( const TQString& groupGuid )
{
sendCommand( "RMG", groupGuid );
}
-void MSNNotifySocket::addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid )
+void MSNNotifySocket::addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid )
{
- QString args;
+ TQString args;
switch( list )
{
case MSNProtocol::FL:
@@ -1049,25 +1049,25 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString
// Adding the contact to a group
if( !contactGuid.isEmpty() )
{
- args = QString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid );
+ args = TQString("FL C=%1 %2").arg( contactGuid ).arg( groupGuid );
kdDebug(14140) << k_funcinfo << "In adding contact to a group" << endl;
}
// Adding a new contact
else
{
- args = QString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) );
+ args = TQString("FL N=%1 F=%2").arg( handle ).arg( escape( publicName ) );
kdDebug(14140) << k_funcinfo << "In adding contact to a new contact" << endl;
}
break;
}
case MSNProtocol::AL:
- args = QString("AL N=%1").arg( handle );
+ args = TQString("AL N=%1").arg( handle );
break;
case MSNProtocol::BL:
- args = QString("BL N=%1").arg( handle );
+ args = TQString("BL N=%1").arg( handle );
break;
case MSNProtocol::RL:
- args = QString("RL N=%1").arg( handle );
+ args = TQString("RL N=%1").arg( handle );
break;
default:
kdDebug(14140) << k_funcinfo <<"WARNING! Unknown list " << list << "!" << endl;
@@ -1077,9 +1077,9 @@ void MSNNotifySocket::addContact( const QString &handle, int list, const QString
m_tmpHandles[id]=handle;
}
-void MSNNotifySocket::removeContact( const QString &handle, int list, const QString& contactGuid, const QString& groupGuid )
+void MSNNotifySocket::removeContact( const TQString &handle, int list, const TQString& contactGuid, const TQString& groupGuid )
{
- QString args;
+ TQString args;
switch( list )
{
case MSNProtocol::FL:
@@ -1115,9 +1115,9 @@ void MSNNotifySocket::setStatus( const Kopete::OnlineStatus &status )
sendCommand( "CHG", statusToString( status ) + " " + m_account->myselfClientId() + " " + escape(m_account->pictureObject()) );
}
-void MSNNotifySocket::changePublicName( const QString &publicName, const QString &handle )
+void MSNNotifySocket::changePublicName( const TQString &publicName, const TQString &handle )
{
- QString tempPublicName = publicName;
+ TQString tempPublicName = publicName;
//The maximum length is 387. but with utf8 or encodage, each character may be triple
// 387/3 = 129 so we make sure the lenght is not logner than 129 char, even if
@@ -1144,10 +1144,10 @@ void MSNNotifySocket::changePublicName( const QString &publicName, const QString
}
}
-void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const QString &personalMessage )
+void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType type, const TQString &personalMessage )
{
- QString tempPersonalMessage;
- QString xmlCurrentMedia;
+ TQString tempPersonalMessage;
+ TQString xmlCurrentMedia;
// Only espace and cut the personalMessage is the type is normal.
if(type == MSNProtocol::PersonalMessageNormal)
@@ -1161,14 +1161,14 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
}
}
- QDomDocument xmlMessage;
+ TQDomDocument xmlMessage;
xmlMessage.appendChild( xmlMessage.createElement( "Data" ) );
- QDomElement psm = xmlMessage.createElement("PSM");
+ TQDomElement psm = xmlMessage.createElement("PSM");
psm.appendChild( xmlMessage.createTextNode( tempPersonalMessage ) );
xmlMessage.documentElement().appendChild( psm );
- QDomElement currentMedia = xmlMessage.createElement("CurrentMedia");
+ TQDomElement currentMedia = xmlMessage.createElement("CurrentMedia");
/* Example of currentMedia xml tag:
<CurrentMedia>\0Music\01\0{0} - {1}\0 Song Title\0Song Artist\0Song Album\0\0</CurrentMedia>
@@ -1180,22 +1180,22 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
case MSNProtocol::PersonalMessageMusic:
{
xmlCurrentMedia = "\\0Music\\01\\0";
- QStringList mediaList = QStringList::split(";", personalMessage);
- QString formatterArguments;
+ TQStringList mediaList = TQStringList::split(";", personalMessage);
+ TQString formatterArguments;
if( !mediaList[0].isEmpty() ) // Current Track
{
xmlCurrentMedia += "{0}";
- formatterArguments += QString("%1\\0").arg(mediaList[0]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[0]);
}
if( !mediaList[1].isEmpty() ) // Current Artist
{
xmlCurrentMedia += " - {1}";
- formatterArguments += QString("%1\\0").arg(mediaList[1]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[1]);
}
if( !mediaList[2].isEmpty() ) // Current Album
{
xmlCurrentMedia += " ({2})";
- formatterArguments += QString("%1\\0").arg(mediaList[2]);
+ formatterArguments += TQString("%1\\0").arg(mediaList[2]);
}
xmlCurrentMedia += "\\0" + formatterArguments + "\\0";
break;
@@ -1216,7 +1216,7 @@ void MSNNotifySocket::changePersonalMessage( MSNProtocol::PersonalMessageType ty
}
-void MSNNotifySocket::changePhoneNumber( const QString &key, const QString &data )
+void MSNNotifySocket::changePhoneNumber( const TQString &key, const TQString &data )
{
sendCommand( "PRP", key + " " + escape ( data ) );
}
@@ -1227,7 +1227,7 @@ void MSNNotifySocket::createChatSession()
sendCommand( "XFR", "SB" );
}
-QString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const
+TQString MSNNotifySocket::statusToString( const Kopete::OnlineStatus &status ) const
{
if( status == MSNProtocol::protocol()->NLN )
return "NLN";
@@ -1269,7 +1269,7 @@ void MSNNotifySocket::slotSendKeepAlive()
{
// Send a dummy command to fake activity. This makes sure MSN doesn't
// disconnect you when the notify socket is idle.
- sendCommand( "PNG" , QString::null , false );
+ sendCommand( "PNG" , TQString::null , false );
m_ping=true;
}
@@ -1278,7 +1278,7 @@ void MSNNotifySocket::slotSendKeepAlive()
m_tmpHandles.clear();
}
-Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const QString &status )
+Kopete::OnlineStatus MSNNotifySocket::convertOnlineStatus( const TQString &status )
{
if( status == "NLN" )
return MSNProtocol::protocol()->NLN;
diff --git a/kopete/protocols/msn/msnnotifysocket.h b/kopete/protocols/msn/msnnotifysocket.h
index 7f915410..e8c22158 100644
--- a/kopete/protocols/msn/msnnotifysocket.h
+++ b/kopete/protocols/msn/msnnotifysocket.h
@@ -44,34 +44,34 @@ class MSNNotifySocket : public MSNSocket
Q_OBJECT
public:
- MSNNotifySocket( MSNAccount* account, const QString &msnId, const QString &password );
+ MSNNotifySocket( MSNAccount* account, const TQString &msnId, const TQString &password );
~MSNNotifySocket();
virtual void disconnect();
void setStatus( const Kopete::OnlineStatus &status );
- void addContact( const QString &handle, int list, const QString& publicName, const QString& contactGuid, const QString& groupGuid );
- void removeContact( const QString &handle, int list, const QString &contactGuid, const QString &groupGuid );
+ void addContact( const TQString &handle, int list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid );
+ void removeContact( const TQString &handle, int list, const TQString &contactGuid, const TQString &groupGuid );
- void addGroup( const QString& groupName );
- void removeGroup( const QString& group );
- void renameGroup( const QString& groupName, const QString& groupGuid );
+ void addGroup( const TQString& groupName );
+ void removeGroup( const TQString& group );
+ void renameGroup( const TQString& groupName, const TQString& groupGuid );
- void changePublicName( const QString& publicName , const QString &handle=QString::null );
- void changePersonalMessage( MSNProtocol::PersonalMessageType type , const QString& personalMessage );
+ void changePublicName( const TQString& publicName , const TQString &handle=TQString::null );
+ void changePersonalMessage( MSNProtocol::PersonalMessageType type , const TQString& personalMessage );
- void changePhoneNumber( const QString &key, const QString &data );
+ void changePhoneNumber( const TQString &key, const TQString &data );
void createChatSession();
- void sendMail(const QString &email);
+ void sendMail(const TQString &email);
/**
* this should return a Kopete::Account::DisconnectReason value
*/
int disconnectReason() { return m_disconnectReason; }
- QString localIP() { return m_localIP; }
+ TQString localIP() { return m_localIP; }
bool setUseHttpMethod( bool useHttpMethod );
@@ -84,19 +84,19 @@ public slots:
signals:
void newContactList();
- void contactList(const QString& handle, const QString& publicName, const QString &contactGuid, uint lists, const QString& groups);
- void contactStatus(const QString&, const QString&, const QString& );
- void contactAdded(const QString& handle, const QString& list, const QString& publicName, const QString& contactGuid, const QString& groupGuid);
- //void contactRemoved(const QString&, const QString&, uint);
- void contactRemoved(const QString& handle, const QString& list, const QString& contactGuid, const QString& groupGuid);
+ void contactList(const TQString& handle, const TQString& publicName, const TQString &contactGuid, uint lists, const TQString& groups);
+ void contactStatus(const TQString&, const TQString&, const TQString& );
+ void contactAdded(const TQString& handle, const TQString& list, const TQString& publicName, const TQString& contactGuid, const TQString& groupGuid);
+ //void contactRemoved(const TQString&, const TQString&, uint);
+ void contactRemoved(const TQString& handle, const TQString& list, const TQString& contactGuid, const TQString& groupGuid);
- void groupListed(const QString&, const QString&);
- void groupAdded( const QString&, const QString&);
- void groupRenamed( const QString&, const QString& );
- void groupRemoved( const QString& );
+ void groupListed(const TQString&, const TQString&);
+ void groupAdded( const TQString&, const TQString&);
+ void groupRenamed( const TQString&, const TQString& );
+ void groupRemoved( const TQString& );
- void invitedToChat(const QString&, const QString&, const QString&, const QString&, const QString& );
- void startChat( const QString&, const QString& );
+ void invitedToChat(const TQString&, const TQString&, const TQString&, const TQString&, const TQString& );
+ void startChat( const TQString&, const TQString& );
void statusChanged( const Kopete::OnlineStatus &newStatus );
@@ -107,15 +107,15 @@ signals:
* When the dispatch server sends us the notification server to use, this
* signal is emitted. After this the socket is automatically closed.
*/
- void receivedNotificationServer( const QString &host, uint port );
+ void receivedNotificationServer( const TQString &host, uint port );
protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data );
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data );
/**
* Handle an MSN error condition.
@@ -136,7 +136,7 @@ private slots:
* We received a message from the server, which is sent as raw data,
* instead of cr/lf line-based text.
*/
- void slotReadMessage( const QByteArray &bytes );
+ void slotReadMessage( const TQByteArray &bytes );
/**
* Send a keepalive to the server to avoid idle connections to cause
@@ -146,18 +146,18 @@ private slots:
void sslLoginFailed();
void sslLoginIncorrect();
- void sslLoginSucceeded(QString ticket);
+ void sslLoginSucceeded(TQString ticket);
private:
/**
* Convert the MSN status strings to a Kopete::OnlineStatus
*/
- Kopete::OnlineStatus convertOnlineStatus( const QString &statusString );
+ Kopete::OnlineStatus convertOnlineStatus( const TQString &statusString );
MSNAccount *m_account;
- QString m_password;
- QStringList m_msnAlertURLs;
+ TQString m_password;
+ TQStringList m_msnAlertURLs;
unsigned int mailCount;
@@ -166,30 +166,30 @@ private:
/**
* Convert an entry of the Status enum back to a string
*/
- QString statusToString( const Kopete::OnlineStatus &status ) const;
+ TQString statusToString( const Kopete::OnlineStatus &status ) const;
/**
* Process the CurrentMedia XML element.
* @param mediaXmlElement the source XML element as text.
*/
- QString processCurrentMedia( const QString &mediaXmlElement );
+ TQString processCurrentMedia( const TQString &mediaXmlElement );
//know the last handle used
- QString m_tmpLastHandle;
- QMap <unsigned int,QString> m_tmpHandles;
- QString m_configFile;
+ TQString m_tmpLastHandle;
+ TQMap <unsigned int,TQString> m_tmpHandles;
+ TQString m_configFile;
//for hotmail inbox opening
bool m_isHotmailAccount;
- QString m_MSPAuth;
- QString m_kv;
- QString m_sid;
- QString m_loginTime;
- QString m_localIP;
+ TQString m_MSPAuth;
+ TQString m_kv;
+ TQString m_sid;
+ TQString m_loginTime;
+ TQString m_localIP;
MSNSecureLoginHandler *m_secureLoginHandler;
MSNChallengeHandler *m_challengeHandler;
- QTimer *m_keepaliveTimer;
+ TQTimer *m_keepaliveTimer;
bool m_ping;
@@ -199,7 +199,7 @@ private:
* Used to set the myself() personalMessage when the acknowledge(UUX) command is received.
* The personalMessage is built into @ref changePersonalMessage
*/
- QString m_propertyPersonalMessage;
+ TQString m_propertyPersonalMessage;
/**
* Used to tell when we are logged in to MSN Messeger service.
diff --git a/kopete/protocols/msn/msnprotocol.cpp b/kopete/protocols/msn/msnprotocol.cpp
index 2a5b4319..9c0007fc 100644
--- a/kopete/protocols/msn/msnprotocol.cpp
+++ b/kopete/protocols/msn/msnprotocol.cpp
@@ -18,7 +18,7 @@
*************************************************************************
*/
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -47,15 +47,15 @@ K_EXPORT_COMPONENT_FACTORY( libkopete_msn_shared, MSNProtocolFactory( "kopete_ms
MSNProtocol *MSNProtocol::s_protocol = 0L;
-MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList & /* args */ )
+MSNProtocol::MSNProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Protocol( MSNProtocolFactory::instance(), parent, name ),
- NLN( Kopete::OnlineStatus::Online, 25, this, 1, QString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ),
+ NLN( Kopete::OnlineStatus::Online, 25, this, 1, TQString::null, i18n( "Online" ) , i18n( "O&nline" ), Kopete::OnlineStatusManager::Online,Kopete::OnlineStatusManager::HasAwayMessage ),
BSY( Kopete::OnlineStatus::Away, 20, this, 2, "msn_busy", i18n( "Busy" ) , i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ),
BRB( Kopete::OnlineStatus::Away, 22, this, 3, "msn_brb", i18n( "Be Right Back" ), i18n( "Be &Right Back" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
AWY( Kopete::OnlineStatus::Away, 18, this, 4, "contact_away_overlay", i18n( "Away From Computer" ),i18n( "&Away" ), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ),
PHN( Kopete::OnlineStatus::Away, 12, this, 5, "contact_phone_overlay", i18n( "On the Phone" ) , i18n( "On The &Phone" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
LUN( Kopete::OnlineStatus::Away, 15, this, 6, "contact_food_overlay", i18n( "Out to Lunch" ) , i18n( "Out To &Lunch" ) , 0 , Kopete::OnlineStatusManager::HasAwayMessage ),
- FLN( Kopete::OnlineStatus::Offline, 0, this, 7, QString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ),
+ FLN( Kopete::OnlineStatus::Offline, 0, this, 7, TQString::null, i18n( "Offline" ) , i18n( "&Offline" ), Kopete::OnlineStatusManager::Offline,Kopete::OnlineStatusManager::DisabledIfOffline ),
HDN( Kopete::OnlineStatus::Invisible, 3, this, 8, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "&Invisible" ), Kopete::OnlineStatusManager::Invisible ),
IDL( Kopete::OnlineStatus::Away, 10, this, 9, "contact_away_overlay", i18n( "Idle" ) , i18n( "&Idle" ), Kopete::OnlineStatusManager::Idle , Kopete::OnlineStatusManager::HideFromMenu ),
UNK( Kopete::OnlineStatus::Unknown, 25, this, 0, "status_unknown", i18n( "Status not available" ) ),
@@ -77,16 +77,16 @@ MSNProtocol::MSNProtocol( QObject *parent, const char *name, const QStringList &
// m_status = m_unknownStatus = UNK;
}
-Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData,
- const QMap<QString, QString> & /* addressBookData */ )
+Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData,
+ const TQMap<TQString, TQString> & /* addressBookData */ )
{
- QString contactId = serializedData[ "contactId" ] ;
- QString accountId = serializedData[ "accountId" ] ;
- QString lists = serializedData[ "lists" ];
- QStringList groups = QStringList::split( ",", serializedData[ "groups" ] );
- QString contactGuid = serializedData[ "contactGuid" ] ;
+ TQString contactId = serializedData[ "contactId" ] ;
+ TQString accountId = serializedData[ "accountId" ] ;
+ TQString lists = serializedData[ "lists" ];
+ TQStringList groups = TQStringList::split( ",", serializedData[ "groups" ] );
+ TQString contactGuid = serializedData[ "contactGuid" ] ;
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this );
Kopete::Account *account = accounts[ accountId ];
if( !account )
@@ -95,7 +95,7 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta
// Create MSN contact
MSNContact *c = new MSNContact( account, contactId, metaContact );
- for( QStringList::Iterator it = groups.begin() ; it != groups.end(); ++it )
+ for( TQStringList::Iterator it = groups.begin() ; it != groups.end(); ++it )
c->contactAddedToGroup( *it, 0L /* FIXME - m_groupList[ ( *it ).toUInt() ]*/ );
c->m_obj= serializedData[ "obj" ];
@@ -111,17 +111,17 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta
return c;
}
-AddContactPage *MSNProtocol::createAddContactWidget(QWidget *parent , Kopete::Account *i)
+AddContactPage *MSNProtocol::createAddContactWidget(TQWidget *parent , Kopete::Account *i)
{
return (new MSNAddContactPage(i->isConnected(),parent));
}
-KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent)
+KopeteEditAccountWidget *MSNProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent)
{
return new MSNEditAccountWidget(this,account,parent);
}
-Kopete::Account *MSNProtocol::createNewAccount(const QString &accountId)
+Kopete::Account *MSNProtocol::createNewAccount(const TQString &accountId)
{
return new MSNAccount(this, accountId);
}
@@ -135,12 +135,12 @@ void MSNProtocol::slotSyncContactList()
return;
}
// First, delete D marked contacts
- QStringList localcontacts;
+ TQStringList localcontacts;
contactsFile->setGroup("Default");
contactsFile->readListEntry("Contacts",localcontacts);
- QString tmpUin;
+ TQString tmpUin;
tmpUin.sprintf("%d",uin);
tmp.append(tmpUin);
cnt=contactsFile->readNumEntry("Count",0);
@@ -152,15 +152,15 @@ MSNProtocol* MSNProtocol::protocol()
return s_protocol;
}
-bool MSNProtocol::validContactId(const QString& userid)
+bool MSNProtocol::validContactId(const TQString& userid)
{
return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0);
}
-QImage MSNProtocol::scalePicture(const QImage &picture)
+TQImage MSNProtocol::scalePicture(const TQImage &picture)
{
- QImage img(picture);
- img = img.smoothScale( 96, 96, QImage::ScaleMin );
+ TQImage img(picture);
+ img = img.smoothScale( 96, 96, TQImage::ScaleMin );
// crop image if not square
if(img.width() < img.height())
{
diff --git a/kopete/protocols/msn/msnprotocol.h b/kopete/protocols/msn/msnprotocol.h
index 7017fd90..77e3d171 100644
--- a/kopete/protocols/msn/msnprotocol.h
+++ b/kopete/protocols/msn/msnprotocol.h
@@ -21,8 +21,8 @@
#ifndef __msnprotocol_h__
#define __msnprotocol_h__
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kopeteprotocol.h"
#include "kopeteonlinestatus.h"
@@ -58,7 +58,7 @@ class KOPETE_EXPORT MSNProtocol : public Kopete::Protocol
Q_OBJECT
public:
- MSNProtocol( QObject *parent, const char *name, const QStringList &args );
+ MSNProtocol( TQObject *parent, const char *name, const TQStringList &args );
/**
* SyncMode indicates whether settings differing between client and
@@ -150,15 +150,15 @@ public:
};
virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact,
- const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData );
+ const TQMap<TQString, TQString> &serializedData, const TQMap<TQString, TQString> &addressBookData );
- virtual AddContactPage *createAddContactWidget( QWidget *parent , Kopete::Account *i);
- virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent);
- virtual Kopete::Account *createNewAccount(const QString &accountId);
+ virtual AddContactPage *createAddContactWidget( TQWidget *parent , Kopete::Account *i);
+ virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent);
+ virtual Kopete::Account *createNewAccount(const TQString &accountId);
static MSNProtocol* protocol();
- static bool validContactId(const QString&);
- QImage scalePicture(const QImage &picture);
+ static bool validContactId(const TQString&);
+ TQImage scalePicture(const TQImage &picture);
private slots:
void slotSyncContactList();
@@ -178,7 +178,7 @@ signals:
* @param msnMM is the message manager
* @param c is the contact
*/
- void invitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+ void invitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
};
#endif
diff --git a/kopete/protocols/msn/msnsecureloginhandler.cpp b/kopete/protocols/msn/msnsecureloginhandler.cpp
index 00f862fe..a795b43a 100644
--- a/kopete/protocols/msn/msnsecureloginhandler.cpp
+++ b/kopete/protocols/msn/msnsecureloginhandler.cpp
@@ -17,14 +17,14 @@
#include "msnsecureloginhandler.h"
// Qt includes
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kio/job.h>
#include <kurl.h>
#include <kdebug.h>
-MSNSecureLoginHandler::MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters)
+MSNSecureLoginHandler::MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters)
: m_password(password), m_accountId(accountId), m_authentification(authParameters)
{
@@ -45,7 +45,7 @@ void MSNSecureLoginHandler::login()
getLoginServer->addMetaData("cache", "reload");
getLoginServer->addMetaData("PropagateHttpHeader", "true");
- connect(getLoginServer, SIGNAL(result(KIO::Job *)), this, SLOT(slotLoginServerReceived(KIO::Job* )));
+ connect(getLoginServer, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotLoginServerReceived(KIO::Job* )));
}
void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
@@ -53,24 +53,24 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
if(!loginJob->error())
{
// Retrive the HTTP header
- QString httpHeaders = loginJob->queryMetaData("HTTP-Headers");
+ TQString httpHeaders = loginJob->queryMetaData("HTTP-Headers");
// Get the login URL using QRegExp
- QRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg=");
+ TQRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg=");
rx.search(httpHeaders);
// Set the loginUrl and loginServer
- QString loginUrl = rx.cap(2);
- QString loginServer = loginUrl.section('/', 0, 0);
+ TQString loginUrl = rx.cap(2);
+ TQString loginServer = loginUrl.section('/', 0, 0);
kdDebug(14140) << k_funcinfo << loginServer << endl;
- QString authURL = "https://" + loginUrl;
+ TQString authURL = "https://" + loginUrl;
KIO::Job *authJob = KIO::get(KURL(authURL), true, false);
authJob->addMetaData("cookies", "manual");
- QString authRequest = "Authorization: Passport1.4 "
+ TQString authRequest = "Authorization: Passport1.4 "
"OrgVerb=GET,"
"OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,"
"sign-in=" + KURL::encode_string(m_accountId) +
@@ -86,7 +86,7 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
authJob->addMetaData("cookies", "manual");
authJob->addMetaData("cache", "reload");
- connect(authJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotTweenerReceived(KIO::Job* )));
+ connect(authJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotTweenerReceived(KIO::Job* )));
}
else
{
@@ -100,21 +100,21 @@ void MSNSecureLoginHandler::slotTweenerReceived(KIO::Job *authJob)
{
if(!authJob->error())
{
- QString httpHeaders = authJob->queryMetaData("HTTP-Headers");
+ TQString httpHeaders = authJob->queryMetaData("HTTP-Headers");
// kdDebug(14140) << k_funcinfo << "HTTP headers: " << httpHeaders << endl;
// Check if we get "401 Unauthorized", thats means it's a bad password.
- if(httpHeaders.contains(QString::fromUtf8("401 Unauthorized")))
+ if(httpHeaders.contains(TQString::fromUtf8("401 Unauthorized")))
{
// kdDebug(14140) << k_funcinfo << "MSN Login Bad password." << endl;
emit loginBadPassword();
}
else
{
- QRegExp rx("from-PP='(.*)'");
+ TQRegExp rx("from-PP='(.*)'");
rx.search(httpHeaders);
- QString ticket = rx.cap(1);
+ TQString ticket = rx.cap(1);
// kdDebug(14140) << k_funcinfo << "Received ticket: " << ticket << endl;
diff --git a/kopete/protocols/msn/msnsecureloginhandler.h b/kopete/protocols/msn/msnsecureloginhandler.h
index 8e4dc466..8f913fc7 100644
--- a/kopete/protocols/msn/msnsecureloginhandler.h
+++ b/kopete/protocols/msn/msnsecureloginhandler.h
@@ -17,7 +17,7 @@
#ifndef MSNSECURELOGINHANDLER_H
#define MSNSECURELOGINHANDLER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -35,7 +35,7 @@ class MSNSecureLoginHandler : public QObject
{
Q_OBJECT
public:
- MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters);
+ MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters);
~MSNSecureLoginHandler();
@@ -43,9 +43,9 @@ public:
signals:
/**
- * TODO: return to const QString &
+ * TODO: return to const TQString &
*/
- void loginSuccesful(QString ticket);
+ void loginSuccesful(TQString ticket);
void loginBadPassword();
void loginFailed();
@@ -60,15 +60,15 @@ private:
/**
* Store the password.
*/
- QString m_password;
+ TQString m_password;
/**
* Store the accountId.
*/
- QString m_accountId;
+ TQString m_accountId;
/**
* Store the authentification parameters
*/
- QString m_authentification;
+ TQString m_authentification;
void displayMetaData(KIO::MetaData data);
};
diff --git a/kopete/protocols/msn/msnsocket.cpp b/kopete/protocols/msn/msnsocket.cpp
index a650cd83..0aaad25c 100644
--- a/kopete/protocols/msn/msnsocket.cpp
+++ b/kopete/protocols/msn/msnsocket.cpp
@@ -23,8 +23,8 @@
#include "msnsocket.h"
//#include "msnprotocol.h"
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -42,19 +42,19 @@ using namespace KNetwork;
class MimeMessage
{
public:
- MimeMessage(const QString &msg) : message(msg) {}
+ MimeMessage(const TQString &msg) : message(msg) {}
- QString getValue(const QString &key)
+ TQString getValue(const TQString &key)
{
- QRegExp rx(key+": ([^\r\n]+)");
+ TQRegExp rx(key+": ([^\r\n]+)");
rx.search(message);
return rx.cap(1);
}
private:
- QString message;
+ TQString message;
};
-MSNSocket::MSNSocket(QObject* parent) : QObject (parent)
+MSNSocket::MSNSocket(TQObject* parent) : TQObject (parent)
{
m_onlineStatus = Disconnected;
m_socket = 0L;
@@ -73,7 +73,7 @@ MSNSocket::~MSNSocket()
m_socket->deleteLater();
}
-void MSNSocket::connect( const QString &server, uint port )
+void MSNSocket::connect( const TQString &server, uint port )
{
if ( m_onlineStatus == Connected || m_onlineStatus == Connecting )
{
@@ -101,7 +101,7 @@ void MSNSocket::connect( const QString &server, uint port )
m_port = port;
if(!m_useHttp)
- m_socket = new KBufferedSocket( server, QString::number(port) );
+ m_socket = new KBufferedSocket( server, TQString::number(port) );
else {
m_socket = new KBufferedSocket( m_gateway, "80" );
}
@@ -112,20 +112,20 @@ void MSNSocket::connect( const QString &server, uint port )
// non-empty, so disable it until we have actual data in the queue
m_socket->enableWrite( false );
- QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) );
- QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) );
- QObject::connect( m_socket, SIGNAL( hostFound() ), this, SLOT( slotHostFound() ) );
- QObject::connect( m_socket, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotConnectionSuccess() ) );
- QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) );
- QObject::connect( m_socket, SIGNAL( closed( ) ), this, SLOT( slotSocketClosed( ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( hostFound() ), this, TQT_SLOT( slotHostFound() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotConnectionSuccess() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( closed( ) ), this, TQT_SLOT( slotSocketClosed( ) ) );
if(m_useHttp)
{
if(m_timer == 0L)
{
- m_timer = new QTimer(this, "Http poll timer");
+ m_timer = new TQTimer(this, "Http poll timer");
// Connect the slot HttpPoll with the timer timeout signal.
- QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(slotHttpPoll()));
+ TQObject::connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHttpPoll()));
}
}
@@ -181,7 +181,7 @@ void MSNSocket::slotSocketError( int error )
return;
//we only care about fatal error
- QString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" );
+ TQString errormsg = i18n( "There was an error while connecting to the MSN server.\nError message:\n" );
if ( error == KSocketBase::LookupFailure )
errormsg += i18n( "Unable to lookup %1" ).arg( m_socket->peerResolver().nodeName() );
else
@@ -212,7 +212,7 @@ void MSNSocket::slotDataReceived()
}
// incoming data, plus an extra char where we pretend a NUL is so the conversion
- // to QCString doesn't go over the end of the allocated memory.
+ // to TQCString doesn't go over the end of the allocated memory.
char *buffer = new char[ avail + 1 ];
int ret = m_socket->readBlock( buffer, avail );
@@ -240,16 +240,16 @@ void MSNSocket::slotDataReceived()
}
- QString rawData;
+ TQString rawData;
if(m_useHttp)
{
bool error = false;
- QByteArray bytes;
+ TQByteArray bytes;
// Check if all data has arrived.
- rawData = QString(QCString(buffer, avail + 1));
- bool headers = (rawData.find(QRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
+ rawData = TQString(TQCString(buffer, avail + 1));
+ bool headers = (rawData.find(TQRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
if(headers)
{
@@ -258,7 +258,7 @@ void MSNSocket::slotDataReceived()
if((endOfHeaders + 4) == avail)
{
// Only the response headers data is included.
- QRegExp re("Content-Length: ([^\r\n]+)");
+ TQRegExp re("Content-Length: ([^\r\n]+)");
if(re.search(rawData) != -1)
{
bool valid;
@@ -312,9 +312,9 @@ void MSNSocket::slotDataReceived()
{
// If we received a valid response, read the required headers.
// Retrieve the X-MSN-Messenger header.
- QString header = response.getHeaders()->getValue("X-MSN-Messenger");
+ TQString header = response.getHeaders()->getValue("X-MSN-Messenger");
- QStringList parts = QStringList::split(";", header.replace(" ", ""));
+ TQStringList parts = TQStringList::split(";", header.replace(" ", ""));
if(!header.isNull() && (parts.count() >= 2))
{
if(parts[0].find("SessionID", 0) != -1)
@@ -361,7 +361,7 @@ void MSNSocket::slotDataReceived()
if(valid && (length > 0))
{
// Otherwise, if the content length is greater than zero, get the web response stream.
- QDataStream *stream = response.getResponseStream();
+ TQDataStream *stream = response.getResponseStream();
buffer = new char[length];
// Read the web response content.
stream->readRawBytes(buffer, length);
@@ -390,8 +390,8 @@ void MSNSocket::slotDataReceived()
// all MSN commands start with one or more uppercase characters.
// For now just check the first three chars, let's see how accurate it is.
// Additionally, if we receive an MSN-P2P packet, strip off anything after the P2P header.
- rawData = QString( QCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace(
- QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
+ rawData = TQString( TQCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace(
+ TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
bool isBinary = false;
for ( uint i = 0; i < 3 ; ++i )
@@ -429,7 +429,7 @@ void MSNSocket::slotReadLine()
if ( m_buffer.size() >= 3 && ( m_buffer.data()[ 0 ] == '\0' || m_buffer.data()[ 0 ]== '\1' ) )
{
bytesReceived( m_buffer.take( 3 ) );
- QTimer::singleShot( 0, this, SLOT( slotReadLine() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) );
return;
}
@@ -445,13 +445,13 @@ void MSNSocket::slotReadLine()
if ( index != -1 )
{
- QString command = QString::fromUtf8( m_buffer.take( index + 2 ), index );
+ TQString command = TQString::fromUtf8( m_buffer.take( index + 2 ), index );
command.replace( "\r\n", "" );
//kdDebug( 14141 ) << k_funcinfo << command << endl;
// Don't block the GUI while parsing data, only do a single line!
// (Done before parseLine() to prevent a potential crash)
- QTimer::singleShot( 0, this, SLOT( slotReadLine() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReadLine() ) );
parseLine( command );
// WARNING: At this point 'this' can be deleted (when disconnecting)
@@ -489,7 +489,7 @@ bool MSNSocket::pollReadBlock()
return true;
}
- QByteArray block = m_buffer.take( m_waitBlockSize );
+ TQByteArray block = m_buffer.take( m_waitBlockSize );
//kdDebug( 14140 ) << k_funcinfo << "Successfully read block of size " << m_waitBlockSize << endl;
@@ -499,10 +499,10 @@ bool MSNSocket::pollReadBlock()
return false;
}
-void MSNSocket::parseLine( const QString &str )
+void MSNSocket::parseLine( const TQString &str )
{
- QString cmd = str.section( ' ', 0, 0 );
- QString data = str.section( ' ', 2 ).replace( "\r\n" , "" );
+ TQString cmd = str.section( ' ', 0, 0 );
+ TQString data = str.section( ' ', 2 ).replace( "\r\n" , "" );
bool isNum;
uint id = str.section( ' ', 1, 1 ).toUInt( &isNum );
@@ -529,7 +529,7 @@ void MSNSocket::parseLine( const QString &str )
void MSNSocket::handleError( uint code, uint /* id */ )
{
kdDebug(14140) << k_funcinfo << endl;
- QString msg;
+ TQString msg;
ErrorType type = ErrorServerError;
switch ( code )
{
@@ -605,7 +605,7 @@ void MSNSocket::handleError( uint code, uint /* id */ )
return;
}
-int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId, const QByteArray &body, bool binary )
+int MSNSocket::sendCommand( const TQString &cmd, const TQString &args, bool addId, const TQByteArray &body, bool binary )
{
if ( !m_socket )
{
@@ -613,22 +613,22 @@ int MSNSocket::sendCommand( const QString &cmd, const QString &args, bool addId,
return -1;
}
- QCString data = cmd.utf8();
+ TQCString data = cmd.utf8();
if ( addId )
- data += " " + QString::number( m_id ).utf8();
+ data += " " + TQString::number( m_id ).utf8();
if ( !args.isEmpty() )
data += " " + args.utf8();
// Add length in bytes, not characters
if ( !body.isEmpty() )
- data += " " + QString::number( body.size() - (binary ? 0 : 1 ) ).utf8();
+ data += " " + TQString::number( body.size() - (binary ? 0 : 1 ) ).utf8();
data += "\r\n";
// the command will be sent in slotReadyWrite
- QByteArray bytes;
+ TQByteArray bytes;
const uint length = data.length();
bytes.duplicate(data.data(), length);
if(!body.isEmpty())
@@ -657,7 +657,7 @@ void MSNSocket::slotReadyWrite()
if ( !m_sendQueue.isEmpty() )
{
// If the command queue is not empty, retrieve the first command.
- QValueList<QByteArray>::Iterator it = m_sendQueue.begin();
+ TQValueList<TQByteArray>::Iterator it = m_sendQueue.begin();
if(m_useHttp)
{
@@ -668,8 +668,8 @@ void MSNSocket::slotReadyWrite()
// Temporarily disable http polling.
m_bCanPoll = false;
// Set the host to the msn gateway by default.
- QString host = m_gateway;
- QString query; // Web request query string.
+ TQString host = m_gateway;
+ TQString query; // Web request query string.
if(m_bIsFirstInTransaction)
{
@@ -689,11 +689,11 @@ void MSNSocket::slotReadyWrite()
}
// Create the web request headers.
- QString s = makeHttpRequestString(host, query, (*it).size());
+ TQString s = makeHttpRequestString(host, query, (*it).size());
uint length = s.length();
// Create the web request bytes.
- QByteArray bytes(length + (*it).size());
+ TQByteArray bytes(length + (*it).size());
// Copy the request headers into the request bytes.
for(uint i=0; i < length; i++)
@@ -702,7 +702,7 @@ void MSNSocket::slotReadyWrite()
for(uint i=0; i < (*it).size(); i++)
bytes[length + i] = (*it)[i];
- kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << QString(*it).stripWhiteSpace() << endl;
+ kdDebug( 14141 ) << k_funcinfo << "Sending http command: " << TQString(*it).stripWhiteSpace() << endl;
// Write the request bytes to the socket.
m_socket->writeBlock(bytes.data(), bytes.size());
@@ -725,8 +725,8 @@ void MSNSocket::slotReadyWrite()
// Simple check to avoid dumping the binary data from the icons and emoticons to kdDebug:
// When sending an MSN-P2P packet, strip off anything after the P2P header.
- QString debugData = QString( *it ).stripWhiteSpace().replace(
- QRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
+ TQString debugData = TQString( *it ).stripWhiteSpace().replace(
+ TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
kdDebug( 14141 ) << k_funcinfo << "Sending command: " << debugData << endl;
m_socket->writeBlock( *it, ( *it ).size() );
@@ -750,14 +750,14 @@ void MSNSocket::slotReadyWrite()
}
}
-QString MSNSocket::escape( const QString &str )
+TQString MSNSocket::escape( const TQString &str )
{
//return ( KURL::encode_string( str, 106 ) );
//It's not needed to encode everything. The official msn client only encode spaces and %
//If we encode more, the size can be longer than excepted.
int old_length= str.length();
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -780,20 +780,20 @@ QString MSNSocket::escape( const QString &str )
new_segment[ new_length++ ] = str[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-QString MSNSocket::unescape( const QString &str )
+TQString MSNSocket::unescape( const TQString &str )
{
- QString str2 = KURL::decode_string( str, 106 );
+ TQString str2 = KURL::decode_string( str, 106 );
//remove msn+ colors code
- str2 = str2.replace( QRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
+ str2 = str2.replace( TQRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
// added by kaoul <erwin.kwolek at gmail.com>
- str2 = str2.replace( QRegExp("\\xB7[&@\'#0]"),""); // dot ...
- str2 = str2.replace( QRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
+ str2 = str2.replace( TQRegExp("\\xB7[&@\'#0]"),""); // dot ...
+ str2 = str2.replace( TQRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
return str2;
}
@@ -847,7 +847,7 @@ void MSNSocket::slotHttpPoll()
}
// Create the http request headers.
- const QCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8();
+ const TQCString headers = makeHttpRequestString(m_gwip, "Action=poll&SessionID=" + m_sessionId, 0).utf8();
m_socket->writeBlock(headers, headers.length());
// Wait for the response.
m_pending = true;
@@ -856,12 +856,12 @@ void MSNSocket::slotHttpPoll()
// Used in MSNFileTransferSocket
// FIXME: Why is this here if it's only used for file transfer? - Martijn
-void MSNSocket::bytesReceived( const QByteArray & /* data */ )
+void MSNSocket::bytesReceived( const TQByteArray & /* data */ )
{
kdWarning( 14140 ) << k_funcinfo << "Unknown bytes were received" << endl;
}
-void MSNSocket::sendBytes( const QByteArray &data )
+void MSNSocket::sendBytes( const TQByteArray &data )
{
if ( !m_socket )
{
@@ -879,13 +879,13 @@ bool MSNSocket::setUseHttpMethod( bool useHttp )
return true;
if( useHttp ) {
- QString s = QString( this->className() ).lower();
+ TQString s = TQString( this->className() ).lower();
if( s == "msnnotifysocket" )
m_type = "NS";
else if( s == "msnswitchboardsocket" )
m_type = "SB";
else
- m_type = QString::null;
+ m_type = TQString::null;
if( m_type.isNull() )
return false;
@@ -938,23 +938,23 @@ bool MSNSocket::accept( KServerSocket *server )
m_socket->enableRead( true );
m_socket->enableWrite( true );
- QObject::connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotDataReceived() ) );
- QObject::connect( m_socket, SIGNAL( readyWrite() ), this, SLOT( slotReadyWrite() ) );
- QObject::connect( m_socket, SIGNAL( closed() ), this, SLOT( slotSocketClosed() ) );
- QObject::connect( m_socket, SIGNAL( gotError( int ) ), this, SLOT( slotSocketError( int ) ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotDataReceived() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( slotReadyWrite() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSocketClosed() ) );
+ TQObject::connect( m_socket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotSocketError( int ) ) );
doneConnect();
return true;
}
-QString MSNSocket::getLocalIP()
+TQString MSNSocket::getLocalIP()
{
if ( !m_socket )
- return QString::null;
+ return TQString::null;
const KSocketAddress address = m_socket->localAddress();
- QString ip = address.nodeName();
+ TQString ip = address.nodeName();
kdDebug( 14140 ) << k_funcinfo << "IP: " << ip <<endl;
//delete address;
@@ -962,7 +962,7 @@ QString MSNSocket::getLocalIP()
}
MSNSocket::Buffer::Buffer( unsigned int sz )
-: QByteArray( sz )
+: TQByteArray( sz )
{
}
@@ -982,15 +982,15 @@ void MSNSocket::Buffer::add( char *str, unsigned int sz )
delete[] b;
}
-QByteArray MSNSocket::Buffer::take( unsigned blockSize )
+TQByteArray MSNSocket::Buffer::take( unsigned blockSize )
{
if ( size() < blockSize )
{
kdWarning( 14140 ) << k_funcinfo << "Buffer size " << size() << " < asked size " << blockSize << "!" << endl;
- return QByteArray();
+ return TQByteArray();
}
- QByteArray rep( blockSize );
+ TQByteArray rep( blockSize );
for( uint i = 0; i < blockSize; i++ )
rep[ i ] = data()[ i ];
@@ -1003,9 +1003,9 @@ QByteArray MSNSocket::Buffer::take( unsigned blockSize )
return rep;
}
-QString MSNSocket::makeHttpRequestString(const QString& host, const QString& query, uint contentLength)
+TQString MSNSocket::makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength)
{
- QString s(
+ TQString s(
"POST http://" + host + "/gateway/gateway.dll?" + query + " HTTP/1.1\r\n" +
"Accept: */*\r\n" +
"Accept-Language: en-us\r\n" +
@@ -1015,22 +1015,22 @@ QString MSNSocket::makeHttpRequestString(const QString& host, const QString& que
"Connection: Keep-Alive\r\n" +
"Pragma: no-cache\r\n" +
"Content-Type: application/x-msn-messenger\r\n" +
- "Content-Length: " + QString::number(contentLength) + "\r\n" +
+ "Content-Length: " + TQString::number(contentLength) + "\r\n" +
"\r\n");
return s;
}
-MSNSocket::WebResponse::WebResponse(const QByteArray& bytes)
+MSNSocket::WebResponse::WebResponse(const TQByteArray& bytes)
{
m_statusCode = 0;
m_stream = 0;
int headerEnd;
- QString header;
- QString data(QCString(bytes, bytes.size() + 1));
+ TQString header;
+ TQString data(TQCString(bytes, bytes.size() + 1));
// Parse the HTTP status header
- QRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)");
+ TQRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)");
headerEnd = data.find("\r\n");
header = data.left( (headerEnd == -1) ? 20 : headerEnd );
@@ -1055,11 +1055,11 @@ MSNSocket::WebResponse::WebResponse(const QByteArray& bytes)
// copy the web response content bytes.
int offset = bytes.size() - length;
- QByteArray content(length);
+ TQByteArray content(length);
for(int i=0; i < length; i++)
content[i] = bytes[offset + i];
// Create the web response stream from the response content bytes.
- m_stream = new QDataStream(content, IO_ReadOnly);
+ m_stream = new TQDataStream(content, IO_ReadOnly);
}
}
}
@@ -1077,7 +1077,7 @@ MimeMessage* MSNSocket::WebResponse::getHeaders()
return m_headers;
}
-QDataStream* MSNSocket::WebResponse::getResponseStream()
+TQDataStream* MSNSocket::WebResponse::getResponseStream()
{
return m_stream;
}
@@ -1087,7 +1087,7 @@ int MSNSocket::WebResponse::getStatusCode()
return m_statusCode;
}
-QString MSNSocket::WebResponse::getStatusDescription()
+TQString MSNSocket::WebResponse::getStatusDescription()
{
return m_statusDescription;
}
diff --git a/kopete/protocols/msn/msnsocket.h b/kopete/protocols/msn/msnsocket.h
index 85df08c7..96bfd0cb 100644
--- a/kopete/protocols/msn/msnsocket.h
+++ b/kopete/protocols/msn/msnsocket.h
@@ -22,11 +22,11 @@
#ifndef MSNSOCKET_H
#define MSNSOCKET_H
-#include <qobject.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
#include "kopete_export.h"
@@ -49,7 +49,7 @@ class KOPETE_EXPORT MSNSocket : public QObject
Q_OBJECT
public:
- MSNSocket(QObject* parent=0l);
+ MSNSocket(TQObject* parent=0l);
~MSNSocket();
/**
@@ -85,7 +85,7 @@ public:
* return the local ip.
* Used for filetransfer
*/
- QString getLocalIP();
+ TQString getLocalIP();
//BEGIN Http
@@ -95,7 +95,7 @@ public:
//END
public slots:
- void connect( const QString &server, uint port );
+ void connect( const TQString &server, uint port );
virtual void disconnect();
@@ -113,15 +113,15 @@ public slots:
*
* return the id
*/
- int sendCommand( const QString &cmd, const QString &args = QString::null,
- bool addId = true, const QByteArray &body = QByteArray() , bool binary=false );
+ int sendCommand( const TQString &cmd, const TQString &args = TQString::null,
+ bool addId = true, const TQByteArray &body = TQByteArray() , bool binary=false );
signals:
/**
* A block read is ready.
* After this the normal line-based reads go on again
*/
- void blockRead( const QByteArray &block );
+ void blockRead( const TQByteArray &block );
/**
* The online status has changed
@@ -141,19 +141,19 @@ signals:
/**
* A error has occured. Handle the display of the message.
*/
- void errorMessage( int type, const QString &msg );
+ void errorMessage( int type, const TQString &msg );
protected:
/**
* Convenience method: escape spaces with '%20' for use in the protocol.
* Doesn't escape any other sequence.
*/
- QString escape( const QString &str );
+ TQString escape( const TQString &str );
/**
* And the other way round...
*/
- QString unescape( const QString &str );
+ TQString unescape( const TQString &str );
/**
* Set the online status. Emits onlineStatusChanged.
@@ -193,17 +193,17 @@ protected:
* This method is pure virtual and *must* be overridden in derived
* classes.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data ) = 0;
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data ) = 0;
/**
* Used in MSNFileTransferSocket
*/
- virtual void bytesReceived( const QByteArray & );
+ virtual void bytesReceived( const TQByteArray & );
bool accept( KNetwork::KServerSocket * );
- void sendBytes( const QByteArray &data );
+ void sendBytes( const TQByteArray &data );
- const QString &server() { return m_server; }
+ const TQString &server() { return m_server; }
uint port() { return m_port; }
/**
@@ -268,19 +268,19 @@ private:
* Queue of pending commands (should be mostly empty, but is needed to
* send more than one command to the server)
*/
- QValueList<QByteArray> m_sendQueue;
+ TQValueList<TQByteArray> m_sendQueue;
/**
* Parse a single line of data.
* Will call either parseCommand or handleError depending on the type of
* data received.
*/
- void parseLine( const QString &str );
+ void parseLine( const TQString &str );
KNetwork::KBufferedSocket *m_socket;
OnlineStatus m_onlineStatus;
- QString m_server;
+ TQString m_server;
uint m_port;
/**
@@ -294,7 +294,7 @@ private:
Buffer( unsigned size = 0 );
~Buffer();
void add( char *str, unsigned size );
- QByteArray take( unsigned size );
+ TQByteArray take( unsigned size );
};
Buffer m_buffer;
@@ -305,18 +305,18 @@ private:
* Makes a http request headers string using the specified, host, query, and content length.
* return: The string containing the http request headers.
*/
- QString makeHttpRequestString(const QString& host, const QString& query, uint contentLength);
+ TQString makeHttpRequestString(const TQString& host, const TQString& query, uint contentLength);
bool m_useHttp; // Indicates whether to use the msn http gateway to connect to the msn service.
bool m_bCanPoll; // Indicates whether polling of the http server is allowed.
bool m_bIsFirstInTransaction; // Indicates whether pending message to be sent is the first in the transaction.
// If so, the gateway is used.
// Use the gateway only for initial connected state; Otherwise, use the host.
- QString m_gateway; // Msn http gateway domain name.
- QString m_gwip; // The ip address of the msn gateway.
- QString m_sessionId; // session id.
- QTimer *m_timer; // Msn http poll timer.
- QString m_type; // Indicates the type of socket being used. NS or SB
+ TQString m_gateway; // Msn http gateway domain name.
+ TQString m_gwip; // The ip address of the msn gateway.
+ TQString m_sessionId; // session id.
+ TQTimer *m_timer; // Msn http poll timer.
+ TQString m_type; // Indicates the type of socket being used. NS or SB
bool m_pending; // Indicates whether a http response is pending.
int m_remaining; // Indicates how many bytes of content data remain
// to be received if the content bytes are sent in
@@ -328,7 +328,7 @@ private:
class WebResponse
{
public:
- WebResponse(const QByteArray& bytes);
+ WebResponse(const TQByteArray& bytes);
~WebResponse();
/**
@@ -338,7 +338,7 @@ private:
/**
* Gets the data stream used to read the body of the response from the server.
*/
- QDataStream* getResponseStream();
+ TQDataStream* getResponseStream();
/**
* Gets the status code of the response.
*/
@@ -346,13 +346,13 @@ private:
/**
* Gets the status description returned with the response.
*/
- QString getStatusDescription();
+ TQString getStatusDescription();
private:
MimeMessage *m_headers;
- QDataStream *m_stream;
+ TQDataStream *m_stream;
int m_statusCode;
- QString m_statusDescription;
+ TQString m_statusDescription;
};
//END
diff --git a/kopete/protocols/msn/msnswitchboardsocket.cpp b/kopete/protocols/msn/msnswitchboardsocket.cpp
index ae09a93c..7754c448 100644
--- a/kopete/protocols/msn/msnswitchboardsocket.cpp
+++ b/kopete/protocols/msn/msnswitchboardsocket.cpp
@@ -26,12 +26,12 @@
#include <cmath>
// qt
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
// kde
#include <kdebug.h>
@@ -63,7 +63,7 @@
#include "dispatcher.h"
using P2P::Dispatcher;
-MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , QObject *parent )
+MSNSwitchBoardSocket::MSNSwitchBoardSocket( MSNAccount *account , TQObject *parent )
: MSNSocket( parent )
{
m_account = account;
@@ -80,30 +80,30 @@ MSNSwitchBoardSocket::~MSNSwitchBoardSocket()
{
kdDebug(14140) << k_funcinfo << endl;
- QMap<QString , QPair<QString , KTempFile*> >::Iterator it;
+ TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it;
for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it )
{
delete it.data().second;
}
}
-void MSNSwitchBoardSocket::connectToSwitchBoard(QString ID, QString address, QString auth)
+void MSNSwitchBoardSocket::connectToSwitchBoard(TQString ID, TQString address, TQString auth)
{
// we need these for the handshake later on (when we're connected)
m_ID = ID;
m_auth = auth;
- QString server = address.left( address.find( ":" ) );
+ TQString server = address.left( address.find( ":" ) );
uint port = address.right( address.length() - address.findRev( ":" ) - 1 ).toUInt();
- QObject::connect( this, SIGNAL( blockRead( const QByteArray & ) ),
- this, SLOT(slotReadMessage( const QByteArray & ) ) );
+ TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ),
+ this, TQT_SLOT(slotReadMessage( const TQByteArray & ) ) );
- QObject::connect( this, SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ),
- this, SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) );
+ TQObject::connect( this, TQT_SIGNAL( onlineStatusChanged( MSNSocket::OnlineStatus ) ),
+ this, TQT_SLOT( slotOnlineStatusChanged( MSNSocket::OnlineStatus ) ) );
- QObject::connect( this, SIGNAL( socketClosed( ) ),
- this, SLOT( slotSocketClosed( ) ) );
+ TQObject::connect( this, TQT_SIGNAL( socketClosed( ) ),
+ this, TQT_SLOT( slotSocketClosed( ) ) );
connect( server, port );
}
@@ -112,7 +112,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
{
kdDebug(14140) << k_funcinfo << endl;
- QString msg;
+ TQString msg;
MSNSocket::ErrorType type;
switch( code )
@@ -153,7 +153,7 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
}
case 713:
{
- QString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle );
+ TQString msg = i18n( "You are trying to invite too many contacts to this chat at the same time" ).arg( m_msgHandle );
type = MSNSocket::ErrorInformation;
userLeftChat(m_msgHandle, i18n("user blocked you"));
@@ -175,8 +175,8 @@ void MSNSwitchBoardSocket::handleError( uint code, uint id )
emit errorMessage( type, msg );
}
-void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
- const QString &data )
+void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id ,
+ const TQString &data )
{
if( cmd == "NAK" )
{
@@ -189,8 +189,8 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
else if( cmd == "JOI" )
{
// new user joins the chat, update user in chat list
- QString handle = data.section( ' ', 0, 0 );
- QString screenname = unescape(data.section( ' ', 1, 1 ));
+ TQString handle = data.section( ' ', 0, 0 );
+ TQString screenname = unescape(data.section( ' ', 1, 1 ));
if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
emit userJoined( handle, screenname, false );
@@ -198,11 +198,11 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
else if( cmd == "IRO" )
{
// we have joined a multi chat session- this are the users in this chat
- QString handle = data.section( ' ', 2, 2 );
+ TQString handle = data.section( ' ', 2, 2 );
if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
- QString screenname = unescape(data.section( ' ', 3, 3));
+ TQString screenname = unescape(data.section( ' ', 3, 3));
emit userJoined( handle, screenname, true );
}
else if( cmd == "USR" )
@@ -214,12 +214,12 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
// some has disconnect from chat, update user in chat list
cleanQueue(); //in case some message are waiting their emoticons, never mind, send them
- QString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" );
- userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : QString::null );
+ TQString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" );
+ userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : TQString::null );
}
else if( cmd == "MSG" )
{
- QString len = data.section( ' ', 2, 2 );
+ TQString len = data.section( ' ', 2, 2 );
// we need to know who's sending is the block...
m_msgHandle = data.section( ' ', 0, 0 );
@@ -229,7 +229,7 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
//that's why the official client does not uptade alaws the nickname immediately.
if(m_account->contacts()[ m_msgHandle ])
{
- QString displayName=data.section( ' ', 1, 1 );
+ TQString displayName=data.section( ' ', 1, 1 );
if(m_account->contacts()[ m_msgHandle ]->displayName() != displayName)
m_account->contacts()[ m_msgHandle ]->rename(displayName);
}*/
@@ -238,17 +238,17 @@ void MSNSwitchBoardSocket::parseCommand( const QString &cmd, uint id ,
}
}
-void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
+void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
{
- QString msg = QString::fromUtf8(bytes, bytes.size());
+ TQString msg = TQString::fromUtf8(bytes, bytes.size());
- QRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)");
+ TQRegExp rx("Content-Type: ([A-Za-z0-9/\\-]*)");
rx.search(msg);
- QString type=rx.cap(1);
+ TQString type=rx.cap(1);
- rx=QRegExp("User-Agent: ([A-Za-z0-9./\\-]*)");
+ rx=TQRegExp("User-Agent: ([A-Za-z0-9./\\-]*)");
rx.search(msg);
- QString clientStr=rx.cap(1);
+ TQString clientStr=rx.cap(1);
if( !clientStr.isNull() && !m_msgHandle.isNull())
{
@@ -264,7 +264,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
else if( type== "text/x-msmsgscontrol" )
{
- QString message;
+ TQString message;
message = msg.right( msg.length() - msg.findRev( " " ) - 1 );
message = message.replace( "\r\n" ,"" );
emit receivedTypingMsg( message.lower(), true );
@@ -273,7 +273,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
{
if(msg.contains("ID:"))
{
- QRegExp rx("ID: ([0-9]*)");
+ TQRegExp rx("ID: ([0-9]*)");
rx.search(msg);
uint dataCastId = rx.cap(1).toUInt();
if( dataCastId == 1 )
@@ -290,16 +290,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
// sending a text message. So if it's not supplied, we'll just
// assume its that.
- QColor fontColor;
- QFont font;
+ TQColor fontColor;
+ TQFont font;
if ( msg.contains( "X-MMS-IM-Format" ) )
{
- QString fontName;
- QString fontInfo;
- QString color;
+ TQString fontName;
+ TQString fontInfo;
+ TQString color;
- rx=QRegExp("X-MMS-IM-Format: ([^\r\n]*)");
+ rx=TQRegExp("X-MMS-IM-Format: ([^\r\n]*)");
rx.search(msg);
fontInfo =rx.cap(1);
@@ -339,27 +339,27 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
// Handle 'MS Serif' and 'MS Sans Serif' as an empty font name
if( !fontName.isEmpty() && fontName != "MS Serif" && fontName != "MS Sans Serif" )
{
- QString ef=parseFontAttr( fontInfo, "EF" );
+ TQString ef=parseFontAttr( fontInfo, "EF" );
- font = QFont( fontName,
+ font = TQFont( fontName,
parseFontAttr( fontInfo, "PF" ).toInt(), // font size
- ef.contains( 'B' ) ? QFont::Bold : QFont::Normal,
+ ef.contains( 'B' ) ? TQFont::Bold : TQFont::Normal,
ef.contains( 'I' ) );
font.setUnderline(ef.contains( 'U' ));
font.setStrikeOut(ef.contains( 'S' ));
}
}
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
others.append( m_account->contacts()[ *it2 ] );
}
- QString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 );
+ TQString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 );
//Stupid MSN PLUS colors code. message with incorrect charactere are not showed correctly in the chatwindow.
//TODO: parse theses one to show the color too in Kopete
@@ -381,16 +381,16 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
kmsg.setFg( fontColor );
kmsg.setFont( font );
- rx=QRegExp("Chunks: ([0-9]*)");
+ rx=TQRegExp("Chunks: ([0-9]*)");
rx.search(msg);
unsigned int chunks=rx.cap(1).toUInt();
- rx=QRegExp("Chunk: ([0-9]*)");
+ rx=TQRegExp("Chunk: ([0-9]*)");
rx.search(msg);
unsigned int chunk=rx.cap(1).toUInt();
if(chunk != 0 && !m_msgQueue.isEmpty())
{
- QString msg=m_msgQueue.last().plainBody();
+ TQString msg=m_msgQueue.last().plainBody();
m_msgQueue.pop_back(); //removes the last item
kmsg.setBody( msg+ message, Kopete::Message::PlainText );
}
@@ -407,8 +407,8 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
m_msgQueue.append( kmsg );
if(!m_emoticonTimer) //to be sure no message will be lost, we will appends message to
{ // the queue in 15 secondes even if we have not received emoticons
- m_emoticonTimer=new QTimer(this);
- QObject::connect(m_emoticonTimer , SIGNAL(timeout()) , this, SLOT(cleanQueue()));
+ m_emoticonTimer=new TQTimer(this);
+ TQObject::connect(m_emoticonTimer , TQT_SIGNAL(timeout()) , this, TQT_SLOT(cleanQueue()));
m_emoticonTimer->start( 15000 , true );
}
}
@@ -423,13 +423,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
config->setGroup( "MSN" );
if ( config->readBoolEntry( "useCustomEmoticons", true ) )
{
- QRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)");
+ TQRegExp rx("([^\\s]*)[\\s]*(<msnobj [^>]*>)");
rx.setMinimal(true);
int pos = rx.search(msg);
while( pos != -1)
{
- QString msnobj=rx.cap(2);
- QString txt=rx.cap(1);
+ TQString msnobj=rx.cap(2);
+ TQString txt=rx.cap(1);
kdDebug(14140) << k_funcinfo << "emoticon: " << txt << " msnobj: " << msnobj<< endl;
if( !m_emoticons.contains(msnobj) || !m_emoticons[msnobj].second )
@@ -453,7 +453,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
else if( type == "text/x-clientcaps" )
{
- rx=QRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)");
+ rx=TQRegExp("Client-Name: ([A-Za-z0-9.$!*/% \\-]*)");
rx.search(msg);
clientStr=unescape( rx.cap(1) );
@@ -469,7 +469,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
- QString JabberID;
+ TQString JabberID;
if(config->readBoolEntry("SendJabber", true))
JabberID=config->readEntry("JabberAccount");
@@ -479,13 +479,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
if( config->readBoolEntry("SendClientInfo", true) || !JabberID.isEmpty())
{
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-clientcaps\r\n"
"Client-Name: Kopete/"+escape(kapp->aboutData()->version())+"\r\n"
+JabberID+
"\r\n" ).utf8();
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
}
m_clientcapsSent=true;
@@ -496,15 +496,15 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
else if(type == "image/gif" || msg.contains("Message-ID:"))
{
// Incoming inkformatgif.
- QRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}");
+ TQRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}");
regex.search(msg);
- QString messageId = regex.cap(1);
- regex = QRegExp("Chunks: (\\d+)");
+ TQString messageId = regex.cap(1);
+ regex = TQRegExp("Chunks: (\\d+)");
regex.search(msg);
- QString chunks = regex.cap(1);
- regex = QRegExp("Chunk: (\\d+)");
+ TQString chunks = regex.cap(1);
+ regex = TQRegExp("Chunk: (\\d+)");
regex.search(msg);
- QString chunk = regex.cap(1);
+ TQString chunk = regex.cap(1);
if(!messageId.isNull())
{
@@ -513,10 +513,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
Q_UINT32 numberOfChunks = chunks.toUInt(&valid);
if(valid && (numberOfChunks > 1))
{
- regex = QRegExp("base64:([0-9a-zA-Z+/=]+)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]+)");
regex.search(msg);
// Retrieve the first chunk of the ink format gif.
- QString base64 = regex.cap(1);
+ TQString base64 = regex.cap(1);
// More chunks are expected, buffer the chunk received.
InkMessage inkMessage;
inkMessage.chunks = numberOfChunks;
@@ -527,10 +527,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
else
{
// There is only one chunk of data.
- regex = QRegExp("base64:([0-9a-zA-Z+/=]*)");
+ regex = TQRegExp("base64:([0-9a-zA-Z+/=]*)");
regex.search(msg);
// Retrieve the base64 encoded ink data.
- QString data = regex.cap(1);
+ TQString data = regex.cap(1);
DispatchInkMessage(data);
}
@@ -558,9 +558,9 @@ void MSNSwitchBoardSocket::slotReadMessage( const QByteArray &bytes )
}
}
-void MSNSwitchBoardSocket::DispatchInkMessage(const QString& base64String)
+void MSNSwitchBoardSocket::DispatchInkMessage(const TQString& base64String)
{
- QByteArray image;
+ TQByteArray image;
// Convert from base64 encoded string to byte array.
KCodecs::base64Decode(base64String.utf8() , image);
KTempFile *inkImage = new KTempFile(locateLocal( "tmp", "inkformatgif-" ), ".gif");
@@ -585,18 +585,18 @@ void MSNSwitchBoardSocket::sendTypingMsg( bool isTyping )
}
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgscontrol\r\n"
"TypingUser: " + m_myHandle + "\r\n"
"\r\n" ).utf8();
// Length is appended by sendCommand()
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
}
// this Invites an Contact
-void MSNSwitchBoardSocket::slotInviteContact(const QString &handle)
+void MSNSwitchBoardSocket::slotInviteContact(const TQString &handle)
{
m_msgHandle=handle;
sendCommand( "CAL", handle );
@@ -604,13 +604,13 @@ void MSNSwitchBoardSocket::slotInviteContact(const QString &handle)
//
// Send a custum emoticon
//
-int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString &filename)
+int MSNSwitchBoardSocket::sendCustomEmoticon(const TQString &name, const TQString &filename)
{
- QString picObj;
+ TQString picObj;
//try to find it in the cache.
- const QMap<QString, QString> objectList = PeerDispatcher()->objectList;
- for (QMap<QString,QString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it )
+ const TQMap<TQString, TQString> objectList = PeerDispatcher()->objectList;
+ for (TQMap<TQString,TQString>::ConstIterator it = objectList.begin(); it != objectList.end(); ++it )
{
if(it.data() == filename)
{
@@ -621,18 +621,18 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString
if(picObj.isNull())
{ //if not found in the cache, generate the picture object
- QFileInfo fi(filename);
+ TQFileInfo fi(filename);
// open the icon file
- QFile pictFile(fi.filePath());
+ TQFile pictFile(fi.filePath());
if (pictFile.open(IO_ReadOnly)) {
- QByteArray ar = pictFile.readAll();
+ TQByteArray ar = pictFile.readAll();
pictFile.close();
- QString sha1d = QString(KCodecs::base64Encode(SHA1::hash(ar)));
- QString size = QString::number( pictFile.size() );
- QString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d;
- QString sha1c = QString(KCodecs::base64Encode(SHA1::hashString(all.utf8())));
+ TQString sha1d = TQString(KCodecs::base64Encode(SHA1::hash(ar)));
+ TQString size = TQString::number( pictFile.size() );
+ TQString all = "Creator" + m_account->accountId() + "Size" + size + "Type2Location" + fi.fileName() + "FriendlyAAA=SHA1D" + sha1d;
+ TQString sha1c = TQString(KCodecs::base64Encode(SHA1::hashString(all.utf8())));
picObj = "<msnobj Creator=\"" + m_account->accountId() + "\" Size=\"" + size + "\" Type=\"2\" Location=\""+ fi.fileName() + "\" Friendly=\"AAA=\" SHA1D=\""+sha1d+ "\" SHA1C=\""+sha1c+"\"/>";
PeerDispatcher()->objectList.insert(picObj, filename);
@@ -641,7 +641,7 @@ int MSNSwitchBoardSocket::sendCustomEmoticon(const QString &name, const QString
return 0;
}
- QString msg = "MIME-Version: 1.0\r\n"
+ TQString msg = "MIME-Version: 1.0\r\n"
"Content-Type: text/x-mms-emoticon\r\n"
"\r\n" +
name + "\t" + picObj + "\t\r\n";
@@ -671,12 +671,12 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
config->setGroup( "MSN" );
if ( config->readBoolEntry( "exportEmoticons", false ) )
{
- QMap<QString, QStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList();
+ TQMap<TQString, TQStringList> emap = Kopete::Emoticons::self()->emoticonAndPicList();
// Check the list for any custom emoticons
- for (QMap<QString, QStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++)
+ for (TQMap<TQString, TQStringList>::const_iterator itr = emap.begin(); itr != emap.end(); itr++)
{
- for ( QStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 )
+ for ( TQStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 )
{
if ( msg.plainBody().contains( *itr2 ) )
sendCustomEmoticon( *itr2, itr.key() );
@@ -686,7 +686,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
if( msg.format() & Kopete::Message::RichText )
{
- QRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$");
+ TQRegExp regex("^\\s*<img src=\"([^>\"]+)\"[^>]*>\\s*$");
if(regex.search(msg.escapedBody()) != -1)
{
// FIXME why are we sending the images.. the contact should request them.
@@ -696,19 +696,19 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
}
// User-Agent is not a official flag, but GAIM has it
- QString UA;
+ TQString UA;
if( config->readBoolEntry("SendClientInfo", true) )
{
UA="User-Agent: Kopete/"+escape(kapp->aboutData()->version())+"\r\n";
}
- QString head =
+ TQString head =
"MIME-Version: 1.0\r\n"
"Content-Type: text/plain; charset=UTF-8\r\n"
+UA+
"X-MMS-IM-Format: ";
- if(msg.font() != QFont() )
+ if(msg.font() != TQFont() )
{
//It's verry strange that if the font name is bigger than 31 char, the _server_ close the socket and don't deliver the message.
// the real question is why ? my guess is that MS patched the server because a bug in their client, but that's just a guess.
@@ -735,7 +735,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
// Color support
if (msg.fg().isValid())
{
- QString colorCode = QColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.)
+ TQString colorCode = TQColor(msg.fg().blue(),msg.fg().green(),msg.fg().red()).name().remove(0,1); //colors aren't sent in RGB but in BGR (O.G.)
head += "CO=" + colorCode;
}
else
@@ -748,7 +748,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
head += "; RL=1";
head += "\r\n";
- QString message= msg.plainBody().replace( "\n" , "\r\n" );
+ TQString message= msg.plainBody().replace( "\n" , "\r\n" );
//-- Check if the message isn't too big, TODO: do that at the libkopete level.
int len_H=head.utf8().length(); // != head.length() because i need the size in butes and
@@ -759,7 +759,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
//It's possible to made the opposite client join them, as explained in this MS Word document
//http://www.bot-depot.com/forums/index.php?act=Attach&type=post&id=35110
- head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+QString::number( rand()%10)+QString::number( rand()%10)+"}\r\n";
+ head+="Message-ID: {7B7B34E6-7A8D-44FF-926C-1799156B58"+TQString::number( rand()%10)+TQString::number( rand()%10)+"}\r\n";
int len_H=head.utf8().length()+ 14; //14 is the size of "Chunks: x"
//this is the size of each part of the message (excluding the header)
int futurmessages_size=1400; //1400 is a common good size
@@ -777,7 +777,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
int chunk=0;
do
{
- QString m=message.mid(place, futurmessages_size);
+ TQString m=message.mid(place, futurmessages_size);
place += futurmessages_size;
//make sure the size is not too big because of utf8
@@ -798,11 +798,11 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
m=m.left(len-d);
place -= d;
}
- QString chunk_str;
+ TQString chunk_str;
if(chunk==0)
- chunk_str="Chunks: "+QString::number(nb)+"\r\n";
+ chunk_str="Chunks: "+TQString::number(nb)+"\r\n";
else if(chunk<nb)
- chunk_str="Chunk: "+QString::number(chunk)+"\r\n";
+ chunk_str="Chunk: "+TQString::number(chunk)+"\r\n";
else
{
kdDebug(14140) << k_funcinfo <<"The message is slit in more than initially estimated" <<endl;
@@ -815,7 +815,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
while(chunk<nb)
{
kdDebug(14140) << k_funcinfo <<"The message is plit in less than initially estimated. Sending empty message to complete" <<endl;
- QString chunk_str="Chunk: "+QString::number(chunk);
+ TQString chunk_str="Chunk: "+TQString::number(chunk);
sendCommand( "MSG", "A", true, (head+chunk_str+"\r\n").utf8() );
chunk++;
}
@@ -827,8 +827,8 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
if(!m_keepAlive)
{
m_keepAliveNb=20;
- m_keepAlive=new QTimer(this);
- QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer()));
+ m_keepAlive=new TQTimer(this);
+ TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer()));
m_keepAlive->start(50*1000);
}
@@ -838,7 +838,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
void MSNSwitchBoardSocket::slotSocketClosed( )
{
- for( QStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it )
+ for( TQStringList::Iterator it = m_chatMembers.begin(); it != m_chatMembers.end(); ++it )
{
emit userLeft( (*it), i18n("connection closed"));
}
@@ -850,7 +850,7 @@ void MSNSwitchBoardSocket::slotSocketClosed( )
void MSNSwitchBoardSocket::slotCloseSession()
{
- sendCommand( "OUT", QString::null, false );
+ sendCommand( "OUT", TQString::null, false );
disconnect();
}
@@ -859,8 +859,8 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat
{
if (status == Connected)
{
- QCString command;
- QString args;
+ TQCString command;
+ TQString args;
if( !m_ID ) // we're inviting
{
@@ -877,14 +877,14 @@ void MSNSwitchBoardSocket::slotOnlineStatusChanged( MSNSocket::OnlineStatus stat
if(!m_keepAlive)
{
m_keepAliveNb=20;
- m_keepAlive=new QTimer(this);
- QObject::connect(m_keepAlive, SIGNAL(timeout()) , this , SLOT(slotKeepAliveTimer()));
+ m_keepAlive=new TQTimer(this);
+ TQObject::connect(m_keepAlive, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotKeepAliveTimer()));
m_keepAlive->start(50*1000);
}
}
}
-void MSNSwitchBoardSocket::userLeftChat(const QString& handle , const QString &reason)
+void MSNSwitchBoardSocket::userLeftChat(const TQString& handle , const TQString &reason)
{
emit userLeft( handle, reason );
@@ -903,7 +903,7 @@ void MSNSwitchBoardSocket::requestDisplayPicture()
PeerDispatcher()->requestDisplayIcon(m_msgHandle, contact->object());
}
-void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString &msnObj )
+void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const TQString &msnObj )
{
kdDebug(14141) << k_funcinfo << msnObj << endl;
@@ -920,17 +920,17 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString
}
else if(msnObj == "inkformatgif")
{
- QString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() );
+ TQString msg=i18n("<img src=\"%1\" alt=\"Typewrited message\" />" ).arg( file->name() );
kdDebug(14140) << k_funcinfo << file->name() <<endl;
m_typewrited.append(file);
m_typewrited.setAutoDelete(true);
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
@@ -961,11 +961,11 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const QString
}
}
-void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const QString& /*fileName*/, Q_INT64 /*fileSize*/)
+void MSNSwitchBoardSocket::slotIncomingFileTransfer(const TQString& from, const TQString& /*fileName*/, Q_INT64 /*fileSize*/)
{
- QPtrList<Kopete::Contact> others;
+ TQPtrList<Kopete::Contact> others;
others.append( m_account->myself() );
- QStringList::iterator it2;
+ TQStringList::iterator it2;
for( it2 = m_chatMembers.begin(); it2 != m_chatMembers.end(); ++it2 )
{
if( *it2 != m_msgHandle )
@@ -980,7 +980,7 @@ void MSNSwitchBoardSocket::slotIncomingFileTransfer(const QString& from, const Q
m_chatMembers.append( m_msgHandle );
emit userJoined( m_msgHandle , m_msgHandle , false);
}
- QString invite = "Incoming file transfer.";
+ TQString invite = "Incoming file transfer.";
Kopete::Message msg =
Kopete::Message(m_account->contacts()[from], others, invite, Kopete::Message::Internal, Kopete::Message::PlainText);
emit msgReceived(msg);
@@ -996,7 +996,7 @@ void MSNSwitchBoardSocket::cleanQueue()
}
kdDebug(14141) << k_funcinfo << m_msgQueue.count() << endl;
- QValueList<const Kopete::Message>::Iterator it_msg;
+ TQValueList<const Kopete::Message>::Iterator it_msg;
for ( it_msg = m_msgQueue.begin(); it_msg != m_msgQueue.end(); ++it_msg )
{
Kopete::Message kmsg = (*it_msg);
@@ -1007,33 +1007,33 @@ void MSNSwitchBoardSocket::cleanQueue()
Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kmsg)
{
- QString message=kmsg.escapedBody();
- QMap<QString , QPair<QString , KTempFile*> >::Iterator it;
+ TQString message=kmsg.escapedBody();
+ TQMap<TQString , QPair<TQString , KTempFile*> >::Iterator it;
for ( it = m_emoticons.begin(); it != m_emoticons.end(); ++it )
{
- QString es=QStyleSheet::escape(it.data().first);
+ TQString es=TQStyleSheet::escape(it.data().first);
KTempFile *f=it.data().second;
if(message.contains(es) && f)
{
- QString imgPath = f->name();
- QImage iconImage(imgPath);
+ TQString imgPath = f->name();
+ TQImage iconImage(imgPath);
/* We don't use a comple algoritm (like the one in the #if) because the msn client shows
* emoticons like that. So, in that case, we show like the MSN client */
#if 0
- QString em = QRegExp::escape( es );
- message.replace( QRegExp(QString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)),
- QString::fromLatin1("\\1<img align=\"center\" width=\"") +
+ TQString em = TQRegExp::escape( es );
+ message.replace( TQRegExp(TQString::fromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).arg(em).arg(em)),
+ TQString::fromLatin1("\\1<img align=\"center\" width=\"") +
#endif
//match any occurence which is not in a html tag.
- message.replace( QRegExp(QString::fromLatin1("%1(?![^><]*>)").arg(QRegExp::escape(es))),
- QString::fromLatin1("<img align=\"center\" width=\"") +
- QString::number(iconImage.width()) +
- QString::fromLatin1("\" height=\"") +
- QString::number(iconImage.height()) +
- QString::fromLatin1("\" src=\"") + imgPath +
- QString::fromLatin1("\" title=\"") + es +
- QString::fromLatin1("\" alt=\"") + es +
- QString::fromLatin1( "\"/>" ) );
+ message.replace( TQRegExp(TQString::fromLatin1("%1(?![^><]*>)").arg(TQRegExp::escape(es))),
+ TQString::fromLatin1("<img align=\"center\" width=\"") +
+ TQString::number(iconImage.width()) +
+ TQString::fromLatin1("\" height=\"") +
+ TQString::number(iconImage.height()) +
+ TQString::fromLatin1("\" src=\"") + imgPath +
+ TQString::fromLatin1("\" title=\"") + es +
+ TQString::fromLatin1("\" alt=\"") + es +
+ TQString::fromLatin1( "\"/>" ) );
kmsg.setBody(message, Kopete::Message::RichText);
}
}
@@ -1042,22 +1042,22 @@ Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kms
int MSNSwitchBoardSocket::sendNudge()
{
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-msnmsgr-datacast\r\n"
"\r\n"
"ID: 1\r\n"
"\r\n\r\n" ).utf8();
- QString args = "U";
+ TQString args = "U";
return sendCommand( "MSG", args, true, message );
}
// FIXME: This is nasty... replace with a regexp or so.
-QString MSNSwitchBoardSocket::parseFontAttr(QString str, QString attr)
+TQString MSNSwitchBoardSocket::parseFontAttr(TQString str, TQString attr)
{
- QString tmp;
+ TQString tmp;
int pos1=0, pos2=0;
pos1 = str.find(attr + "=");
@@ -1081,7 +1081,7 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher()
{
// Create a new msnslp dispatcher to handle
// all peer to peer requests.
- QStringList ip;
+ TQStringList ip;
if(m_account->notifySocket())
{
ip << m_account->notifySocket()->localIP();
@@ -1090,11 +1090,11 @@ Dispatcher* MSNSwitchBoardSocket::PeerDispatcher()
}
m_dispatcher = new Dispatcher(this, m_account->accountId(),ip );
-// QObject::connect(this, SIGNAL(blockRead(const QByteArray&)), m_dispatcher, SLOT(slotReadMessage(const QByteArray&)));
-// QObject::connect(m_dispatcher, SIGNAL(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool)), this, SLOT(sendCommand(const QString&, const QString&, bool, const QByteArray&, bool)));
- QObject::connect(m_dispatcher, SIGNAL(incomingTransfer(const QString&, const QString&, Q_INT64)), this, SLOT(slotIncomingFileTransfer(const QString&, const QString&, Q_INT64)));
- QObject::connect(m_dispatcher, SIGNAL(displayIconReceived(KTempFile *, const QString&)), this, SLOT(slotEmoticonReceived( KTempFile *, const QString&)));
- QObject::connect(this, SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, SLOT(messageAcknowledged(unsigned int, bool)));
+// TQObject::connect(this, TQT_SIGNAL(blockRead(const TQByteArray&)), m_dispatcher, TQT_SLOT(slotReadMessage(const TQByteArray&)));
+// TQObject::connect(m_dispatcher, TQT_SIGNAL(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool)), this, TQT_SLOT(sendCommand(const TQString&, const TQString&, bool, const TQByteArray&, bool)));
+ TQObject::connect(m_dispatcher, TQT_SIGNAL(incomingTransfer(const TQString&, const TQString&, Q_INT64)), this, TQT_SLOT(slotIncomingFileTransfer(const TQString&, const TQString&, Q_INT64)));
+ TQObject::connect(m_dispatcher, TQT_SIGNAL(displayIconReceived(KTempFile *, const TQString&)), this, TQT_SLOT(slotEmoticonReceived( KTempFile *, const TQString&)));
+ TQObject::connect(this, TQT_SIGNAL(msgAcknowledgement(unsigned int, bool)), m_dispatcher, TQT_SLOT(messageAcknowledged(unsigned int, bool)));
m_dispatcher->m_pictureUrl = m_account->pictureUrl();
}
return m_dispatcher;
@@ -1120,12 +1120,12 @@ void MSNSwitchBoardSocket::slotKeepAliveTimer( )
}
- QCString message = QString( "MIME-Version: 1.0\r\n"
+ TQCString message = TQString( "MIME-Version: 1.0\r\n"
"Content-Type: text/x-keepalive\r\n"
"\r\n" ).utf8();
// Length is appended by sendCommand()
- QString args = "U";
+ TQString args = "U";
sendCommand( "MSG", args, true, message );
m_keepAliveNb--;
diff --git a/kopete/protocols/msn/msnswitchboardsocket.h b/kopete/protocols/msn/msnswitchboardsocket.h
index 5a6f9628..70cb7fa0 100644
--- a/kopete/protocols/msn/msnswitchboardsocket.h
+++ b/kopete/protocols/msn/msnswitchboardsocket.h
@@ -21,9 +21,9 @@
#ifndef MSNSWITCHBOARDSOCKET_H
#define MSNSWITCHBOARDSOCKET_H
-#include <qobject.h>
-#include <qstrlist.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
+#include <tqvaluevector.h>
#include <kstringhandler.h>
@@ -48,37 +48,37 @@ public:
/**
* Contructor: id is the KopeteMessageMangager's id
*/
- MSNSwitchBoardSocket( MSNAccount * account , QObject *parent);
+ MSNSwitchBoardSocket( MSNAccount * account , TQObject *parent);
~MSNSwitchBoardSocket();
private:
P2P::Dispatcher *m_dispatcher;
MSNAccount *m_account;
- QString m_myHandle; // our handle
+ TQString m_myHandle; // our handle
// contains the handle of the last person that msg'ed us.
// since we receive the actual message by readBlock(), we need
// to remember what the handle was of the person sending us the message.
- QString m_msgHandle;
+ TQString m_msgHandle;
- QString m_ID;
- QString m_auth;
- QStringList m_chatMembers;
+ TQString m_ID;
+ TQString m_auth;
+ TQStringList m_chatMembers;
//used for emoticons
- QValueList<const Kopete::Message> m_msgQueue;
+ TQValueList<const Kopete::Message> m_msgQueue;
unsigned m_recvIcons;
- QMap<QString , QPair<QString , KTempFile*> > m_emoticons;
+ TQMap<TQString , QPair<TQString , KTempFile*> > m_emoticons;
Kopete::Message &parseCustomEmoticons(Kopete::Message &msg);
- QTimer *m_emoticonTimer;
- QPtrList<KTempFile> m_typewrited;
+ TQTimer *m_emoticonTimer;
+ TQPtrList<KTempFile> m_typewrited;
struct InkMessage{
Q_UINT32 chunks;
- QString data;
+ TQString data;
};
- QMap<QString, InkMessage> m_inkMessageBuffer;
+ TQMap<TQString, InkMessage> m_inkMessageBuffer;
/** the number of chunk for currents messages */
unsigned int m_chunks;
@@ -87,33 +87,33 @@ private:
bool m_clientcapsSent;
private:
- void DispatchInkMessage(const QString &base64String);
+ void DispatchInkMessage(const TQString &base64String);
protected:
/**
* Handle an MSN command response line.
*/
- virtual void parseCommand( const QString &cmd, uint id,
- const QString &data );
+ virtual void parseCommand( const TQString &cmd, uint id,
+ const TQString &data );
/**
* Handle exceptions that might occur during a chat.
*/
virtual void handleError( uint code, uint id );
- QString parseFontAttr( QString str, QString attr );
+ TQString parseFontAttr( TQString str, TQString attr );
public:
- void connectToSwitchBoard( QString ID, QString address, QString auth );
- void setHandle( QString handle ) { m_myHandle = handle; }
- void setMsgHandle( QString handle ) { m_msgHandle = handle; }
+ void connectToSwitchBoard( TQString ID, TQString address, TQString auth );
+ void setHandle( TQString handle ) { m_myHandle = handle; }
+ void setMsgHandle( TQString handle ) { m_msgHandle = handle; }
- const QStringList &chatMembers() { return m_chatMembers; }
+ const TQStringList &chatMembers() { return m_chatMembers; }
- void userLeftChat( const QString &handle , const QString &reason );
+ void userLeftChat( const TQString &handle , const TQString &reason );
int sendMsg( const Kopete::Message &msg );
- int sendCustomEmoticon(const QString &name, const QString &filename);
+ int sendCustomEmoticon(const TQString &name, const TQString &filename);
int sendNudge();
@@ -121,7 +121,7 @@ public:
public slots:
void slotCloseSession();
- void slotInviteContact(const QString &handle);
+ void slotInviteContact(const TQString &handle);
/**
* Notify the server that the user is typing a message
@@ -131,7 +131,7 @@ public slots:
void requestDisplayPicture();
/** workaround Bug 113425 . see slotKeepAliveTimer() **/
- QTimer *m_keepAlive;
+ TQTimer *m_keepAlive;
int m_keepAliveNb;
@@ -139,9 +139,9 @@ public slots:
private slots:
void slotOnlineStatusChanged( MSNSocket::OnlineStatus status );
void slotSocketClosed( );
- void slotReadMessage( const QByteArray &bytes );
- void slotEmoticonReceived( KTempFile *, const QString& );
- void slotIncomingFileTransfer(const QString& from, const QString& fileName, Q_INT64 fileSize);
+ void slotReadMessage( const TQByteArray &bytes );
+ void slotEmoticonReceived( KTempFile *, const TQString& );
+ void slotIncomingFileTransfer(const TQString& from, const TQString& fileName, Q_INT64 fileSize);
void cleanQueue();
/** workaround Bug 113425 . see comment inside the function **/
@@ -149,14 +149,14 @@ private slots:
signals:
void msgReceived( Kopete::Message &msg );
- void receivedTypingMsg( const QString &contactId, bool isTyping );
+ void receivedTypingMsg( const TQString &contactId, bool isTyping );
void msgAcknowledgement(unsigned int, bool);
- void userJoined(const QString& handle , const QString &publicName , bool IRO);
- void userLeft(const QString& handle , const QString &reason);
- void nudgeReceived(const QString &handle);
+ void userJoined(const TQString& handle , const TQString &publicName , bool IRO);
+ void userLeft(const TQString& handle , const TQString &reason);
+ void nudgeReceived(const TQString &handle);
void switchBoardClosed( );
- void invitation(const QString& handle, const QString& msg);
+ void invitation(const TQString& handle, const TQString& msg);
};
diff --git a/kopete/protocols/msn/outgoingtransfer.cpp b/kopete/protocols/msn/outgoingtransfer.cpp
index 4879cf52..f6b71c12 100644
--- a/kopete/protocols/msn/outgoingtransfer.cpp
+++ b/kopete/protocols/msn/outgoingtransfer.cpp
@@ -26,9 +26,9 @@
using namespace KNetwork;
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
// Kopete includes
#include <kopetetransfermanager.h>
@@ -39,7 +39,7 @@ using P2P::Dispatcher;
using P2P::OutgoingTransfer;
using P2P::Message;
-OutgoingTransfer::OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+OutgoingTransfer::OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
: TransferContext(to,dispatcher,sessionId)
{
m_direction = Outgoing;
@@ -51,12 +51,12 @@ OutgoingTransfer::~OutgoingTransfer()
kdDebug(14140) << k_funcinfo << endl;
}
-void OutgoingTransfer::sendImage(const QByteArray& image)
+void OutgoingTransfer::sendImage(const TQByteArray& image)
{
-// TODO QByteArray base64 = KCodecs::base64Encode(image);
+// TODO TQByteArray base64 = KCodecs::base64Encode(image);
//
-// QCString body = "MIME-Version: 1.0\r\n"
+// TQCString body = "MIME-Version: 1.0\r\n"
// "Content-Type: image/gif\r\n"
// "\r\n"
// "base64:" +
@@ -71,7 +71,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image)
// outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4;
// outbound.header.ackUniqueIdentifier = 0;
// outbound.header.ackDataSize = 0l;
-// QByteArray bytes(4);
+// TQByteArray bytes(4);
// bytes.fill('\0');
// outbound.body = bytes;
// outbound.applicationIdentifier = 0;
@@ -84,7 +84,7 @@ void OutgoingTransfer::sendImage(const QByteArray& image)
void OutgoingTransfer::slotSendData()
{
Q_INT32 bytesRead = 0;
- QByteArray buffer(1202);
+ TQByteArray buffer(1202);
if(!m_file)
return;
@@ -101,7 +101,7 @@ void OutgoingTransfer::slotSendData()
buffer.resize(bytesRead);
}
- kdDebug(14140) << k_funcinfo << QString("Sending, %1 bytes").arg(bytesRead) << endl;
+ kdDebug(14140) << k_funcinfo << TQString("Sending, %1 bytes").arg(bytesRead) << endl;
if((m_offset + bytesRead) < m_file->size())
{
@@ -193,8 +193,8 @@ void OutgoingTransfer::acknowledged()
void OutgoingTransfer::processMessage(const Message& message)
{
- QString body =
- QCString(message.body.data(), message.header.dataSize);
+ TQString body =
+ TQCString(message.body.data(), message.header.dataSize);
kdDebug(14140) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("BYE"))
@@ -217,9 +217,9 @@ void OutgoingTransfer::processMessage(const Message& message)
else if(body.startsWith("MSNSLP/1.0 200 OK"))
{
// Retrieve the message content type.
- QRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
+ TQRegExp regex("Content-Type: ([A-Za-z0-9$!*/\\-]*)");
regex.search(body);
- QString contentType = regex.cap(1);
+ TQString contentType = regex.cap(1);
if(contentType == "application/x-msnmsgr-sessionreqbody")
{
@@ -246,19 +246,19 @@ void OutgoingTransfer::processMessage(const Message& message)
m_transfer =
Kopete::TransferManager::transferManager()->addTransfer(contact, m_file->name(), m_file->size(), m_recipient, Kopete::FileTransferInfo::Outgoing);
- QObject::connect(m_transfer , SIGNAL(transferCanceled()), this, SLOT(abort()));
+ TQObject::connect(m_transfer , TQT_SIGNAL(transferCanceled()), this, TQT_SLOT(abort()));
m_state = Negotiation;
m_branch = P2P::Uid::createUid();
// Send the direct connection invitation message.
- QString content = "Bridges: TRUDPv1 TCPv1\r\n" +
- QString("NetID: %1\r\n").arg("-123657987") +
- QString("Conn-Type: %1\r\n").arg("Restrict-NAT") +
+ TQString content = "Bridges: TRUDPv1 TCPv1\r\n" +
+ TQString("NetID: %1\r\n").arg("-123657987") +
+ TQString("Conn-Type: %1\r\n").arg("Restrict-NAT") +
"UPnPNat: false\r\n"
"ICF: false\r\n" +
- QString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
+ TQString("Hashed-Nonce: {%1}\r\n").arg(P2P::Uid::createUid()) +
"\r\n";
sendMessage(INVITE, content);
}
@@ -266,7 +266,7 @@ void OutgoingTransfer::processMessage(const Message& message)
{
// Determine whether the recipient created
// a listening endpoint.
- regex = QRegExp("Listening: ([^\r\n]+)\r\n");
+ regex = TQRegExp("Listening: ([^\r\n]+)\r\n");
regex.search(body);
bool isListening = (regex.cap(1) == "true");
@@ -281,16 +281,16 @@ void OutgoingTransfer::processMessage(const Message& message)
if(isListening)
{
// Retrieve the hashed nonce for this direct connection instance.
- regex = QRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n");
+ regex = TQRegExp("Hashed-Nonce: \\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_nonce = regex.cap(1);
// Retrieve the listening endpoints of the receiving client.
- regex = QRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n");
+ regex = TQRegExp("IPv4Internal-Addrs: ([^\r\n]+)\r\n");
regex.search(body);
- m_peerEndpoints = QStringList::split(" ", regex.cap(1));
+ m_peerEndpoints = TQStringList::split(" ", regex.cap(1));
m_endpointIterator = m_peerEndpoints.begin();
// Retrieve the listening port of the receiving client.
- regex = QRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n");
+ regex = TQRegExp("IPv4Internal-Port: ([^\r\n]+)\r\n");
regex.search(body);
m_remotePort = regex.cap(1);
@@ -336,7 +336,7 @@ void OutgoingTransfer::readyToSend()
slotSendData();
}
-void OutgoingTransfer::connectToEndpoint(const QString& hostName)
+void OutgoingTransfer::connectToEndpoint(const TQString& hostName)
{
m_socket = new KBufferedSocket(hostName, m_remotePort);
m_socket->setBlocking(false);
@@ -345,10 +345,10 @@ void OutgoingTransfer::connectToEndpoint(const QString& hostName)
// when we are ready to sent data.
// NOTE readyWrite consumes too much cpu usage.
m_socket->enableWrite(false);
- QObject::connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotRead()));
- QObject::connect(m_socket, SIGNAL(connected(const KResolverEntry&)), this, SLOT(slotConnected()));
- QObject::connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
- QObject::connect(m_socket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotRead()));
+ TQObject::connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry&)), this, TQT_SLOT(slotConnected()));
+ TQObject::connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
+ TQObject::connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Try to connect to the endpoint.
m_socket->connect();
}
@@ -357,13 +357,13 @@ void OutgoingTransfer::slotConnected()
{
kdDebug(14140) << k_funcinfo << endl;
// Check if connection is ok.
- Q_UINT32 bytesWritten = m_socket->writeBlock(QCString("foo").data(), 4);
+ Q_UINT32 bytesWritten = m_socket->writeBlock(TQCString("foo").data(), 4);
if(bytesWritten != 4)
{
// Not all data was written, close the socket.
m_socket->closeNow();
// Schedule the data to be sent through the existing session.
- QTimer::singleShot(2000, this, SLOT(slotSendData()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData()));
return;
}
@@ -377,7 +377,7 @@ void OutgoingTransfer::slotConnected()
// Set the flag to indicate that this is
// a direct connection handshake message.
handshake.header.flag = 0x100;
- QString nonce = m_nonce.remove('-');
+ TQString nonce = m_nonce.remove('-');
handshake.header.ackSessionIdentifier = nonce.mid(0, 8).toUInt(0, 16);
handshake.header.ackUniqueIdentifier =
nonce.mid(8, 4).toUInt(0, 16) | (nonce.mid(12, 4).toUInt(0, 16) << 16);
@@ -386,7 +386,7 @@ void OutgoingTransfer::slotConnected()
handshake.header.ackDataSize =
((Q_INT64)htonl(lo)) | (((Q_INT64)htonl(hi)) << 32);
- QByteArray stream;
+ TQByteArray stream;
// Write the message to the memory stream.
m_messageFormatter.writeMessage(handshake, stream, true);
// Send the byte stream over the wire.
@@ -418,7 +418,7 @@ void OutgoingTransfer::slotSocketError(int)
{
// Otherwise, send the data through the session.
m_identifier -= 1;
- QTimer::singleShot(2000, this, SLOT(slotSendData()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(slotSendData()));
}
}
diff --git a/kopete/protocols/msn/outgoingtransfer.h b/kopete/protocols/msn/outgoingtransfer.h
index 014971ef..ee55593f 100644
--- a/kopete/protocols/msn/outgoingtransfer.h
+++ b/kopete/protocols/msn/outgoingtransfer.h
@@ -19,7 +19,7 @@
#include "p2p.h"
#include "dispatcher.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
@author Kopete Developers
@@ -28,10 +28,10 @@ namespace P2P{
class OutgoingTransfer : public TransferContext
{ Q_OBJECT
public:
- OutgoingTransfer(const QString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
+ OutgoingTransfer(const TQString& to, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId);
virtual ~OutgoingTransfer();
- void sendImage(const QByteArray& image);
+ void sendImage(const TQByteArray& image);
private slots:
void slotConnected();
@@ -42,13 +42,13 @@ namespace P2P{
private:
virtual void acknowledged();
- void connectToEndpoint(const QString& hostName);
+ void connectToEndpoint(const TQString& hostName);
virtual void processMessage(const Message& message);
- QStringList m_peerEndpoints;
- QStringList::Iterator m_endpointIterator;
- QString m_remotePort;
- QString m_nonce;
+ TQStringList m_peerEndpoints;
+ TQStringList::Iterator m_endpointIterator;
+ TQString m_remotePort;
+ TQString m_nonce;
char m_handshake;
protected:
diff --git a/kopete/protocols/msn/p2p.cpp b/kopete/protocols/msn/p2p.cpp
index 219fd935..1aa3ddae 100644
--- a/kopete/protocols/msn/p2p.cpp
+++ b/kopete/protocols/msn/p2p.cpp
@@ -27,25 +27,25 @@ using P2P::TransferType;
#include <kbufferedsocket.h>
#include <kdebug.h>
// Qt includes
-#include <qfile.h>
+#include <tqfile.h>
// Kopete includes
#include <kopetetransfermanager.h>
-QString P2P::Uid::createUid()
+TQString P2P::Uid::createUid()
{
- return (QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number(rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
+ return (TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number(rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
}
-TransferContext::TransferContext(const QString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
- : QObject(dispatcher) ,
+TransferContext::TransferContext(const TQString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+ : TQObject(dispatcher) ,
m_sessionId(sessionId) ,
m_identifier(0) ,
m_file(0) ,
@@ -115,7 +115,7 @@ void TransferContext::acknowledge(const Message& message)
outbound.applicationIdentifier = 0l;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
// Write the acknowledge message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
@@ -137,7 +137,7 @@ void TransferContext::error()
m_dispatcher->detach(this);
}
-void TransferContext::sendData(const QByteArray& bytes)
+void TransferContext::sendData(const TQByteArray& bytes)
{
Message outbound;
outbound.header.sessionId = m_sessionId;
@@ -166,7 +166,7 @@ void TransferContext::sendData(const QByteArray& bytes)
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
{
@@ -194,19 +194,19 @@ void TransferContext::sendDataPreparation()
outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4;
outbound.header.ackUniqueIdentifier = 0;
outbound.header.ackDataSize = 0l;
- QByteArray bytes(4);
+ TQByteArray bytes(4);
bytes.fill('\0');
outbound.body = bytes;
outbound.applicationIdentifier = 1;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream);
// Send the receiving client the data prepartion message.
m_dispatcher->callbackChannel()->send(stream);
}
-void TransferContext::sendMessage(MessageType type, const QString& content, Q_INT32 flag, Q_INT32 appId)
+void TransferContext::sendMessage(MessageType type, const TQString& content, Q_INT32 flag, Q_INT32 appId)
{
Message outbound;
if(appId != 0){
@@ -237,7 +237,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
outbound.applicationIdentifier = appId;
outbound.destination = m_recipient;
- QString contentType, cSeq, method;
+ TQString contentType, cSeq, method;
switch(m_state)
{
@@ -295,7 +295,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
break;
}
- QCString body = QString(method + "\r\n"
+ TQCString body = TQString(method + "\r\n"
"To: <msnmsgr:" + m_recipient + ">\r\n"
"From: <msnmsgr:" + m_sender + ">\r\n"
"Via: MSNSLP/1.0/TLP ;branch={" + m_branch.upper() + "}\r\n"
@@ -303,12 +303,12 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
"Call-ID: {" + m_callId.upper() + "}\r\n"
"Max-Forwards: 0\r\n"
"Content-Type: " + contentType + "\r\n"
- "Content-Length: "+ QString::number(content.length() + 1) + "\r\n"
+ "Content-Length: "+ TQString::number(content.length() + 1) + "\r\n"
"\r\n" +
content).utf8();
// NOTE The body must have a null character at the end.
- // QCString by chance automatically adds a \0 to the
+ // TQCString by chance automatically adds a \0 to the
// end of the string.
outbound.header.totalDataSize = body.size();
@@ -316,7 +316,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
sendMessage(outbound, body);
}
-void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
+void TransferContext::sendMessage(Message& outbound, const TQByteArray& body)
{
Q_INT64 offset = 0L, bytesLeft = outbound.header.totalDataSize;
Q_INT16 chunkLength = 1202;
@@ -343,10 +343,10 @@ void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
}
kdDebug(14140) << k_funcinfo <<
- QCString(outbound.body.data(), outbound.body.size())
+ TQCString(outbound.body.data(), outbound.body.size())
<< endl;
- QByteArray stream;
+ TQByteArray stream;
// Write the outbound message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
diff --git a/kopete/protocols/msn/p2p.h b/kopete/protocols/msn/p2p.h
index c9b29af1..426b8dc5 100644
--- a/kopete/protocols/msn/p2p.h
+++ b/kopete/protocols/msn/p2p.h
@@ -18,7 +18,7 @@
#define P2P_H
// Qt includes
-#include <qobject.h>
+#include <tqobject.h>
#include "messageformatter.h"
#include "kopete_export.h"
@@ -41,7 +41,7 @@ namespace System{
public:
~Guid(){}
static Guid newGuid();
- QString toString();
+ TQString toString();
private:
Guid(){}
@@ -78,19 +78,19 @@ namespace P2P{
struct Message
{
public:
- QString mimeVersion;
- QString contentType;
- QString destination;
- QString source;
+ TQString mimeVersion;
+ TQString contentType;
+ TQString destination;
+ TQString source;
TransportHeader header;
- QByteArray body;
+ TQByteArray body;
Q_INT32 applicationIdentifier;
bool attachApplicationIdentifier;
};
class KOPETE_EXPORT Uid
{
- public: static QString createUid();
+ public: static TQString createUid();
};
class KOPETE_EXPORT TransferContext : public QObject
@@ -103,20 +103,20 @@ namespace P2P{
void error();
virtual void processMessage(const P2P::Message& message) = 0;
void sendDataPreparation();
- void sendMessage(MessageType type, const QString& content=QString::null, Q_INT32 flag=0, Q_INT32 appId=0);
+ void sendMessage(MessageType type, const TQString& content=TQString::null, Q_INT32 flag=0, Q_INT32 appId=0);
void setType(TransferType type);
public:
Q_UINT32 m_sessionId;
Q_UINT32 m_identifier;
- QFile *m_file;
+ TQFile *m_file;
Q_UINT32 m_transactionId;
Q_UINT32 m_ackSessionIdentifier;
Q_UINT32 m_ackUniqueIdentifier;
Kopete::Transfer *m_transfer;
- QString m_branch;
- QString m_callId;
- QString m_object;
+ TQString m_branch;
+ TQString m_callId;
+ TQString m_object;
public slots:
@@ -124,9 +124,9 @@ namespace P2P{
void readyWrite();
protected:
- TransferContext(const QString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId);
- void sendData(const QByteArray& bytes);
- void sendMessage(P2P::Message& outbound, const QByteArray& body);
+ TransferContext(const TQString& contact, P2P::Dispatcher *dispatcher,Q_UINT32 sessionId);
+ void sendData(const TQByteArray& bytes);
+ void sendMessage(P2P::Message& outbound, const TQByteArray& body);
virtual void readyToSend();
Q_UINT32 m_baseIdentifier;
@@ -136,8 +136,8 @@ namespace P2P{
Q_INT64 m_offset;
Q_INT64 m_totalDataSize;
P2P::MessageFormatter m_messageFormatter;
- QString m_recipient;
- QString m_sender;
+ TQString m_recipient;
+ TQString m_sender;
KNetwork::KBufferedSocket *m_socket;
CommunicationState m_state;
TransferType m_type;
diff --git a/kopete/protocols/msn/sha1.cpp b/kopete/protocols/msn/sha1.cpp
index 84ad13ad..0774cede 100644
--- a/kopete/protocols/msn/sha1.cpp
+++ b/kopete/protocols/msn/sha1.cpp
@@ -159,10 +159,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -171,19 +171,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
diff --git a/kopete/protocols/msn/sha1.h b/kopete/protocols/msn/sha1.h
index 24f31af0..2038b9e7 100644
--- a/kopete/protocols/msn/sha1.h
+++ b/kopete/protocols/msn/sha1.h
@@ -21,14 +21,14 @@
#ifndef CS_SHA1_H
#define CS_SHA1_H
-#include<qstring.h>
+#include<tqstring.h>
class SHA1
{
public:
- static QByteArray hash(const QByteArray &);
- static QByteArray hashString(const QCString &);
- static QString digest(const QString &);
+ static TQByteArray hash(const TQByteArray &);
+ static TQByteArray hashString(const TQCString &);
+ static TQString digest(const TQString &);
private:
SHA1();
diff --git a/kopete/protocols/msn/transport.cpp b/kopete/protocols/msn/transport.cpp
index 492117b6..904e9411 100644
--- a/kopete/protocols/msn/transport.cpp
+++ b/kopete/protocols/msn/transport.cpp
@@ -34,8 +34,8 @@ using namespace KNetwork;
namespace PeerToPeer {
-Transport::Transport(QObject* parent, const char* name)
- : QObject(parent, name)
+Transport::Transport(TQObject* parent, const char* name)
+ : TQObject(parent, name)
{
mFormatter = new PeerToPeer::MessageFormatter(this);
}
@@ -47,7 +47,7 @@ Transport::~Transport()
//BEGIN Public Methods
-TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, TransportBridgeType type, const QString& identifier)
+TransportBridge* Transport::getBridge (const TQString& to, Q_UINT16 port, TransportBridgeType type, const TQString& identifier)
{
TransportBridge *bridge = 0l;
KInetSocketAddress address;
@@ -72,7 +72,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo
if (bridge != 0l)
{
- QObject::connect(bridge, SIGNAL(readyRead(const QByteArray&)), SLOT(slotOnReceive(const QByteArray&)));
+ TQObject::connect(bridge, TQT_SIGNAL(readyRead(const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQByteArray&)));
}
return 0l;
@@ -81,7 +81,7 @@ TransportBridge* Transport::getBridge (const QString& to, Q_UINT16 port, Transpo
void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss)
{
mDefaultBridge = mss;
- QObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, SIGNAL(messageReceived(const QString&, const QByteArray&)), SLOT(slotOnReceive(const QString&, const QByteArray&)));
+ TQObject::connect((MSNSwitchBoardSocket*)mDefaultBridge, TQT_SIGNAL(messageReceived(const TQString&, const TQByteArray&)), TQT_SLOT(slotOnReceive(const TQString&, const TQByteArray&)));
}
//END
@@ -92,7 +92,7 @@ void Transport::setDefaultBridge(MSNSwitchBoardSocket* mss)
// {
// }
-void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes)
+void Transport::slotOnReceive(const TQString& contact, const TQByteArray& bytes)
{
kdDebug (14140) << k_funcinfo << " >> RECEIVED " << bytes.size() << " bytes." << endl;
// Message message = mFormatter->readMessage(bytes);
@@ -103,15 +103,15 @@ void Transport::slotOnReceive(const QString& contact, const QByteArray& bytes)
-TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name)
-: QObject(parent, name)
+TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name)
+: TQObject(parent, name)
{
mAddress = to;
mFormatter = formatter;
}
-TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name)
-: QObject(parent, name)
+TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name)
+: TQObject(parent, name)
{
mSocket = socket;
mAddress = mSocket->peerAddress();
@@ -166,17 +166,17 @@ void TransportBridge::slotOnSocketReceive()
-TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name)
+TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name)
: TransportBridge(to, formatter, parent, name)
{
- mSocket = new KStreamSocket(mAddress.ipAddress().toString(), QString::number(mAddress.port()), this);
+ mSocket = new KStreamSocket(mAddress.ipAddress().toString(), TQString::number(mAddress.port()), this);
mSocket->setBlocking(false);
- QObject::connect(mSocket, SIGNAL(connected(const KResolverEntry&)), SLOT(slotOnSocketConnect()));
- QObject::connect(mSocket, SIGNAL(gotError(int)), SLOT(slotOnError(int)));
+ TQObject::connect(mSocket, TQT_SIGNAL(connected(const KResolverEntry&)), TQT_SLOT(slotOnSocketConnect()));
+ TQObject::connect(mSocket, TQT_SIGNAL(gotError(int)), TQT_SLOT(slotOnError(int)));
mConnected = false;
}
-TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name)
+TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name)
: TransportBridge(socket, formatter, parent, name)
{
mConnected = (mSocket->state() == KStreamSocket::Open) ? true : false;
@@ -199,7 +199,7 @@ void TcpTransportBridge::slotOnConnect()
KStreamSocket *socket = static_cast<KStreamSocket*>(mSocket);
socket->setTimeout(5000);
- QObject::connect(socket, SIGNAL(timeOut()), SLOT(slotOnSocketConnectTimeout()));
+ TQObject::connect(socket, TQT_SIGNAL(timeOut()), TQT_SLOT(slotOnSocketConnectTimeout()));
mSocket->connect();
}
@@ -213,7 +213,7 @@ void TcpTransportBridge::slotOnDisconnect()
void TcpTransportBridge::slotOnError(int errorCode)
{
kdDebug(14140) << k_funcinfo << "Bridge (" << name() << ") ERROR occurred on {" << mSocket->localAddress().toString() << " <-> " << mSocket->peerAddress().toString() << "} - " << mSocket->errorString() << endl;
- emit bridgeError(QString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString()));
+ emit bridgeError(TQString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString()));
if (mConnected){
mSocket->disconnect();
mConnected = false;
@@ -239,13 +239,13 @@ void TcpTransportBridge::slotOnSocketConnect()
<< mSocket->localAddress().toString() << endl;
mConnected = true;
- QObject::connect(mSocket, SIGNAL(readyRead()), SLOT(slotOnSocketReceive()));
- QObject::connect(mSocket, SIGNAL(closed()), SLOT(slotOnSocketClose()));
+ TQObject::connect(mSocket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotOnSocketReceive()));
+ TQObject::connect(mSocket, TQT_SIGNAL(closed()), TQT_SLOT(slotOnSocketClose()));
mVerified = true;
- QString foo = "foo\0";
+ TQString foo = "foo\0";
mSocket->writeBlock(foo.ascii(), foo.length());
- foo = QString::null;
+ foo = TQString::null;
emit bridgeConnect();
}
@@ -254,15 +254,15 @@ void TcpTransportBridge::slotOnSocketReceive()
{
kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") RECEIVED " << mSocket->bytesAvailable() << " bytes." << endl;
- QByteArray bytes(mSocket->bytesAvailable());
+ TQByteArray bytes(mSocket->bytesAvailable());
mSocket->readBlock(bytes.data(), bytes.size());
// Write the data to the buffer.
mBuffer.write(bytes);
if (mVerified == false && mBuffer.size() >= 4)
{
- QByteArray foo = mBuffer.read(4);
- if (QString(foo) == "foo"){
+ TQByteArray foo = mBuffer.read(4);
+ if (TQString(foo) == "foo"){
kdDebug (14140) << k_funcinfo << "Bridge (" << name() << ") CONNECTION verified." << endl;
mVerified = true;
}
@@ -272,7 +272,7 @@ void TcpTransportBridge::slotOnSocketReceive()
{
if (mBuffer.size() >= 4 && mLength == 0)
{
- QByteArray array = mBuffer.read(4);
+ TQByteArray array = mBuffer.read(4);
for (int i=0; i < 4; i++){
((char*)mLength)[i] = array[i];
}
@@ -312,7 +312,7 @@ void TcpTransportBridge::slotOnSocketConnectTimeout()
TcpTransportBridge::Buffer::Buffer(Q_UINT32 length)
-: QByteArray(length)
+: TQByteArray(length)
{
}
@@ -322,7 +322,7 @@ TcpTransportBridge::Buffer::~Buffer()
//BEGIN Public Methods
-void TcpTransportBridge::Buffer::write(const QByteArray& bytes)
+void TcpTransportBridge::Buffer::write(const TQByteArray& bytes)
{
resize(size() + bytes.size());
for (uint i=0; i < bytes.size(); i++){
@@ -330,11 +330,11 @@ void TcpTransportBridge::Buffer::write(const QByteArray& bytes)
}
}
-QByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length)
+TQByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length)
{
- if (length >= size()) return QByteArray();
+ if (length >= size()) return TQByteArray();
- QByteArray buffer;
+ TQByteArray buffer;
buffer.duplicate(data(), length);
char *bytes = new char[size() - length];
diff --git a/kopete/protocols/msn/transport.h b/kopete/protocols/msn/transport.h
index 0dae0f32..eb190325 100644
--- a/kopete/protocols/msn/transport.h
+++ b/kopete/protocols/msn/transport.h
@@ -18,9 +18,9 @@
#define PEERTOPEERTRANSPORT_H
//BEGIN QT Includes
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
//END
//BEGIN KDE Includes
@@ -52,10 +52,10 @@ class Transport : public QObject
Q_OBJECT
public:
/** @brief Creates a new instance of the class Transport. */
- Transport(QObject* parent, const char* name = 0l);
+ Transport(TQObject* parent, const char* name = 0l);
~Transport();
/** @brief Get a transport bridge with the specified address, port, type and identifier. */
- TransportBridge* getBridge(const QString& address, Q_UINT16 port, TransportBridgeType type, const QString& identifier);
+ TransportBridge* getBridge(const TQString& address, Q_UINT16 port, TransportBridgeType type, const TQString& identifier);
/** @brief Sets the default transport bridge. */
void setDefaultBridge(MSNSwitchBoardSocket* mss);
@@ -63,15 +63,15 @@ private slots:
/** @brief Invokes when a message is received on a transport bridge. */
// void slotOnReceive(Message& message);
/** @brief Invokes when a message is received on the default transport bridge (relay). */
- void slotOnReceive(const QString& contact, const QByteArray& bytes);
+ void slotOnReceive(const TQString& contact, const TQByteArray& bytes);
private:
/** @brief Known SocketAddresses of peers. */
- QMap<QString, KNetwork::KInetSocketAddress> mAddresses;
+ TQMap<TQString, KNetwork::KInetSocketAddress> mAddresses;
/** @brief The list the connected transport bridges. */
- QValueList<TransportBridge*> mBridges;
+ TQValueList<TransportBridge*> mBridges;
/** @brief The default transport bridge (relay). */
- QGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge;
+ TQGuardedPtr<MSNSwitchBoardSocket> mDefaultBridge;
/** @brief Message formatter used to ser/deser message. */
MessageFormatter *mFormatter;
};
@@ -85,9 +85,9 @@ public:
protected:
/** @brief Creates a new instance of the class TransportBridge with the specified address and formatter. */
- TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
/** @brief Creates a new instance of the class TransportBridge with the specified socket and formatter. */
- TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
public:
/** @brief Creates a connection between two peers. */
@@ -106,8 +106,8 @@ protected slots:
signals:
void bridgeConnect();
void bridgeDisconnect();
- void bridgeError(const QString& e);
- void bytesReceived(const QByteArray&);
+ void bridgeError(const TQString& e);
+ void bytesReceived(const TQByteArray&);
protected:
@@ -128,8 +128,8 @@ public:
virtual ~TcpTransportBridge();
private:
- TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
- TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, QObject* parent, const char* name = 0l);
+ TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
+ TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name = 0l);
protected slots:
virtual void slotOnConnect();
@@ -153,8 +153,8 @@ private:
~Buffer();
public:
- void write(const QByteArray& bytes);
- QByteArray read(Q_UINT32 length);
+ void write(const TQByteArray& bytes);
+ TQByteArray read(Q_UINT32 length);
};
Buffer mBuffer;
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
index 1829f41d..baa4fb60 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.cpp
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
@@ -18,16 +18,16 @@
#include "msneditaccountwidget.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kautoconfig.h>
@@ -61,18 +61,18 @@ public:
KAutoConfig *autoConfig;
MSNEditAccountUI *ui;
- QString pictureUrl;
- QImage pictureData;
+ TQString pictureUrl;
+ TQImage pictureData;
};
-MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent, const char * /* name */ )
-: QWidget( parent ), KopeteEditAccountWidget( account )
+MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent, const char * /* name */ )
+: TQWidget( parent ), KopeteEditAccountWidget( account )
{
d = new MSNEditAccountWidgetPrivate;
d->protocol=proto;
- ( new QVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, 0 ) )->setAutoAdd( true );
d->ui = new MSNEditAccountUI( this );
@@ -85,9 +85,9 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
//Get a list of all jabber accounts
KGlobal::config()->setGroup("MSN");
- QString jab_account=KGlobal::config()->readEntry("JabberAccount");
+ TQString jab_account=KGlobal::config()->readEntry("JabberAccount");
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() )
{
if(a->protocol()->pluginId()=="JabberProtocol")
@@ -146,20 +146,20 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_serverName->setText( m_account->serverName() );
d->ui->m_serverPort->setValue( m_account->serverPort() );
- QStringList blockList = config->readListEntry( "blockList" );
- QStringList allowList = config->readListEntry( "allowList" );
- //QStringList reverseList = config->readListEntry("reverseList" );
+ TQStringList blockList = config->readListEntry( "blockList" );
+ TQStringList allowList = config->readListEntry( "allowList" );
+ //TQStringList reverseList = config->readListEntry("reverseList" );
- for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
+ for ( TQStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
d->ui->m_BL->insertItem( *it );
- for ( QStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
+ for ( TQStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it )
d->ui->m_AL->insertItem( *it );
d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" );
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
d->ui->m_displayPicture->setPixmap( d->pictureUrl );
d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" ));
@@ -174,14 +174,14 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_phones->setDisabled( true );
}
- connect( d->ui->m_allowButton, SIGNAL( clicked() ), this, SLOT( slotAllow() ) );
- connect( d->ui->m_blockButton, SIGNAL( clicked() ), this, SLOT( slotBlock() ) );
- connect( d->ui->m_selectImage, SIGNAL( clicked() ), this, SLOT( slotSelectImage() ) );
- connect( d->ui->m_RLButton, SIGNAL( clicked() ), this, SLOT( slotShowReverseList() ) );
- connect( d->ui->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister()));
- QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
- QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
- QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
+ connect( d->ui->m_allowButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAllow() ) );
+ connect( d->ui->m_blockButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBlock() ) );
+ connect( d->ui->m_selectImage, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectImage() ) );
+ connect( d->ui->m_RLButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowReverseList() ) );
+ connect( d->ui->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister()));
+ TQWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered );
+ TQWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword );
+ TQWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin );
}
MSNEditAccountWidget::~MSNEditAccountWidget()
@@ -227,7 +227,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() )
{
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account()->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" );
+ account()->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
if ( d->pictureData.save( d->pictureUrl, "PNG" ) )
{
static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl );
@@ -270,7 +270,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
bool MSNEditAccountWidget::validateData()
{
- QString userid = d->ui->m_login->text();
+ TQString userid = d->ui->m_login->text();
if ( MSNProtocol::validContactId( userid ) )
return true;
@@ -282,16 +282,16 @@ bool MSNEditAccountWidget::validateData()
void MSNEditAccountWidget::slotAllow()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_BL->selectedItem();
+ TQListBoxItem *item = d->ui->m_BL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::BL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::BL, TQString::null, TQString::null );
d->ui->m_BL->takeItem( item );
d->ui->m_AL->insertItem( item );
@@ -300,17 +300,17 @@ void MSNEditAccountWidget::slotAllow()
void MSNEditAccountWidget::slotBlock()
{
//TODO: play with multiple selection
- QListBoxItem *item = d->ui->m_AL->selectedItem();
+ TQListBoxItem *item = d->ui->m_AL->selectedItem();
if ( !item )
return;
- QString handle = item->text();
+ TQString handle = item->text();
MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket();
if ( !notify )
return;
- notify->removeContact( handle, MSNProtocol::AL, QString::null, QString::null );
+ notify->removeContact( handle, MSNProtocol::AL, TQString::null, TQString::null );
d->ui->m_AL->takeItem( item );
d->ui->m_BL->insertItem( item );
@@ -318,16 +318,16 @@ void MSNEditAccountWidget::slotBlock()
void MSNEditAccountWidget::slotShowReverseList()
{
- QStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
+ TQStringList reverseList = account()->configGroup()->readListEntry( "reverseList" );
KMessageBox::informationList( this, i18n( "Here you can see a list of contacts who added you to their contact list" ), reverseList,
i18n( "Reverse List - MSN Plugin" ) );
}
void MSNEditAccountWidget::slotSelectImage()
{
- QString path = 0;
+ TQString path = 0;
bool remoteFile = false;
- KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "MSN Display Picture" ) );
+ KURL filePath = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "MSN Display Picture" ) );
if( filePath.isEmpty() )
return;
@@ -340,14 +340,14 @@ void MSNEditAccountWidget::slotSelectImage()
}
else path = filePath.path();
- QImage img( path );
- img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this );
+ TQImage img( path );
+ img = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(img), 96, 96, this );
if(!img.isNull())
{
img = MSNProtocol::protocol()->scalePicture(img);
- d->ui->m_displayPicture->setPixmap( QPixmap(img) );
+ d->ui->m_displayPicture->setPixmap( TQPixmap(img) );
d->pictureData = img;
}
else
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.h b/kopete/protocols/msn/ui/msneditaccountwidget.h
index 2b8b8f6e..40900871 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.h
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.h
@@ -19,7 +19,7 @@
#ifndef MSNEDITACCOUNTWIDEGET_H
#define MSNEDITACCOUNTWIDEGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "editaccountwidget.h"
@@ -32,12 +32,12 @@ class MSNEditAccountWidgetPrivate;
/**
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class MSNEditAccountWidget : public QWidget, public KopeteEditAccountWidget
+class MSNEditAccountWidget : public TQWidget, public KopeteEditAccountWidget
{
Q_OBJECT
public:
- MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent = 0, const char *name = 0 );
+ MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, TQWidget *parent = 0, const char *name = 0 );
~MSNEditAccountWidget();
virtual bool validateData();
virtual Kopete::Account * apply();
diff --git a/kopete/protocols/msn/webcam.cpp b/kopete/protocols/msn/webcam.cpp
index db27d65f..60ce0e82 100644
--- a/kopete/protocols/msn/webcam.cpp
+++ b/kopete/protocols/msn/webcam.cpp
@@ -18,16 +18,16 @@
#include <stdlib.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kbufferedsocket.h>
#include <klocale.h>
#include <kserversocket.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qdatetime.h>
+#include <tqlabel.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqdatetime.h>
#include <kconfig.h>
#include "dispatcher.h"
@@ -42,7 +42,7 @@ using namespace KNetwork;
namespace P2P {
-Webcam::Webcam(Who who, const QString& to, Dispatcher *parent, Q_UINT32 sessionId)
+Webcam::Webcam(Who who, const TQString& to, Dispatcher *parent, Q_UINT32 sessionId)
: TransferContext(to,parent,sessionId) , m_who(who) , m_timerId(0)
{
setType(P2P::WebcamType);
@@ -83,8 +83,8 @@ void Webcam::askIncommingInvitation()
{
m_direction = Incoming;
//protect, in case this is deleted when the messagebox is active
- QGuardedPtr<Webcam> _this = this;
- QString message= (m_who==wProducer) ?
+ TQGuardedPtr<Webcam> _this = this;
+ TQString message= (m_who==wProducer) ?
i18n("<qt>The contact %1 wants to see <b>your</b> webcam, do you want them to see it?</qt>") :
i18n("The contact %1 wants to show you his/her webcam, do you want to see it?") ;
int result=KMessageBox::questionYesNo( 0L , message.arg(m_recipient),
@@ -92,7 +92,7 @@ void Webcam::askIncommingInvitation()
if(!_this)
return;
- QString content = QString("SessionID: %1\r\n\r\n").arg(m_sessionId);
+ TQString content = TQString("SessionID: %1\r\n\r\n").arg(m_sessionId);
if(result==KMessageBox::Yes)
{
//Send two message, an OK, and an invite.
@@ -107,7 +107,7 @@ void Webcam::askIncommingInvitation()
m_branch=Uid::createUid();
m_state = Negotiation; //set type to application/x-msnmsgr-transreqbody
- content=QString("Bridges: TRUDPv1 TCPv1\r\n"
+ content=TQString("Bridges: TRUDPv1 TCPv1\r\n"
"NetID: -1280904111\r\n"
"Conn-Type: Firewall\r\n"
"UPnPNat: false\r\n"
@@ -127,11 +127,11 @@ void Webcam::askIncommingInvitation()
void Webcam::sendBYEMessage()
{
m_state=Finished;
- QString content="Context: dAMAgQ==\r\n";
+ TQString content="Context: dAMAgQ==\r\n";
sendMessage(BYE,content);
//If ever the opposite client was dead or something, we'll ack anyway, so everything get cleaned
- QTimer::singleShot(60*1000 , this, SLOT(acknowledged()));
+ TQTimer::singleShot(60*1000 , this, TQT_SLOT(acknowledged()));
}
@@ -203,7 +203,7 @@ void Webcam::processMessage(const Message& message)
if(message.applicationIdentifier != 4l)
{
- QString body = QCString(message.body.data(), message.header.dataSize);
+ TQString body = TQCString(message.body.data(), message.header.dataSize);
kdDebug(14141) << k_funcinfo << "received, " << body << endl;
if(body.startsWith("MSNSLP/1.0 200 OK"))
@@ -214,7 +214,7 @@ void Webcam::processMessage(const Message& message)
{
if(m_direction == Outgoing)
{
- QRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
+ TQRegExp regex(";branch=\\{([0-9A-F\\-]*)\\}\r\n");
regex.search(body);
m_branch=regex.cap(1);
//decline
@@ -242,10 +242,10 @@ void Webcam::processMessage(const Message& message)
//Let's take the fun, we entering into the delicious webcam negotiation binary protocol
//well, there is maybe better to take utf16, but it's ascii, so no problem.
- QByteArray dataMessage=message.body;
+ TQByteArray dataMessage=message.body;
#if 0
- QString echoS="";
+ TQString echoS="";
unsigned int f=0;
while(f<dataMessage.size())
{
@@ -257,7 +257,7 @@ void Webcam::processMessage(const Message& message)
unsigned int N=(unsigned int) (dataMessage[q+f]);
if(N<16)
echoS+="0";
- echoS+=QString::number( N ,16)+" ";
+ echoS+=TQString::number( N ,16)+" ";
}
else
echoS+=" ";
@@ -268,7 +268,7 @@ void Webcam::processMessage(const Message& message)
{
unsigned char X=dataMessage[q+f];
char C=((char)(( X<128 && X>31 ) ? X : '.'));
- echoS+=QString::fromLatin1(&C,1);
+ echoS+=TQString::fromLatin1(&C,1);
}
f+=16;
}
@@ -305,31 +305,31 @@ void Webcam::processMessage(const Message& message)
{
uint sess=rand()%1000+5000;
uint rid=rand()%100+50;
- m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess);
+ m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid).arg(sess);
kdDebug(14140) << k_funcinfo << "m_myAuth= " << m_myAuth << endl;
- QString producerxml=xml(sess , rid);
+ TQString producerxml=xml(sess , rid);
kdDebug(14140) << k_funcinfo << "producerxml= " << producerxml << endl;
makeSIPMessage(producerxml);
}
}
else if(m_content.contains("<producer>") || m_content.contains("<viewer>"))
{
- QRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>");
+ TQRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>");
rx.search(m_content);
- QString rid=rx.cap(1);
- QString sess=rx.cap(2);
+ TQString rid=rx.cap(1);
+ TQString sess=rx.cap(2);
if(m_content.contains("<producer>"))
{
- QString viewerxml=xml(sess.toUInt() , rid.toUInt());
+ TQString viewerxml=xml(sess.toUInt() , rid.toUInt());
kdDebug(14140) << k_funcinfo << "vewerxml= " << viewerxml << endl;
makeSIPMessage( viewerxml ,0x00,0x09,0x00 );
- m_peerAuth=m_myAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
+ m_peerAuth=m_myAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
kdDebug(14140) << k_funcinfo << "m_auth= " << m_myAuth << endl;
}
else
{
- m_peerAuth=QString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
+ m_peerAuth=TQString("recipientid=%1&sessionid=%2\r\n\r\n").arg(rid,sess);
makeSIPMessage("receivedViewerData", 0xec , 0xda , 0x03);
}
@@ -342,39 +342,39 @@ void Webcam::processMessage(const Message& message)
}
//m_listener->setResolutionEnabled(true);
// Create the callback that will try to accept incoming connections.
- QObject::connect(m_listener, SIGNAL(readyAccept()), this, SLOT(slotAccept()));
- QObject::connect(m_listener, SIGNAL(gotError(int)), this, SLOT(slotListenError(int)));
+ TQObject::connect(m_listener, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotAccept()));
+ TQObject::connect(m_listener, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotListenError(int)));
// Listen for incoming connections.
bool isListening = m_listener->listen();
- kdDebug(14140) << k_funcinfo << (isListening ? QString("listening %1").arg(m_listener->localAddress().toString()) : QString("not listening")) << endl;
+ kdDebug(14140) << k_funcinfo << (isListening ? TQString("listening %1").arg(m_listener->localAddress().toString()) : TQString("not listening")) << endl;
- rx=QRegExp("<tcpport>([^<]*)</tcpport>");
+ rx=TQRegExp("<tcpport>([^<]*)</tcpport>");
rx.search(m_content);
- QString port1=rx.cap(1);
+ TQString port1=rx.cap(1);
if(port1=="0")
- port1=QString::null;
+ port1=TQString::null;
- rx=QRegExp("<tcplocalport>([^<]*)</tcplocalport>");
+ rx=TQRegExp("<tcplocalport>([^<]*)</tcplocalport>");
rx.search(m_content);
- QString port2=rx.cap(1);
+ TQString port2=rx.cap(1);
if(port2==port1 || port2=="0")
- port2=QString::null;
+ port2=TQString::null;
- rx=QRegExp("<tcpexternalport>([^<]*)</tcpexternalport>");
+ rx=TQRegExp("<tcpexternalport>([^<]*)</tcpexternalport>");
rx.search(m_content);
- QString port3=rx.cap(1);
+ TQString port3=rx.cap(1);
if(port3==port1 || port3==port2 || port3=="0")
- port3=QString::null;
+ port3=TQString::null;
int an=0;
while(true)
{
an++;
- if(!m_content.contains( QString("<tcpipaddress%1>").arg(an) ))
+ if(!m_content.contains( TQString("<tcpipaddress%1>").arg(an) ))
break;
- rx=QRegExp(QString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an));
+ rx=TQRegExp(TQString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").arg(an).arg(an));
rx.search(m_content);
- QString ip=rx.cap(1);
+ TQString ip=rx.cap(1);
if(ip.isNull())
continue;
@@ -383,8 +383,8 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port1 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port1, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port1);
kdDebug(14140) << k_funcinfo << "okok " << sock << " - " << sock->peerAddress().toString() << " ; " << sock->localAddress().toString() << endl;
}
@@ -393,8 +393,8 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port2 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port2, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port2);
}
if(!port3.isNull())
@@ -402,12 +402,12 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "trying to connect on " << ip <<":" << port3 << endl;
KBufferedSocket *sock=new KBufferedSocket( ip, port3, this );
m_allSockets.append(sock);
- QObject::connect( sock, SIGNAL( connected( const KResolverEntry&) ), this, SLOT( slotSocketConnected() ) );
- QObject::connect( sock, SIGNAL( gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect( sock, TQT_SIGNAL( connected( const KResolverEntry&) ), this, TQT_SLOT( slotSocketConnected() ) );
+ TQObject::connect( sock, TQT_SIGNAL( gotError(int)), this, TQT_SLOT(slotSocketError(int)));
sock->connect(ip, port3);
}
}
- QValueList<KBufferedSocket*>::iterator it;
+ TQValueList<KBufferedSocket*>::iterator it;
for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it )
{
KBufferedSocket *sock=(*it);
@@ -422,14 +422,14 @@ void Webcam::processMessage(const Message& message)
}
else
error();
- m_content=QString::null;
+ m_content=TQString::null;
}
-void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ)
+void Webcam::makeSIPMessage(const TQString &message, Q_UINT8 XX, Q_UINT8 YY , Q_UINT8 ZZ)
{
- QByteArray dataMessage; //(12+message.length()*2);
- QDataStream writer(dataMessage, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQByteArray dataMessage; //(12+message.length()*2);
+ TQDataStream writer(dataMessage, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
writer << (Q_UINT8)0x80;
writer << (Q_UINT8)XX;
writer << (Q_UINT8)YY;
@@ -439,7 +439,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
writer << message+'\0';
//writer << (Q_UINT16)0x0000;
- /*QString echoS="";
+ /*TQString echoS="";
unsigned int f=0;
while(f<dataMessage.size())
{
@@ -451,7 +451,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
unsigned int N=(unsigned int) (dataMessage[q+f]);
if(N<16)
echoS+="0";
- echoS+=QString::number( N ,16)+" ";
+ echoS+=TQString::number( N ,16)+" ";
}
else
echoS+=" ";
@@ -462,7 +462,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
{
unsigned char X=dataMessage[q+f];
char C=((char)(( X<128 && X>31 ) ? X : '.'));
- echoS+=QString::fromLatin1(&C,1);
+ echoS+=TQString::fromLatin1(&C,1);
}
f+=16;
}
@@ -472,7 +472,7 @@ void Webcam::makeSIPMessage(const QString &message, Q_UINT8 XX, Q_UINT8 YY , Q_U
sendBigP2PMessage(dataMessage);
}
-void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
+void Webcam::sendBigP2PMessage( const TQByteArray & dataMessage)
{
unsigned int size=m_totalDataSize=dataMessage.size();
m_offset=0;
@@ -481,7 +481,7 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
for(unsigned int f=0;f<size;f+=1200)
{
m_offset=f;
- QByteArray dm2;
+ TQByteArray dm2;
dm2.duplicate(dataMessage.data()+m_offset, QMIN(1200,m_totalDataSize-m_offset));
sendData( dm2 );
m_offset+=dm2.size();
@@ -492,26 +492,26 @@ void Webcam::sendBigP2PMessage( const QByteArray & dataMessage)
-QString Webcam::xml(uint session , uint rid)
+TQString Webcam::xml(uint session , uint rid)
{
- QString who= ( m_who == wProducer ) ? QString("producer") : QString("viewer");
+ TQString who= ( m_who == wProducer ) ? TQString("producer") : TQString("viewer");
- QString ip;
+ TQString ip;
uint ip_number=1;
- QStringList::iterator it;
- QStringList ips=m_dispatcher->localIp();
+ TQStringList::iterator it;
+ TQStringList ips=m_dispatcher->localIp();
for ( it = ips.begin(); it != ips.end(); ++it )
{
- ip+=QString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number);
+ ip+=TQString("<tcpipaddress%1>%2</tcpipaddress%3>").arg(ip_number).arg(*it).arg(ip_number);
++ip_number;
}
- QString port = QString::number(getAvailablePort());
+ TQString port = TQString::number(getAvailablePort());
m_listener = new KServerSocket(port, this) ;
- return "<" + who + "><version>2.0</version><rid>"+QString::number(rid)+"</rid><udprid>"+QString::number(rid+1)+"</udprid><session>"+QString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" +
+ return "<" + who + "><version>2.0</version><rid>"+TQString::number(rid)+"</rid><udprid>"+TQString::number(rid+1)+"</udprid><session>"+TQString::number(session)+"</session><ctypes>0</ctypes><cpu>2931</cpu>" +
"<tcp><tcpport>"+port+"</tcpport>\t\t\t\t\t\t\t\t <tcplocalport>"+port+"</tcplocalport>\t\t\t\t\t\t\t\t <tcpexternalport>"+port+"</tcpexternalport>"+ip+"</tcp>"+
"<udp><udplocalport>7786</udplocalport><udpexternalport>31863</udpexternalport><udpexternalip>"+ ip +"</udpexternalip><a1_port>31859</a1_port><b1_port>31860</b1_port><b2_port>31861</b2_port><b3_port>31862</b3_port><symmetricallocation>1</symmetricallocation><symmetricallocationincrement>1</symmetricallocationincrement><udpversion>1</udpversion><udpinternalipaddress1>127.0.0.1</udpinternalipaddress1></udp>"+
"<codec></codec><channelmode>1</channelmode></"+who+">\r\n\r\n";
@@ -521,7 +521,7 @@ int Webcam::getAvailablePort()
{
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
- QString basePort=config->readEntry("WebcamPort");
+ TQString basePort=config->readEntry("WebcamPort");
if(basePort.isEmpty() || basePort == "0" )
basePort="6891";
@@ -536,7 +536,7 @@ int Webcam::getAvailablePort()
bool found = false;
unsigned int port = firstport;
for( ; port <= lastport; ++port) {
- ss->setAddress( QString::number( port ) );
+ ss->setAddress( TQString::number( port ) );
bool success = ss->listen();
if( found = ( success && ss->error() == KSocketBase::NoError ) )
break;
@@ -568,14 +568,14 @@ void Webcam::slotSocketConnected()
m_webcamSocket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
-// QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+// TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
m_webcamStates[m_webcamSocket]=wsConnected;
- QCString to_send=m_peerAuth.utf8();
+ TQCString to_send=m_peerAuth.utf8();
m_webcamSocket->writeBlock(to_send.data(), to_send.length());
kdDebug(14140) << k_funcinfo << "sending "<< m_peerAuth << endl;
@@ -608,11 +608,11 @@ void Webcam::slotAccept()
m_webcamSocket->enableWrite(false);
// Create the callback that will try to read bytes from the accepted socket.
- QObject::connect(m_webcamSocket, SIGNAL(readyRead()), this, SLOT(slotSocketRead()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketRead()));
// Create the callback that will try to handle the socket close event.
- QObject::connect(m_webcamSocket, SIGNAL(closed()), this, SLOT(slotSocketClosed()));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotSocketClosed()));
// Create the callback that will try to handle the socket error event.
- QObject::connect(m_webcamSocket, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ TQObject::connect(m_webcamSocket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
m_allSockets.append(m_webcamSocket);
m_webcamStates[m_webcamSocket]=wsNegotiating;
@@ -625,14 +625,14 @@ void Webcam::slotSocketRead()
uint available = m_webcamSocket->bytesAvailable();
kdDebug(14140) << k_funcinfo << m_webcamSocket << "############# " << available << " bytes available." << endl;
- QByteArray avail_buff(available);
+ TQByteArray avail_buff(available);
m_webcamSocket->peekBlock(avail_buff.data(), avail_buff.size());
kdDebug(14140) << k_funcinfo << m_webcamSocket << avail_buff << endl;
- const QString connected_str("connected\r\n\r\n");
+ const TQString connected_str("connected\r\n\r\n");
switch(m_webcamStates[m_webcamSocket])
{
case wsNegotiating:
@@ -642,16 +642,16 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<m_myAuth.length()<< " )"<< endl;
break;
}
- QByteArray buffer(available);
+ TQByteArray buffer(available);
m_webcamSocket->readBlock(buffer.data(), buffer.size());
kdDebug(14140) << k_funcinfo << buffer.data() << endl;
- if(QString(buffer) == m_myAuth )
+ if(TQString(buffer) == m_myAuth )
{
closeAllOtherSockets();
kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl;
- QCString conne=connected_str.utf8();
+ TQCString conne=connected_str.utf8();
m_webcamSocket->writeBlock(conne.data(), conne.length());
m_webcamStates[m_webcamSocket]=wsConnecting;
@@ -668,7 +668,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl;
}
m_widget=new MSNWebcamDialog(m_recipient);
- connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage()));
+ connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage()));
}
else
@@ -690,19 +690,19 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<connected_str.length()<< " )"<< endl;
break;
}
- QByteArray buffer(connected_str.length());
+ TQByteArray buffer(connected_str.length());
m_webcamSocket->readBlock(buffer.data(), buffer.size());
-// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << QCString(buffer) << endl;
+// kdDebug(14140) << k_funcinfo << "state " << m_webcamState << " received :" << TQCString(buffer) << endl;
- if(QString(buffer) == connected_str)
+ if(TQString(buffer) == connected_str)
{
if(m_webcamStates[m_webcamSocket]==wsConnected)
{
closeAllOtherSockets();
kdDebug(14140) << k_funcinfo << "Sending " << connected_str << endl;
- QCString conne=connected_str.utf8();
+ TQCString conne=connected_str.utf8();
m_webcamSocket->writeBlock(conne.data(), conne.length());
//SHOULD BE DONE IN ALL CASE
@@ -718,7 +718,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "new timer" << m_timerId << endl;
}
m_widget=new MSNWebcamDialog(m_recipient);
- connect(m_widget, SIGNAL( closingWebcamDialog() ) , this , SLOT(sendBYEMessage()));
+ connect(m_widget, TQT_SIGNAL( closingWebcamDialog() ) , this , TQT_SLOT(sendBYEMessage()));
}
m_webcamStates[m_webcamSocket]=wsTransfer;
@@ -746,7 +746,7 @@ void Webcam::slotSocketRead()
kdDebug(14140) << k_funcinfo << "waiting more data ( " << available << " of " <<24<< " )"<< endl;
break;
}
- QByteArray buffer(24);
+ TQByteArray buffer(24);
m_webcamSocket->peekBlock(buffer.data(), buffer.size());
Q_UINT32 paysize=(uchar)buffer[8] + ((uchar)buffer[9]<<8) + ((uchar)buffer[10]<<16) + ((uchar)buffer[11]<<24);
@@ -760,7 +760,7 @@ void Webcam::slotSocketRead()
buffer.resize(paysize);
m_webcamSocket->readBlock(buffer.data(), buffer.size());
- QPixmap pix=m_mimic->decode(buffer);
+ TQPixmap pix=m_mimic->decode(buffer);
if(pix.isNull())
{
kdWarning(14140) << k_funcinfo << "incorrect pixmap returned, better to stop everything"<< endl;
@@ -815,7 +815,7 @@ void Webcam::closeAllOtherSockets()
delete m_listener;
m_listener=0l;
- QValueList<KBufferedSocket*>::iterator it;
+ TQValueList<KBufferedSocket*>::iterator it;
for ( it = m_allSockets.begin(); it != m_allSockets.end(); ++it )
{
KBufferedSocket *sock=(*it);
@@ -826,7 +826,7 @@ void Webcam::closeAllOtherSockets()
}
-void Webcam::timerEvent( QTimerEvent *e )
+void Webcam::timerEvent( TQTimerEvent *e )
{
if(e->timerId() != m_timerId)
return TransferContext::timerEvent(e);
@@ -835,7 +835,7 @@ void Webcam::timerEvent( QTimerEvent *e )
Kopete::AV::VideoDevicePool *videoDevice = Kopete::AV::VideoDevicePool::self();
videoDevice->getFrame();
- QImage img;
+ TQImage img;
videoDevice->getImage(&img);
if(m_widget)
@@ -848,7 +848,7 @@ void Webcam::timerEvent( QTimerEvent *e )
}
uchar *bits=img.bits();
- QByteArray image_data(img.width()*img.height()*3);
+ TQByteArray image_data(img.width()*img.height()*3);
uint b2=0;
uint imgsize=img.width()*img.height()*4;
for(uint f=0; f< imgsize; f+=4)
@@ -859,15 +859,15 @@ void Webcam::timerEvent( QTimerEvent *e )
b2+=3;
}
- QByteArray frame=m_mimic->encode(image_data);
+ TQByteArray frame=m_mimic->encode(image_data);
kdDebug(14140) << k_funcinfo << "Sendinf frame of size " << frame.size() << endl;
//build the header.
- QByteArray header;
+ TQByteArray header;
- QDataStream writer(header, IO_WriteOnly);
- writer.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream writer(header, IO_WriteOnly);
+ writer.setByteOrder(TQDataStream::LittleEndian);
writer << (Q_UINT16)24; // header size
writer << (Q_UINT16)img.width();
writer << (Q_UINT16)img.height();
@@ -875,7 +875,7 @@ void Webcam::timerEvent( QTimerEvent *e )
writer << (Q_UINT32)frame.size();
writer << (Q_UINT8)('M') << (Q_UINT8)('L') << (Q_UINT8)('2') << (Q_UINT8)('0');
writer << (Q_UINT32)0x00000000; //wtf .?
- writer << QTime::currentTime(); //FIXME: possible midnight bug ?
+ writer << TQTime::currentTime(); //FIXME: possible midnight bug ?
m_webcamSocket->writeBlock(header.data(), header.size());
m_webcamSocket->writeBlock(frame.data(), frame.size());
diff --git a/kopete/protocols/msn/webcam.h b/kopete/protocols/msn/webcam.h
index 4dc72fae..4bcc4f59 100644
--- a/kopete/protocols/msn/webcam.h
+++ b/kopete/protocols/msn/webcam.h
@@ -33,7 +33,7 @@ class Webcam : public TransferContext
public:
enum Who { wProducer , wViewer };
- Webcam( Who who , const QString& to, Dispatcher *parent, Q_UINT32 sessionID);
+ Webcam( Who who , const TQString& to, Dispatcher *parent, Q_UINT32 sessionID);
~Webcam( );
virtual void processMessage(const Message& message);
@@ -44,12 +44,12 @@ class Webcam : public TransferContext
void sendBYEMessage();
private:
- void makeSIPMessage(const QString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0);
- void sendBigP2PMessage( const QByteArray& dataMessage );
+ void makeSIPMessage(const TQString &message, Q_UINT8 XX=0, Q_UINT8 YY=9 , Q_UINT8 ZZ=0);
+ void sendBigP2PMessage( const TQByteArray& dataMessage );
void closeAllOtherSockets();
- QString m_content;
+ TQString m_content;
- QString xml(uint session , uint rid);
+ TQString xml(uint session , uint rid);
int getAvailablePort();
@@ -60,14 +60,14 @@ class Webcam : public TransferContext
Who m_who;
- QString m_myAuth;
- QString m_peerAuth;
+ TQString m_myAuth;
+ TQString m_peerAuth;
MimicWrapper *m_mimic;
MSNWebcamDialog *m_widget;
- QValueList<KNetwork::KBufferedSocket* > m_allSockets;
- QMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates;
+ TQValueList<KNetwork::KBufferedSocket* > m_allSockets;
+ TQMap<KNetwork::KBufferedSocket*, WebcamStatus> m_webcamStates;
int m_timerId;
int m_timerFps;
@@ -81,7 +81,7 @@ class Webcam : public TransferContext
void slotSocketConnected();
// void slotReadyWrite();
protected:
- virtual void timerEvent( QTimerEvent * );
+ virtual void timerEvent( TQTimerEvent * );
};
}
diff --git a/kopete/protocols/msn/webcam/mimicwrapper.cpp b/kopete/protocols/msn/webcam/mimicwrapper.cpp
index f7a43d93..a9d3b131 100644
--- a/kopete/protocols/msn/webcam/mimicwrapper.cpp
+++ b/kopete/protocols/msn/webcam/mimicwrapper.cpp
@@ -18,7 +18,7 @@
//#include <qbytearray.h>
#include <kdebug.h>
-#include <qimage.h>
+#include <tqimage.h>
MimicWrapper::MimicWrapper() : m_init(false)
{
@@ -31,35 +31,35 @@ MimicWrapper::~MimicWrapper()
}
-QPixmap MimicWrapper::decode(const QByteArray& data)
+TQPixmap MimicWrapper::decode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_decoder_init(m_mimctx, (guchar*)(data.data())))
{
kdWarning(14140) << k_funcinfo << "Impossible to init decoder" << endl;
- return QPixmap();
+ return TQPixmap();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QPixmap();
+ return TQPixmap();
}
m_init=true;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
if(!mimic_decode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QPixmap();
+ return TQPixmap();
}
int width,height;
mimic_get_property(m_mimctx, "width", &width);
mimic_get_property(m_mimctx, "height", &height);
- QByteArray buff2(m_bufferSize*4/3);
+ TQByteArray buff2(m_bufferSize*4/3);
uint b2=0;
for(uint f=0;f<m_bufferSize;f+=3)
{
@@ -70,34 +70,34 @@ QPixmap MimicWrapper::decode(const QByteArray& data)
b2+=4;
}
- QImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, QImage::BigEndian );
- return QPixmap(img);
+ TQImage img( (uchar*)(buff2.data()) , width , height , 32 , 0L , 0, TQImage::BigEndian );
+ return TQPixmap(img);
}
-QByteArray MimicWrapper::encode(const QByteArray& data)
+TQByteArray MimicWrapper::encode(const TQByteArray& data)
{
if(!m_init)
{
if(!mimic_encoder_init(m_mimctx, MIMIC_RES_HIGH))
{
kdWarning(14140) << k_funcinfo << "Impossible to init encoder" << endl;
- return QByteArray();
+ return TQByteArray();
}
if (!mimic_get_property( m_mimctx, "buffer_size", &m_bufferSize) )
{
kdWarning(14140) << k_funcinfo << "Impossible to get buffer size" << endl;
- return QByteArray();
+ return TQByteArray();
}
m_init=true;
m_numFrames=0;
}
- QByteArray buff(m_bufferSize);
+ TQByteArray buff(m_bufferSize);
int buff_new_size;
if(!mimic_encode_frame(m_mimctx, (guchar*)(data.data()) , (guchar*)(buff.data()) , (gint*)(&buff_new_size) , m_numFrames%15==0 ) )
{
kdWarning(14140) << k_funcinfo << "Impossible to decode frame" << endl;
- return QByteArray();
+ return TQByteArray();
}
buff.resize(buff_new_size);
++m_numFrames;
diff --git a/kopete/protocols/msn/webcam/mimicwrapper.h b/kopete/protocols/msn/webcam/mimicwrapper.h
index c4a7475f..1ed048a2 100644
--- a/kopete/protocols/msn/webcam/mimicwrapper.h
+++ b/kopete/protocols/msn/webcam/mimicwrapper.h
@@ -14,7 +14,7 @@
#ifndef MIMICWRAPPER_H
#define MIMICWREPPER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kopete_export.h"
@@ -26,8 +26,8 @@ class KOPETE_EXPORT MimicWrapper
MimicWrapper();
~MimicWrapper();
- QPixmap decode(const QByteArray &data);
- QByteArray encode(const QByteArray &data);
+ TQPixmap decode(const TQByteArray &data);
+ TQByteArray encode(const TQByteArray &data);
private:
MimCtx *m_mimctx;
diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
index 092135f0..b0540cbb 100644
--- a/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
+++ b/kopete/protocols/msn/webcam/msnwebcamdialog.cpp
@@ -19,31 +19,31 @@
#include "msnwebcamdialog.h"
-#include <qframe.h>
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqobject.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <klocale.h>
-MSNWebcamDialog::MSNWebcamDialog( const QString& contact, QWidget * parent, const char * name )
+MSNWebcamDialog::MSNWebcamDialog( const TQString& contact, TQWidget * parent, const char * name )
: KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contact ),
KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ),
m_imageContainer( this )
{
- setInitialSize( QSize(320,290), true );
+ setInitialSize( TQSize(320,290), true );
setEscapeButton( KDialogBase::Close );
/*
- QObject::connect( contact, SIGNAL( signalReceivedWebcamImage( const QPixmap& ) ),
- this, SLOT( newImage( const QPixmap& ) ) );
+ TQObject::connect( contact, TQT_SIGNAL( signalReceivedWebcamImage( const TQPixmap& ) ),
+ this, TQT_SLOT( newImage( const TQPixmap& ) ) );
*/
- QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) );
+ TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) );
/*
- QObject::connect( contact, SIGNAL( webcamClosed( int ) ), this, SLOT( webcamClosed( int ) ) );
+ TQObject::connect( contact, TQT_SIGNAL( webcamClosed( int ) ), this, TQT_SLOT( webcamClosed( int ) ) );
*/
- QFrame* page = plainPage();
+ TQFrame* page = plainPage();
if ( page )
{
kdDebug(14180) << k_funcinfo << "Adding webcam image container" << endl;
@@ -59,7 +59,7 @@ MSNWebcamDialog::~ MSNWebcamDialog( )
}
-void MSNWebcamDialog::newImage( const QPixmap & image )
+void MSNWebcamDialog::newImage( const TQPixmap & image )
{
kdDebug(14180) << k_funcinfo << "New image received" << endl;
// kdDebug(14180) << image << endl;
@@ -72,7 +72,7 @@ void MSNWebcamDialog::webcamClosed( int reason )
{
kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <<endl;
//m_imageContainer.clear();
- //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( QString::number( reason ) ) );
+ //m_imageContainer.setText( i18n( "Webcam closed with reason %1" ).arg( TQString::number( reason ) ) );
//m_imageContainer.setAlignment( Qt::AlignCenter );
//show();
}
diff --git a/kopete/protocols/msn/webcam/msnwebcamdialog.h b/kopete/protocols/msn/webcam/msnwebcamdialog.h
index dc10285d..a86050c4 100644
--- a/kopete/protocols/msn/webcam/msnwebcamdialog.h
+++ b/kopete/protocols/msn/webcam/msnwebcamdialog.h
@@ -21,7 +21,7 @@
#ifndef YAHOOWEBCAMDIALOG_H_
#define YAHOOWEBCAMDIALOG_H_
-//#include <qlabel.h>
+//#include <tqlabel.h>
#include <webcamwidget.h>
#include <kdialogbase.h>
@@ -36,11 +36,11 @@ class KOPETE_EXPORT MSNWebcamDialog : public KDialogBase
{
Q_OBJECT
public:
- MSNWebcamDialog( const QString& contact, QWidget* parent = 0, const char* name = 0 );
+ MSNWebcamDialog( const TQString& contact, TQWidget* parent = 0, const char* name = 0 );
~MSNWebcamDialog();
public slots:
- void newImage( const QPixmap& image );
+ void newImage( const TQPixmap& image );
void webcamClosed( int );
signals: