diff options
Diffstat (limited to 'kopete/protocols/msn/messageformatter.cpp')
-rw-r--r-- | kopete/protocols/msn/messageformatter.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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; |