[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/oscar/liboscar
From: Roman Jarosz <kedgedev () centrum ! cz>
Date: 2006-10-14 12:43:36
Message-ID: 1160829816.721328.26382.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 595476 by rjarosz:
Use addString( const QByteArray& s ) instead of addString(QByteArray s, DWORD len) \
when we add whole QByteArray.
M +2 -2 buddyicontask.cpp
M +3 -3 chatnavservicetask.cpp
M +1 -1 chatservicetask.cpp
M +3 -12 contact.cpp
M +2 -2 icqtask.cpp
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/buddyicontask.cpp \
#595475:595476 @@ -170,7 +170,7 @@
b->addWord( 0x0001 );
b->addByte( m_hashType );
b->addByte( m_hash.size() ); //MD5 Hash Size
- b->addString( m_hash, m_hash.size() ); //MD5 Hash
+ b->addString( m_hash ); //MD5 Hash
Transfer* t = createTransfer( f, s, b );
send( t );
}
@@ -203,7 +203,7 @@
b->addWord( 0x0001 );
b->addByte( m_hashType );
b->addByte( m_hash.size() ); //MD5 Hash Size
- b->addString( m_hash, m_hash.size() ); //MD5 Hash
+ b->addString( m_hash ); //MD5 Hash
Transfer* t = createTransfer( f, s, b );
send( t );
}
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp \
#595475:595476 @@ -135,15 +135,15 @@
b->addWord( 0x00D3 ); //type of 0x00D3 - name
b->addWord( name.length() );
- b->addString( name.toLatin1(), name.length() );
+ b->addString( name.toLatin1() );
b->addWord( 0x00D6 ); //type of 0x00D6 - charset
b->addWord( charset.length() );
- b->addString( charset.toLatin1(), charset.length() );
+ b->addString( charset.toLatin1() );
b->addWord( 0x00D7 ); //type of 0x00D7 - lang
b->addWord( lang.length() );
- b->addString( lang.toLatin1(), lang.length() );
+ b->addString( lang.toLatin1() );
kDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "sending join room packet" << endl;
Transfer* t = createTransfer( f, s, b );
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/chatservicetask.cpp \
#595475:595476 @@ -91,7 +91,7 @@
tlv5.addTLV( type2 );
tlv5.addTLV( type3 );
- b->addString( tlv5.buffer(), tlv5.length() );
+ b->addString( tlv5.buffer() );
FLAP f = { 0x02, 0, 0 };
SNAC s = { 0x000E, 0x0005, 0x0000, client()->snacSequence() };
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/contact.cpp #595475:595476
@@ -213,17 +213,8 @@
{
Buffer b;
QByteArray name( m_name.toUtf8() );
- 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,
- // 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.
- // This hack will not be needed with Qt 4.
- b.addString( namedata, namelen );
+ b.addWord( name.length() );
+ b.addString( name );
b.addWord( m_gid );
b.addWord( m_bid );
b.addWord( m_type );
@@ -233,7 +224,7 @@
{
b.addWord( (*it).type );
b.addWord( (*it).length );
- b.addString( (*it).data, (*it).data.size() );
+ b.addString( (*it).data );
}
return (QByteArray) b;
--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/icqtask.cpp #595475:595476
@@ -92,14 +92,14 @@
<<" request type: 0x" << QString::number( m_requestType, 16 )
<< " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl; */
if ( buf != 0 )
- tlvData->addString( buf->buffer(), buf->length() );
+ tlvData->addString( buf->buffer() );
Buffer* newBuffer = new Buffer();
//add TLV 1
newBuffer->addWord( 0x0001 ); //TLV 1
newBuffer->addWord( tlvData->length() + 2 ); //TLV length
newBuffer->addLEWord( tlvData->length() ); // data chunk size
- newBuffer->addString( tlvData->buffer(), tlvData->length() );
+ newBuffer->addString( tlvData->buffer() );
delete tlvData;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic