@ -214,7 +214,7 @@ bool QExtFileInfo::createDir(const KURL& path, TQWidget *window)
}
dir3 = dir2 ;
dir3 . adjustPath ( - 1 ) ; //some servers refuse to create directories ending with a slash
result = K IO: : NetAccess : : mkdir ( dir3 , window ) ;
result = TDE IO: : NetAccess : : mkdir ( dir3 , window ) ;
if ( dir2 . path ( ) = = " / " | | ! result )
break ;
i + + ;
@ -259,7 +259,7 @@ bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window)
{
// Andras: Don't use it now, as it brings up an extra dialog and need manual
// intervention when usign fish
// return K IO::NetAccess::exists(a_url, false);
// return TDE IO::NetAccess::exists(a_url, false);
// No dialog when stating.
if ( a_url . isLocalFile ( ) )
@ -297,13 +297,13 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
lstFilters . append ( new TQRegExp ( * it , false , true ) ) ;
bJobOK = true ;
KIO: : ListJob * job = K IO: : listRecursive ( startURL , false , true ) ;
TDEIO: : ListJob * job = TDE IO: : listRecursive ( startURL , false , true ) ;
job - > setWindow ( window ) ;
m_listJobCount = 1 ;
connect ( job , TQT_SIGNAL ( entries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewEntries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( entries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewEntries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( TDE IO: : Job * ) ) ) ;
m_listStartURL = startURL . url ( ) ;
//kdDebug(24000) << "Now listing: " << startURL.url() << endl;
@ -335,13 +335,13 @@ TQDict<KFileItem> QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, c
lstFilters . append ( new TQRegExp ( * it , false , true ) ) ;
bJobOK = true ;
KIO: : ListJob * job = K IO: : listRecursive ( startURL , false , true ) ;
TDEIO: : ListJob * job = TDE IO: : listRecursive ( startURL , false , true ) ;
job - > setWindow ( window ) ;
m_listJobCount = 1 ;
connect ( job , TQT_SIGNAL ( entries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewDetailedEntries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( entries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewDetailedEntries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( TDE IO: : Job * ) ) ) ;
m_listStartURL = startURL . url ( ) ;
//kdDebug(24000) << "Now listing: " << startURL.url() << endl;
enter_loop ( ) ;
@ -385,7 +385,7 @@ KURL::List QExtFileInfo::allLocalFiles(const TQString& startPath, const TQString
}
//Some hackery from K IO::NetAccess as they do not do exactly what we want
//Some hackery from TDE IO::NetAccess as they do not do exactly what we want
/* return true if the url exists*/
bool QExtFileInfo : : internalExists ( const KURL & url , bool readingOnly , TQWidget * window )
{
@ -393,12 +393,12 @@ bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *w
KURL url2 = url ;
url2 . adjustPath ( - 1 ) ;
// kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
KIO: : StatJob * job = K IO: : stat ( url2 , false ) ;
TDEIO: : StatJob * job = TDE IO: : stat ( url2 , false ) ;
job - > setWindow ( window ) ;
job - > setDetails ( 0 ) ;
job - > setSide ( readingOnly ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
//To avoid lock-ups, start a timer.
TQTimer : : singleShot ( 60 * 1000 , this , TQT_SLOT ( slotTimeout ( ) ) ) ;
@ -413,21 +413,21 @@ bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permiss
{
bJobOK = true ; // success unless further error occurs
K IO: : Scheduler : : checkSlaveOnHold ( true ) ;
KIO: : Job * job = K IO: : file_copy ( src , target , permissions , overwrite , resume , false ) ;
// KIO::Job * job2 = K IO::del(target, false );
TDE IO: : Scheduler : : checkSlaveOnHold ( true ) ;
TDEIO: : Job * job = TDE IO: : file_copy ( src , target , permissions , overwrite , resume , false ) ;
// TDEIO::Job * job2 = TDE IO::del(target, false );
//job2->setWindow (window);
//connect( job2, TQT_SIGNAL( result ( K IO::Job *) ),
// this, TQT_SLOT( slotResult ( K IO::Job *) ) );
//connect( job2, TQT_SIGNAL( result ( TDE IO::Job *) ),
// this, TQT_SLOT( slotResult ( TDE IO::Job *) ) );
//enter_loop();
//if (bJobOK)
{
// kdDebug(24000) << "Copying " << src << " to " << target << endl;
// KIO::Job *job = K IO::copy( src, target, false );
// TDEIO::Job *job = TDE IO::copy( src, target, false );
job - > setWindow ( window ) ;
connect ( job , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotResult ( K IO: : Job * ) ) ) ;
connect ( job , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotResult ( TDE IO: : Job * ) ) ) ;
enter_loop ( ) ;
}
return bJobOK ;
@ -448,14 +448,14 @@ void QExtFileInfo::enter_loop()
tqt_leave_modal ( & dummy ) ;
}
void QExtFileInfo : : slotListResult ( K IO: : Job * job )
void QExtFileInfo : : slotListResult ( TDE IO: : Job * job )
{
m_listJobCount - - ;
if ( m_listJobCount = = 0 )
slotResult ( job ) ;
}
void QExtFileInfo : : slotResult ( K IO: : Job * job )
void QExtFileInfo : : slotResult ( TDE IO: : Job * job )
{
//kdDebug(24000)<<"QExtFileInfo::slotResult"<<endl;
bJobOK = ! job - > error ( ) ;
@ -464,21 +464,21 @@ void QExtFileInfo::slotResult(KIO::Job *job)
if ( ! lastErrorMsg )
lastErrorMsg = job - > errorString ( ) ;
}
if ( job - > isA ( " K IO::StatJob" ) )
m_entry = static_cast < K IO: : StatJob * > ( job ) - > statResult ( ) ;
if ( job - > isA ( " TDE IO::StatJob" ) )
m_entry = static_cast < TDE IO: : StatJob * > ( job ) - > statResult ( ) ;
tqApp - > exit_loop ( ) ;
}
void QExtFileInfo : : slotNewEntries ( KIO: : Job * job , const K IO: : UDSEntryList & udsList )
void QExtFileInfo : : slotNewEntries ( TDEIO: : Job * job , const TDE IO: : UDSEntryList & udsList )
{
KURL url = static_cast < K IO: : ListJob * > ( job ) - > url ( ) ;
KURL url = static_cast < TDE IO: : ListJob * > ( job ) - > url ( ) ;
url . adjustPath ( - 1 ) ;
// avoid creating these TQStrings again and again
static const TQString & dot = TDEGlobal : : staticQString ( " . " ) ;
static const TQString & dotdot = TDEGlobal : : staticQString ( " .. " ) ;
K IO: : UDSEntryListConstIterator it = udsList . begin ( ) ;
K IO: : UDSEntryListConstIterator end = udsList . end ( ) ;
TDE IO: : UDSEntryListConstIterator it = udsList . begin ( ) ;
TDE IO: : UDSEntryListConstIterator end = udsList . end ( ) ;
KURL itemURL ;
TQPtrList < KFileItem > linkItems ;
linkItems . setAutoDelete ( true ) ;
@ -487,9 +487,9 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
TQString name ;
// find out about the name
K IO: : UDSEntry : : ConstIterator entit = ( * it ) . begin ( ) ;
TDE IO: : UDSEntry : : ConstIterator entit = ( * it ) . begin ( ) ;
for ( ; entit ! = ( * it ) . end ( ) ; + + entit )
if ( ( * entit ) . m_uds = = K IO: : UDS_NAME )
if ( ( * entit ) . m_uds = = TDE IO: : UDS_NAME )
{
name = ( * entit ) . m_str ;
break ;
@ -533,26 +533,26 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
}
for ( TQPtrList < KFileItem > : : ConstIterator it = linkItems . constBegin ( ) ; it ! = linkItems . constEnd ( ) ; + + it )
{
KIO: : ListJob * ljob = K IO: : listRecursive ( ( * it ) - > url ( ) , false , true ) ;
TDEIO: : ListJob * ljob = TDE IO: : listRecursive ( ( * it ) - > url ( ) , false , true ) ;
m_listJobCount + + ;
//kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
connect ( ljob , TQT_SIGNAL ( entries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewEntries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ) ;
connect ( ljob , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( K IO: : Job * ) ) ) ;
connect ( ljob , TQT_SIGNAL ( entries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewEntries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ) ;
connect ( ljob , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( TDE IO: : Job * ) ) ) ;
}
}
void QExtFileInfo : : slotNewDetailedEntries ( KIO: : Job * job , const K IO: : UDSEntryList & udsList )
void QExtFileInfo : : slotNewDetailedEntries ( TDEIO: : Job * job , const TDE IO: : UDSEntryList & udsList )
{
KURL url = static_cast < K IO: : ListJob * > ( job ) - > url ( ) ;
KURL url = static_cast < TDE IO: : ListJob * > ( job ) - > url ( ) ;
url . adjustPath ( - 1 ) ;
// avoid creating these TQStrings again and again
static const TQString & dot = TDEGlobal : : staticQString ( " . " ) ;
static const TQString & dotdot = TDEGlobal : : staticQString ( " .. " ) ;
K IO: : UDSEntryListConstIterator it = udsList . begin ( ) ;
K IO: : UDSEntryListConstIterator end = udsList . end ( ) ;
TDE IO: : UDSEntryListConstIterator it = udsList . begin ( ) ;
TDE IO: : UDSEntryListConstIterator end = udsList . end ( ) ;
KURL itemURL ;
TQPtrList < KFileItem > linkItems ;
linkItems . setAutoDelete ( true ) ;
@ -561,9 +561,9 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList
TQString name ;
// find out about the name
K IO: : UDSEntry : : ConstIterator entit = ( * it ) . begin ( ) ;
TDE IO: : UDSEntry : : ConstIterator entit = ( * it ) . begin ( ) ;
for ( ; entit ! = ( * it ) . end ( ) ; + + entit )
if ( ( * entit ) . m_uds = = K IO: : UDS_NAME )
if ( ( * entit ) . m_uds = = TDE IO: : UDS_NAME )
{
name = ( * entit ) . m_str ;
break ;
@ -600,13 +600,13 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList
}
for ( TQPtrList < KFileItem > : : ConstIterator it = linkItems . constBegin ( ) ; it ! = linkItems . constEnd ( ) ; + + it )
{
KIO: : ListJob * ljob = K IO: : listRecursive ( ( * it ) - > url ( ) , false , true ) ;
TDEIO: : ListJob * ljob = TDE IO: : listRecursive ( ( * it ) - > url ( ) , false , true ) ;
m_listJobCount + + ;
// kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
connect ( ljob , TQT_SIGNAL ( entries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewDetailedEntries ( KIO: : Job * , const K IO: : UDSEntryList & ) ) ) ;
connect ( ljob , TQT_SIGNAL ( result ( K IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( K IO: : Job * ) ) ) ;
connect ( ljob , TQT_SIGNAL ( entries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ,
this , TQT_SLOT ( slotNewDetailedEntries ( TDEIO: : Job * , const TDE IO: : UDSEntryList & ) ) ) ;
connect ( ljob , TQT_SIGNAL ( result ( TDE IO: : Job * ) ) ,
this , TQT_SLOT ( slotListResult ( TDE IO: : Job * ) ) ) ;
}
}