summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp
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/oscar/liboscar/oscartypeclasses.cpp
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/oscar/liboscar/oscartypeclasses.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/oscartypeclasses.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp
index cd9e9619..be862872 100644
--- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp
+++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp
@@ -17,8 +17,8 @@
*/
#include "oscartypeclasses.h"
-#include <qdeepcopy.h>
-#include <qvaluelist.h>
+#include <tqdeepcopy.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include "oscarutils.h"
#include "buffer.h"
@@ -40,7 +40,7 @@ Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData )
data.duplicate( newData, length );
}
-Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const QByteArray& newData )
+Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData )
{
type = newType;
length = newLength;
@@ -70,7 +70,7 @@ Oscar::SSI::SSI()
m_waitingAuth = false;
}
-Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueList<TLV> &tlvlist, int tlvLength )
+Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV> &tlvlist, int tlvLength )
{
m_name = name;
m_gid = gid;
@@ -79,7 +79,7 @@ Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueLi
m_tlvLength = tlvLength;
//deepcopy the tlvs
- m_tlvList = QDeepCopy< QValueList<TLV> >( tlvlist );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( tlvlist );
if ( m_tlvLength == 0 && !m_tlvList.isEmpty() )
refreshTLVLength();
@@ -98,7 +98,7 @@ Oscar::SSI::SSI( const Oscar::SSI& other )
m_waitingAuth = other.m_waitingAuth;
//deepcopy the tlvs
- m_tlvList = QDeepCopy< QValueList<TLV> >( other.m_tlvList );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( other.m_tlvList );
if ( m_tlvLength == 0 && !m_tlvList.isEmpty() )
refreshTLVLength();
@@ -109,7 +109,7 @@ bool Oscar::SSI::isValid() const
return m_type != 0xFFFF;
}
-QString Oscar::SSI::name() const
+TQString Oscar::SSI::name() const
{
return m_name;
}
@@ -129,7 +129,7 @@ Q_UINT16 Oscar::SSI::type() const
return m_type;
}
-const QValueList<TLV>& Oscar::SSI::tlvList() const
+const TQValueList<TLV>& Oscar::SSI::tlvList() const
{
return m_tlvList;
}
@@ -144,10 +144,10 @@ Q_UINT16 Oscar::SSI::tlvListLength() const
return m_tlvLength;
}
-void Oscar::SSI::setTLVList( QValueList<TLV> list )
+void Oscar::SSI::setTLVList( TQValueList<TLV> list )
{
//deepcopy the tlvs
- m_tlvList = QDeepCopy< QValueList<TLV> >( list );
+ m_tlvList = TQDeepCopy< TQValueList<TLV> >( list );
refreshTLVLength();
checkTLVs();
}
@@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList<TLV> list )
void Oscar::SSI::refreshTLVLength()
{
m_tlvLength = 0;
- QValueList<TLV>::iterator it = m_tlvList.begin();
+ TQValueList<TLV>::iterator it = m_tlvList.begin();
for( ; it != m_tlvList.end(); ++it )
{
m_tlvLength += 4;
@@ -179,7 +179,7 @@ void Oscar::SSI::checkTLVs()
TLV aliasTLV = findTLV( m_tlvList, 0x0131 );
if ( aliasTLV )
{
- m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length );
+ m_alias = TQString::fromUtf8( aliasTLV.data, aliasTLV.length );
kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias << "' for contact '" << m_name << "'" << endl;
}
@@ -192,12 +192,12 @@ void Oscar::SSI::checkTLVs()
kdDebug(14151) << k_funcinfo << "Found 'allow others to see...' options " << infoTLV.data << endl;
}
-QString Oscar::SSI::alias() const
+TQString Oscar::SSI::alias() const
{
return m_alias;
}
-void Oscar::SSI::setAlias( const QString& newAlias )
+void Oscar::SSI::setAlias( const TQString& newAlias )
{
m_alias = newAlias;
}
@@ -212,28 +212,28 @@ void Oscar::SSI::setWaitingAuth( bool waiting )
m_waitingAuth = waiting;
}
-void Oscar::SSI::setIconHash( QByteArray hash )
+void Oscar::SSI::setIconHash( TQByteArray hash )
{
m_hash.duplicate( hash );
}
-QByteArray Oscar::SSI::iconHash( ) const
+TQByteArray Oscar::SSI::iconHash( ) const
{
return m_hash;
}
-QString Oscar::SSI::toString() const
+TQString Oscar::SSI::toString() const
{
- QString ssiString = QString::fromLatin1( "name: " );
+ TQString ssiString = TQString::fromLatin1( "name: " );
ssiString += m_name;
ssiString += " gid: ";
- ssiString += QString::number( m_gid );
+ ssiString += TQString::number( m_gid );
ssiString += " bid: ";
- ssiString += QString::number( m_bid );
+ ssiString += TQString::number( m_bid );
ssiString += " type: ";
- ssiString += QString::number( m_type );
+ ssiString += TQString::number( m_type );
ssiString += " tlv length: ";
- ssiString += QString::number( m_tlvLength );
+ ssiString += TQString::number( m_tlvLength );
return ssiString;
}
@@ -250,26 +250,26 @@ Oscar::SSI::operator bool() const
return isValid();
}
-Oscar::SSI::operator QByteArray() const
+Oscar::SSI::operator TQByteArray() const
{
Buffer b;
- QCString name( m_name.utf8() );
+ TQCString name( m_name.utf8() );
uint namelen = name.length();
const char *namedata = name;
b.addWord( namelen );
// Using namedata instead of name because
- // Buffer::addString(QByteArray, DWORD) ignores it's second argument,
+ // Buffer::addString(TQByteArray, DWORD) ignores it's second argument,
// while Buffer::addString(const char*, DWORD) does not ignore it.
// We must provide the explicit length argument to addString() because
// we don't need trailing null byte to be added when automatic
- // conversion from QCString to QByteArray is performed.
+ // conversion from TQCString to TQByteArray is performed.
// This hack will not be needed with Qt 4.
b.addString( namedata, namelen );
b.addWord( m_gid );
b.addWord( m_bid );
b.addWord( m_type );
b.addWord( m_tlvLength );
- QValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin();
+ TQValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin();
for( ; it != m_tlvList.end(); ++it )
{
b.addWord( (*it).type );
@@ -277,7 +277,7 @@ Oscar::SSI::operator QByteArray() const
b.addString( (*it).data, (*it).data.size() );
}
- return (QByteArray) b;
+ return (TQByteArray) b;
}