diff options
Diffstat (limited to 'kde-base/kopete/files/kopete-3.5.6-utf8-fix.diff')
-rw-r--r-- | kde-base/kopete/files/kopete-3.5.6-utf8-fix.diff | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/kde-base/kopete/files/kopete-3.5.6-utf8-fix.diff b/kde-base/kopete/files/kopete-3.5.6-utf8-fix.diff new file mode 100644 index 000000000000..07c6cc307ed4 --- /dev/null +++ b/kde-base/kopete/files/kopete-3.5.6-utf8-fix.diff @@ -0,0 +1,44 @@ +--- branches/KDE/3.5/kdenetwork/kopete/libkopete/kopetepassword.cpp 2006/08/17 13:37:13 573903 ++++ branches/KDE/3.5/kdenetwork/kopete/libkopete/kopetepassword.cpp 2007/05/17 06:53:22 665563 +@@ -35,22 +35,7 @@ + #include <kmessagebox.h> + #include <kiconloader.h> + #include <kpassdlg.h> +- +-/** +- * Function for symmetrically (en/de)crypting strings for config file, +- * taken from KMail. +- * +- * @author Stefan Taferner <taferner@alpin.or.at> +- */ +-static QString cryptStr( const QString &aStr ) +-{ +- //Once Kopete depends on 3.2 just remove this function and use KStringHandler::obscure +- QString result; +- for ( uint i = 0; i < aStr.length(); i++ ) +- result += ( aStr[ i ].unicode() < 0x20) ? aStr[ i ] : QChar( 0x1001F - aStr[ i ].unicode() ); +- +- return result; +-} ++#include <kstringhandler.h> + + class Kopete::Password::Private + { +@@ -402,7 +387,7 @@ + if ( passwordCrypted.isNull() ) + d->passwordFromKConfig = QString::null; + else +- d->passwordFromKConfig = cryptStr( passwordCrypted ); ++ d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted ); + + d->remembered = config->readBoolEntry( "RememberPassword", false ); + d->isWrong = config->readBoolEntry( "PasswordIsWrong", false ); +@@ -425,7 +410,7 @@ + config->setGroup( d->configGroup ); + + if ( d->remembered && !d->passwordFromKConfig.isNull() ) +- config->writeEntry( "Password", cryptStr( d->passwordFromKConfig ) ); ++ config->writeEntry( "Password", KStringHandler::obscure( d->passwordFromKConfig ) ); + else + config->deleteEntry( "Password" ); + |