[KBear-cvs] kbear/kbear/lib/jobclasses translatorjob.cpp,NONE,1.1 translatorjob.h,NONE,1.1 kbearlist
Brought to you by:
kbjorn
|
From: <fri...@us...> - 2003-11-17 21:03:01
|
Update of /cvsroot/kbear/kbear/kbear/lib/jobclasses
In directory sc8-pr-cvs1:/tmp/cvs-serv4968/kbear/lib/jobclasses
Modified Files:
kbearlistjob.cpp kbearlistjob.h
Added Files:
translatorjob.cpp translatorjob.h
Log Message:
Added patch by Yun-Ta Tsai which fixed encoding problems for users of
Asian codecs.
--- NEW FILE: translatorjob.cpp ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: translatorjob.h ---
(This appears to be a binary file; contents omitted.)
Index: kbearlistjob.cpp
===================================================================
RCS file: /cvsroot/kbear/kbear/kbear/lib/jobclasses/kbearlistjob.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** kbearlistjob.cpp 23 Jul 2003 18:27:27 -0000 1.5
--- kbearlistjob.cpp 17 Nov 2003 21:02:37 -0000 1.6
***************
*** 25,28 ****
--- 25,29 ----
//////////////////////////////////////////////////////////////////////
// Application specific include files
+ #include "translatorjob.h"
#include "kbearlistjob.h"
#include "connectionmanager.h"
***************
*** 40,45 ****
// We couldn't set the args when calling the parent constructor,
// so do it now.
QDataStream stream( m_packedArgs, IO_WriteOnly );
! stream << u;
}
--- 41,48 ----
// We couldn't set the args when calling the parent constructor,
// so do it now.
+ m_siteInfo = ConnectionManager::getInstance()->getSiteInfo( ID );
+ kdDebug() << "KBearListJob():: " << m_url.path() << " " << m_subUrl.path() << endl;
QDataStream stream( m_packedArgs, IO_WriteOnly );
! stream << TranslatorJob::fromUnicode(u, m_siteInfo);
}
***************
*** 67,71 ****
break;
case KIO::UDS_NAME:
! filename = (*it2).m_str;
break;
case KIO::UDS_LINK_DEST:
--- 70,74 ----
break;
case KIO::UDS_NAME:
! filename = TranslatorJob::toUnicode((*it2).m_str, m_siteInfo);
break;
case KIO::UDS_LINK_DEST:
***************
*** 80,84 ****
// skip hidden dirs when listing if requested
if (filename != ".." && filename != "." && (includeHidden || filename[0] != '.')) {
! KURL newone = url();
newone.addPath(filename);
KBearListJob *job = new KBearListJob( m_ID, newone, m_progressId!=0, true, prefix + filename + "/",includeHidden);
--- 83,88 ----
// skip hidden dirs when listing if requested
if (filename != ".." && filename != "." && (includeHidden || filename[0] != '.')) {
! kdDebug() << "KBearListJob::slotListEntries() with recursive " << url().path() << endl;
! KURL newone = TranslatorJob::toUnicode(url(), m_siteInfo);
newone.addPath(filename);
KBearListJob *job = new KBearListJob( m_ID, newone, m_progressId!=0, true, prefix + filename + "/",includeHidden);
***************
*** 112,116 ****
for( ; it2 != newone.end(); it2++ ) {
if ((*it2).m_uds == KIO::UDS_NAME) {
! filename = (*it2).m_str;
(*it2).m_str = prefix + filename;
}
--- 116,121 ----
for( ; it2 != newone.end(); it2++ ) {
if ((*it2).m_uds == KIO::UDS_NAME) {
! filename = TranslatorJob::toUnicode((*it2).m_str, m_siteInfo);
! kdDebug() << "KBearListJob::slotListEntries() " << prefix << filename << endl;
(*it2).m_str = prefix + filename;
}
***************
*** 184,187 ****
--- 189,193 ----
KBearListJob* KBearListJob::listDir( int ID, const KURL& url, bool showProgressInfo, bool includeHidden )
{
+ kdDebug() << "KBearListJob::listDir() " << url.path() << endl;
KBearListJob * job = new KBearListJob( ID, url, showProgressInfo,false,QString::null,includeHidden);
return job;
***************
*** 190,193 ****
--- 196,200 ----
KBearListJob* KBearListJob::listRecursive( int ID, const KURL& url, bool showProgressInfo, bool includeHidden )
{
+ kdDebug() << "KBearListJob::listDir() " << url.path() << endl;
KBearListJob * job = new KBearListJob( ID, url, showProgressInfo, true,QString::null,includeHidden);
return job;
Index: kbearlistjob.h
===================================================================
RCS file: /cvsroot/kbear/kbear/kbear/lib/jobclasses/kbearlistjob.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** kbearlistjob.h 23 Jul 2003 18:27:27 -0000 1.3
--- kbearlistjob.h 17 Nov 2003 21:02:37 -0000 1.4
***************
*** 28,32 ****
--- 28,34 ----
//////////////////////////////////////////////////////////////////////
// Application specific include files
+ #include "siteinfo.h"
+ using namespace KBear;
class KBearListJob : public KIO::SimpleJob {
***************
*** 80,83 ****
--- 82,86 ----
KURL m_redirectionURL;
int m_ID;
+ SiteInfo m_siteInfo;
private:
class KBearListJobPrivate* d;
|