From 5c38d9128823cbfe93e04b6dac60cbf7d3ae208c Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 8 Sep 2010 01:41:56 +0000 Subject: [PATCH] Revert Chakra unicode patch as it both causes a FTBFS and seems to duplicate functionality already present git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1172772 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ark/arch.cpp | 10 ++-------- ark/arkwidget.cpp | 2 +- ark/rar.cpp | 13 +++++-------- ark/zip.cpp | 10 +++------- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/ark/arch.cpp b/ark/arch.cpp index 92e7424..a08484c 100644 --- a/ark/arch.cpp +++ b/ark/arch.cpp @@ -33,7 +33,6 @@ // QT includes #include #include -#include // KDE includes #include @@ -331,20 +330,15 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length ) bool Arch::processLine( const TQCString &line ) { TQString columns[ 11 ]; - TQString unicode_line; unsigned int pos = 0; int strpos, len; - TQTextCodec *codec = TQTextCodec::codecForLocale(); - unicode_line = codec->toUnicode( line ); - - // Go through our columns, try to pick out data, return silently on failure for ( TQPtrListIterator col( m_archCols ); col.current(); ++col ) { ArchColumns *curCol = *col; - strpos = curCol->pattern.search( unicode_line, pos ); + strpos = curCol->pattern.search( line, pos ); len = curCol->pattern.matchedLength(); if ( ( strpos == -1 ) || ( len > curCol->maxLength ) ) @@ -360,7 +354,7 @@ bool Arch::processLine( const TQCString &line ) pos = strpos + len; - columns[curCol->colRef] = TQString::fromLocal8Bit( unicode_line.mid(strpos, len) ); + columns[curCol->colRef] = TQString::fromLocal8Bit( line.mid(strpos, len) ); } diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp index 0814b00..4ced49a 100644 --- a/ark/arkwidget.cpp +++ b/ark/arkwidget.cpp @@ -1533,7 +1533,7 @@ ArkWidget::action_extract() it != selectedFiles.constEnd(); ++it ) { - m_extractList->append( *it ); + m_extractList->append( TQFile::encodeName( *it ) ); } if (!bOvwrt) diff --git a/ark/rar.cpp b/ark/rar.cpp index 5219b08..2fbd91d 100644 --- a/ark/rar.cpp +++ b/ark/rar.cpp @@ -32,7 +32,6 @@ // QT includes #include #include -#include // KDE includes #include @@ -97,7 +96,7 @@ bool RarArch::processLine( const TQCString &line ) if ( m_isFirstLine ) { - m_entryFilename = TQString::fromLocal8Bit( unicode_line ); + m_entryFilename = TQString::fromLocal8Bit( line ); m_entryFilename.remove( 0, 1 ); m_isFirstLine = false; return true; @@ -105,7 +104,7 @@ bool RarArch::processLine( const TQCString &line ) TQStringList list; - TQStringList l2 = TQStringList::split( ' ', unicode_line ); + TQStringList l2 = TQStringList::split( ' ', line ); list << m_entryFilename; // filename list << l2[ 0 ]; // size @@ -259,10 +258,8 @@ void RarArch::unarchFileInternal() { *kp << "-o-"; } - - TQTextCodec *codec = TQTextCodec::codecForLocale(); - *kp << codec->fromUnicode(m_filename); + *kp << m_filename; // if the file list is empty, no filenames go on the command line, // and we then extract everything in the archive. @@ -271,11 +268,11 @@ void RarArch::unarchFileInternal() TQStringList::Iterator it; for ( it = m_fileList->begin(); it != m_fileList->end(); ++it ) { - *kp << codec->fromUnicode(*it); + *kp << (*it); } } - *kp << codec->fromUnicode(m_destDir); + *kp << m_destDir ; connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) ); diff --git a/ark/zip.cpp b/ark/zip.cpp index ef66988..f223016 100644 --- a/ark/zip.cpp +++ b/ark/zip.cpp @@ -28,7 +28,6 @@ // Qt includes #include -#include // KDE includes #include @@ -208,10 +207,8 @@ void ZipArch::unarchFileInternal() *kp << "-o"; else *kp << "-n"; - - TQTextCodec *codec = TQTextCodec::codecForLocale(); - *kp << codec->fromUnicode(m_filename); + *kp << m_filename; // if the list is empty, no filenames go on the command line, // and we then extract everything in the archive. @@ -221,12 +218,11 @@ void ZipArch::unarchFileInternal() for ( it = m_fileList->begin(); it != m_fileList->end(); ++it ) { - *kp << codec->fromUnicode(*it); + *kp << (*it); } } - *kp << "-d"; - *kp << codec->fromUnicode(m_destDir); + *kp << "-d" << m_destDir; connect( kp, TQT_SIGNAL( receivedStdout(KProcess*, char*, int) ), TQT_SLOT( slotReceivedOutput(KProcess*, char*, int) ) );