- fix unicode arguments

from Vadim Jukov <persgray at gmail dot com> (MAINTAINER)
This commit is contained in:
ajacoutot 2008-02-18 09:48:22 +00:00
parent 78ea77477d
commit 3b6296b4ef
2 changed files with 23 additions and 1 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/02/15 12:33:10 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.2 2008/02/18 09:48:22 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= powerful KDE batch file renamer
DISTNAME= krename-3.0.14
PKGNAME= ${DISTNAME}p0
CATEGORIES= sysutils x11 x11/kde
EXTRACT_SUFX= .tar.bz2

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-krename_encodingplugin_cpp,v 1.1 2008/02/18 09:48:22 ajacoutot Exp $
--- krename/encodingplugin.cpp.orig Fri Dec 8 20:02:37 2006
+++ krename/encodingplugin.cpp Mon Feb 18 10:21:59 2008
@@ -105,14 +105,9 @@ bool EncodingPlugin::checkError()
QString EncodingPlugin::processFile( BatchRenamer*, int, QString token, int )
{
- QString input = token;
- QString unicode = QString::null;
-
- QTextCodec* toUnicode = QTextCodec::codecForName(m_input_codec); // get the codec for KOI8-R
- QTextCodec* fromUnicode = QTextCodec::codecForName(m_output_codec);
-
- unicode = toUnicode->toUnicode( input );
- return fromUnicode->fromUnicode( unicode );
+ QTextCodec* inputCodec = QTextCodec::codecForName(m_input_codec);
+ QTextCodec* outputCodec = QTextCodec::codecForName(m_output_codec);
+ return inputCodec->toUnicode(outputCodec->fromUnicode(token));
}
void EncodingPlugin::finished()