[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    groupwise_in_anger: kdenetwork/kopete/protocols/groupwise/libgroupwise
From:       Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date:       2004-09-09 15:40:03
Message-ID: 20040909154003.718012322 () office ! kde ! org
[Download RAW message or body]

CVS commit by wstephens: 

Fix bug whereby all strings were getting the trailing NUL terminator included in the \
QString created by QString::fromUtf8().  Qt 3.3.2 and newer remove this \
automatically. From changes-3.2.2.html: QString: Perform sanity check on the length \
parameter to fromUtf8().


  M +2 -2      responseprotocol.cpp   1.1.2.5


--- kdenetwork/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp  \
#1.1.2.4:1.1.2.5 @@ -210,6 +210,6 @@ bool ResponseProtocol::readFields( int f
                                         break;
                                 }
-                                // convert to unicode
-                                QString fieldValue = QString::fromUtf8( \
rawData.data(), val ); +                                // convert to unicode - \
ignore the terminating NUL, because Qt<3.3.2 doesn't sanity check val. +              \
                QString fieldValue = QString::fromUtf8( rawData.data(), val - 1 );
                                 qDebug("- utf/dn single field: %s", \
fieldValue.ascii() );  // create singlefield


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic