diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/oscar/liboscar/oscarmessage.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-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/oscar/liboscar/oscarmessage.cpp')
-rw-r--r-- | kopete/protocols/oscar/liboscar/oscarmessage.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index f4f512d2..1f263be0 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -19,8 +19,8 @@ #include "oscarmessage.h" -#include <qdeepcopy.h> -#include <qtextcodec.h> +#include <tqdeepcopy.h> +#include <tqtextcodec.h> Oscar::Message::Message() @@ -33,7 +33,7 @@ Oscar::Message::Message() { } -Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -45,7 +45,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText { } -Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -57,7 +57,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, setTextArray( messageText ); } -Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec ) +Oscar::Message::Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -68,50 +68,50 @@ Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, i setText( messageEncoding, messageText, codec ); } -QString Oscar::Message::sender() const +TQString Oscar::Message::sender() const { return m_sender; } -void Oscar::Message::setSender( const QString& sender ) +void Oscar::Message::setSender( const TQString& sender ) { m_sender = sender; } -QString Oscar::Message::receiver() const +TQString Oscar::Message::receiver() const { return m_receiver; } -void Oscar::Message::setReceiver( const QString& receiver ) +void Oscar::Message::setReceiver( const TQString& receiver ) { m_receiver = receiver; } -QByteArray Oscar::Message::textArray() const +TQByteArray Oscar::Message::textArray() const { return m_textArray; } -QString Oscar::Message::text( QTextCodec *codec ) const +TQString Oscar::Message::text( TQTextCodec *codec ) const { switch ( m_encoding ) { case Oscar::Message::UserDefined: return codec->toUnicode( m_textArray ); case Oscar::Message::UTF8: - return QString::fromUtf8( m_textArray.data(), m_textArray.size() ); + return TQString::fromUtf8( m_textArray.data(), m_textArray.size() ); case Oscar::Message::UCS2: { uint len = m_textArray.size() / 2; - QString result; + TQString result; result.setLength( len ); - QByteArray::ConstIterator p = m_textArray.begin(); + TQByteArray::ConstIterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { char row = *p++; char cell = *p++; - result[i] = QChar( cell, row ); + result[i] = TQChar( cell, row ); } //check if last character isn't null if ( result[len-1].isNull() ) @@ -122,22 +122,22 @@ QString Oscar::Message::text( QTextCodec *codec ) const default: break; // Should never happen. } - return QString::null; + return TQString::null; //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } -void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QString& newText, QTextCodec* codec ) +void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const TQString& newText, TQTextCodec* codec ) { uint len; switch ( newEncoding ) { case Oscar::Message::UserDefined: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( codec->fromUnicode( newText ) ); break; case Oscar::Message::UTF8: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( newText.utf8() ); break; @@ -145,7 +145,7 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin { len = newText.length(); m_textArray.resize( len * 2 ); - QByteArray::Iterator p = m_textArray.begin(); + TQByteArray::Iterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { *p++ = newText[i].row(); @@ -159,12 +159,12 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin m_encoding = newEncoding; } -void Oscar::Message::setTextArray( const QByteArray& newTextArray ) +void Oscar::Message::setTextArray( const TQByteArray& newTextArray ) { m_textArray.duplicate( newTextArray ); } -void Oscar::Message::setTextArray( const QCString& newTextArray ) +void Oscar::Message::setTextArray( const TQCString& newTextArray ) { m_textArray.duplicate( newTextArray ); uint len = m_textArray.size(); @@ -212,22 +212,22 @@ void Oscar::Message::setType( int newType ) m_channel = newType; } -QDateTime Oscar::Message::timestamp() const +TQDateTime Oscar::Message::timestamp() const { return m_timestamp; } -void Oscar::Message::setTimestamp( QDateTime ts ) +void Oscar::Message::setTimestamp( TQDateTime ts ) { m_timestamp = ts; } -QByteArray Oscar::Message::icbmCookie() const +TQByteArray Oscar::Message::icbmCookie() const { return m_icbmCookie; } -void Oscar::Message::setIcbmCookie( const QByteArray& cookie ) +void Oscar::Message::setIcbmCookie( const TQByteArray& cookie ) { m_icbmCookie.duplicate( cookie ); } @@ -272,12 +272,12 @@ void Oscar::Message::setExchange( Oscar::WORD exchange ) m_exchange = exchange; } -QString Oscar::Message::chatRoom() const +TQString Oscar::Message::chatRoom() const { return m_chatRoom; } -void Oscar::Message::setChatRoom( const QString& room ) +void Oscar::Message::setChatRoom( const TQString& room ) { m_chatRoom = room; } |