[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/libkopete
From: Michel Hermier <michel.hermier () wanadoo ! fr>
Date: 2005-07-27 6:20:18
Message-ID: 1122445218.912525.11423.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 439109 by hermier:
Fix some heuristicContentMatch miss use. BUGS:100148
M +5 -4 kopetemessage.cpp
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetemessage.cpp #439108:439109
@@ -676,6 +676,7 @@
return doc;
}
+// KDE4: Move that to a utils class/namespace
QString Message::decodeString( const QCString &message, const QTextCodec *providedCodec, bool *success )
{
/*
@@ -696,7 +697,7 @@
charsToCheck = 128 > charsToCheck ? charsToCheck : 128;
//They are providing a possible codec. Check if it is valid
- if( providedCodec && providedCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
+ if( providedCodec && providedCodec->heuristicContentMatch( message, charsToCheck ) >= 0 )
{
//All chars decodable.
return providedCodec->toUnicode( message );
@@ -711,7 +712,7 @@
//Try codecForContent - exact match
QTextCodec *testCodec = QTextCodec::codecForContent(message, charsToCheck);
- if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
+ if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 )
{
//All chars decodable.
return testCodec->toUnicode( message );
@@ -725,7 +726,7 @@
//Try local codec
testCodec = QTextCodec::codecForLocale();
- if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
+ if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 )
{
//All chars decodable.
kdDebug(14000) << k_funcinfo << "Using locale's codec" << endl;
@@ -734,7 +735,7 @@
//Try latin1 codec
testCodec = QTextCodec::codecForMib(4);
- if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
+ if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 )
{
//All chars decodable.
kdDebug(14000) << k_funcinfo << "Using latin1" << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic