------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=121252
mattr kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From mattr kde org 2006-02-11 01:31 -------
SVN commit 508175 by mattr:
Fix bug 121252 with the patch attached to the bug by Oleg Girko.
This will be in the next prerelease of 0.12
Oleg, thanks for the patch!
BUG: 121252
M +13 -3 oscartypeclasses.cpp
M +1 -1 ssilisttask.cpp
--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp
#508174:508175
@ -179,7 +179,7 @
TLV aliasTLV = findTLV( m_tlvList, 0x0131 );
if ( aliasTLV )
{
- m_alias.insert( 0, aliasTLV.data );
+ m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length );
kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias
<< "' for contact '" << m_name << "'" << endl;
}
@ -253,8 +253,18 @
Oscar::SSI::operator QByteArray() const
{
Buffer b;
- b.addWord( m_name.length() );
- b.addString( m_name.latin1(), m_name.length() ); //TODO check encoding
+ QCString 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,
+ // 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( m_gid );
b.addWord( m_bid );
b.addWord( m_type );
--- branches/kopete/0.12/kopete/protocols/oscar/liboscar/ssilisttask.cpp
#508174:508175
@ -98,7 +98,7 @
{
tlvList.clear();
WORD strlength = buffer->getWord();
- QString itemName = QString( buffer->getBlock( strlength ) );
+ QString itemName = QString::fromUtf8( buffer->getBlock(
strlength ), strlength );
WORD groupId = buffer->getWord();
WORD itemId = buffer->getWord();
WORD itemType = buffer->getWord();
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel