Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

feat/lzip-support
Timothy Pearson 12 years ago
parent b8fb4538e9
commit 527c1d6eee

@ -829,7 +829,7 @@
FIXED: the new ftp dialog URLs are saved into a stochastic configuration FIXED: the new ftp dialog URLs are saved into a stochastic configuration
group group
FIXED: [ 960003 ] Swapped letters in quick-search FIXED: [ 960003 ] Swapped letters in quick-search
FIXED: KIO::Slave url redirection handling FIXED: TDEIO::Slave url redirection handling
(e.g. now devices:/ and settings:/ works !) (e.g. now devices:/ and settings:/ works !)
FIXED: [ 962598 ] viewer didn't display XML files FIXED: [ 962598 ] viewer didn't display XML files
FIXED: [ 960595 ] problem with paths containing more '@' characters FIXED: [ 960595 ] problem with paths containing more '@' characters

@ -54,7 +54,7 @@ static const unsigned char zisofs_magic[8] = {
0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07
}; };
using namespace KIO; using namespace TDEIO;
extern "C" { int kdemain(int argc, char **argv); } extern "C" { int kdemain(int argc, char **argv); }
@ -241,7 +241,7 @@ void kio_isoProtocol::listDir( const KURL & url )
kdDebug() << "Checking (stat) on " << _path << endl; kdDebug() << "Checking (stat) on " << _path << endl;
struct stat buff; struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
error( KIO::ERR_DOES_NOT_EXIST, url.path() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return; return;
} }
// It's a real dir -> redirect // It's a real dir -> redirect
@ -278,12 +278,12 @@ void kio_isoProtocol::listDir( const KURL & url )
const KArchiveEntry* e = root->entry( path ); const KArchiveEntry* e = root->entry( path );
if ( !e ) if ( !e )
{ {
error( KIO::ERR_DOES_NOT_EXIST, path ); error( TDEIO::ERR_DOES_NOT_EXIST, path );
return; return;
} }
if ( ! e->isDirectory() ) if ( ! e->isDirectory() )
{ {
error( KIO::ERR_IS_FILE, path ); error( TDEIO::ERR_IS_FILE, path );
return; return;
} }
dir = (KArchiveDirectory*)e; dir = (KArchiveDirectory*)e;
@ -328,17 +328,17 @@ void kio_isoProtocol::stat( const KURL & url )
struct stat buff; struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
kdDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl; kdDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl;
error( KIO::ERR_DOES_NOT_EXIST, url.path() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return; return;
} }
// Real directory. Return just enough information for KRun to work // Real directory. Return just enough information for KRun to work
UDSAtom atom; UDSAtom atom;
atom.m_uds = KIO::UDS_NAME; atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName(); atom.m_str = url.fileName();
entry.append( atom ); entry.append( atom );
kdDebug() << "kio_isoProtocol::stat returning name=" << url.fileName() << endl; kdDebug() << "kio_isoProtocol::stat returning name=" << url.fileName() << endl;
atom.m_uds = KIO::UDS_FILE_TYPE; atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = buff.st_mode & S_IFMT; atom.m_long = buff.st_mode & S_IFMT;
entry.append( atom ); entry.append( atom );
@ -363,7 +363,7 @@ void kio_isoProtocol::stat( const KURL & url )
} }
if ( !isoEntry ) if ( !isoEntry )
{ {
error( KIO::ERR_DOES_NOT_EXIST, path ); error( TDEIO::ERR_DOES_NOT_EXIST, path );
return; return;
} }
createUDSEntry( isoEntry, entry ); createUDSEntry( isoEntry, entry );
@ -412,7 +412,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
pptr = pointer_block.data(); pptr = pointer_block.data();
} else { } else {
error(KIO::ERR_COULD_NOT_READ, path); error(TDEIO::ERR_COULD_NOT_READ, path);
return; return;
} }
} else { } else {
@ -474,7 +474,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
} }
if (pos!=size) { if (pos!=size) {
error(KIO::ERR_COULD_NOT_READ, path); error(TDEIO::ERR_COULD_NOT_READ, path);
return; return;
} }
@ -492,7 +492,7 @@ void kio_isoProtocol::get( const KURL & url )
TQString path; TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) ) if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{ {
error( KIO::ERR_DOES_NOT_EXIST, url.path() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return; return;
} }
@ -501,12 +501,12 @@ void kio_isoProtocol::get( const KURL & url )
if ( !isoEntry ) if ( !isoEntry )
{ {
error( KIO::ERR_DOES_NOT_EXIST, path ); error( TDEIO::ERR_DOES_NOT_EXIST, path );
return; return;
} }
if ( isoEntry->isDirectory() ) if ( isoEntry->isDirectory() )
{ {
error( KIO::ERR_IS_DIRECTORY, path ); error( TDEIO::ERR_IS_DIRECTORY, path );
return; return;
} }

@ -28,7 +28,7 @@
class KIso; class KIso;
class kio_isoProtocol : public KIO::SlaveBase class kio_isoProtocol : public TDEIO::SlaveBase
{ {
public: public:
kio_isoProtocol( const TQCString &pool, const TQCString &app ); kio_isoProtocol( const TQCString &pool, const TQCString &app );
@ -40,7 +40,7 @@ public:
protected: protected:
void getFile( const KIsoFile *isoFileEntry, const TQString &path ); void getFile( const KIsoFile *isoFileEntry, const TQString &path );
void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry ); void createUDSEntry( const KArchiveEntry * isoEntry, TDEIO::UDSEntry & entry );
bool checkNewFile( TQString fullPath, TQString & path, int startsec ); bool checkNewFile( TQString fullPath, TQString & path, int startsec );
KIso * m_isoFile; KIso * m_isoFile;

@ -323,9 +323,9 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
void KIso::readParams() void KIso::readParams()
{ {
KConfig *config; TDEConfig *config;
config = new KConfig("kio_isorc"); config = new TDEConfig("kio_isorc");
showhidden=config->readBoolEntry("showhidden",false); showhidden=config->readBoolEntry("showhidden",false);
showrr=config->readBoolEntry("showrr",true); showrr=config->readBoolEntry("showrr",true);

@ -57,7 +57,7 @@
#define KRDEBUG(X...) #define KRDEBUG(X...)
#endif #endif
using namespace KIO; using namespace TDEIO;
extern "C" { extern "C" {
int kdemain( int argc, char **argv ){ int kdemain( int argc, char **argv ){
@ -80,7 +80,7 @@ kio_krarcProtocol::kio_krarcProtocol(const TQCString &pool_socket, const TQCStri
: SlaveBase("kio_krarc", pool_socket, app_socket), archiveChanged(true), arcFile(0L),extArcReady(false), : SlaveBase("kio_krarc", pool_socket, app_socket), archiveChanged(true), arcFile(0L),extArcReady(false),
password(TQString()) { password(TQString()) {
krConfig = new KConfig( "krusaderrc" ); krConfig = new TDEConfig( "krusaderrc" );
krConfig->setGroup( "Dependencies" ); krConfig->setGroup( "Dependencies" );
dirDict.setAutoDelete(true); dirDict.setAutoDelete(true);
@ -264,14 +264,14 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
} }
UDSEntry* entry = findFileEntry(url); UDSEntry* entry = findFileEntry(url);
if( !entry ){ if( !entry ){
error(KIO::ERR_DOES_NOT_EXIST,url.path()); error(TDEIO::ERR_DOES_NOT_EXIST,url.path());
return; return;
} }
if(KFileItem(*entry,url).isDir()){ if(KFileItem(*entry,url).isDir()){
error(KIO::ERR_IS_DIRECTORY,url.path()); error(TDEIO::ERR_IS_DIRECTORY,url.path());
return; return;
} }
KIO::filesize_t expectedSize = KFileItem(*entry,url).size(); TDEIO::filesize_t expectedSize = KFileItem(*entry,url).size();
// for RPM files extract the cpio file first // for RPM files extract the cpio file first
if( !extArcReady && arcType == "rpm"){ if( !extArcReady && arcType == "rpm"){
KrShellProcess cpio; KrShellProcess cpio;
@ -329,7 +329,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
get( url, tries - 1 ); get( url, tries - 1 );
return; return;
} }
error( KIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() ); error( TDEIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() );
return; return;
} }
} }
@ -342,31 +342,31 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
get( url, tries - 1 ); get( url, tries - 1 );
return; return;
} }
error( KIO::ERR_ACCESS_DENIED, url.path() ); error( TDEIO::ERR_ACCESS_DENIED, url.path() );
return; return;
} }
// the follwing block is ripped from KDE file KIO::Slave // the follwing block is ripped from KDE file TDEIO::Slave
// $Id: krarc.cpp,v 1.43 2007/01/13 13:39:51 ckarai Exp $ // $Id: krarc.cpp,v 1.43 2007/01/13 13:39:51 ckarai Exp $
TQCString _path( TQFile::encodeName(arcTempDir+file) ); TQCString _path( TQFile::encodeName(arcTempDir+file) );
KDE_struct_stat buff; KDE_struct_stat buff;
if( KDE_lstat( _path.data(), &buff ) == -1 ) { if( KDE_lstat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES ) if ( errno == EACCES )
error( KIO::ERR_ACCESS_DENIED, url.path() ); error( TDEIO::ERR_ACCESS_DENIED, url.path() );
else else
error( KIO::ERR_DOES_NOT_EXIST, url.path() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return; return;
} }
if ( S_ISDIR( buff.st_mode ) ) { if ( S_ISDIR( buff.st_mode ) ) {
error( KIO::ERR_IS_DIRECTORY, url.path() ); error( TDEIO::ERR_IS_DIRECTORY, url.path() );
return; return;
} }
if ( !S_ISREG(buff.st_mode) ) { if ( !S_ISREG(buff.st_mode) ) {
error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
return; return;
} }
int fd = KDE_open( _path.data(), O_RDONLY ); int fd = KDE_open( _path.data(), O_RDONLY );
if ( fd < 0 ) { if ( fd < 0 ) {
error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() ); error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
return; return;
} }
// Determine the mimetype of the file to be retrieved, and emit it. // Determine the mimetype of the file to be retrieved, and emit it.
@ -374,12 +374,12 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
KMimeType::Ptr mt = KMimeType::findByURL( arcTempDir+file, buff.st_mode, true /* local URL */ ); KMimeType::Ptr mt = KMimeType::findByURL( arcTempDir+file, buff.st_mode, true /* local URL */ );
emit mimeType( mt->name() ); emit mimeType( mt->name() );
KIO::filesize_t processed_size = 0; TDEIO::filesize_t processed_size = 0;
TQString resumeOffset = metaData("resume"); TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() ){ if ( !resumeOffset.isEmpty() ){
bool ok; bool ok;
KIO::fileoffset_t offset = resumeOffset.toLongLong(&ok); TDEIO::fileoffset_t offset = resumeOffset.toLongLong(&ok);
if (ok && (offset > 0) && (offset < buff.st_size)){ if (ok && (offset > 0) && (offset < buff.st_size)){
if (KDE_lseek(fd, offset, SEEK_SET) == offset){ if (KDE_lseek(fd, offset, SEEK_SET) == offset){
canResume (); canResume ();
@ -397,7 +397,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
if (n == -1){ if (n == -1){
if (errno == EINTR) if (errno == EINTR)
continue; continue;
error( KIO::ERR_COULD_NOT_READ, url.path()); error( TDEIO::ERR_COULD_NOT_READ, url.path());
close(fd); close(fd);
return; return;
} }
@ -444,7 +444,7 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){
} }
if( !findFileEntry(url) ){ if( !findFileEntry(url) ){
if( ( arcType != "arj" && arcType != "lha" ) || isFile ) { if( ( arcType != "arj" && arcType != "lha" ) || isFile ) {
error(KIO::ERR_DOES_NOT_EXIST,url.path()); error(TDEIO::ERR_DOES_NOT_EXIST,url.path());
return; return;
} }
} }
@ -503,7 +503,7 @@ void kio_krarcProtocol::stat( const KURL & url ){
if( entry ){ if( entry ){
statEntry( *entry ); statEntry( *entry );
finished(); finished();
} else error( KIO::ERR_DOES_NOT_EXIST, path ); } else error( TDEIO::ERR_DOES_NOT_EXIST, path );
} }
void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overwrite) { void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overwrite) {
@ -554,11 +554,11 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) ); infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
proc.start(TDEProcess::Block, TDEProcess::AllOutput); proc.start(TDEProcess::Block, TDEProcess::AllOutput);
if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) { if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
error(KIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() ); error(TDEIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() );
return; return;
} }
if( !TQFileInfo( dest.path(-1) ).exists() ) { if( !TQFileInfo( dest.path(-1) ).exists() ) {
error( KIO::ERR_COULD_NOT_WRITE, dest.path(-1) ); error( TDEIO::ERR_COULD_NOT_WRITE, dest.path(-1) );
return; return;
} }
@ -1367,7 +1367,7 @@ bool kio_krarcProtocol::initArcParameters() {
} }
if( KStandardDirs::findExe(cmd).isEmpty() ){ if( KStandardDirs::findExe(cmd).isEmpty() ){
error( KIO::ERR_CANNOT_LAUNCH_PROCESS, error( TDEIO::ERR_CANNOT_LAUNCH_PROCESS,
cmd+ cmd+
i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd)); i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd));
KRDEBUG("Failed to find cmd: " << cmd); KRDEBUG("Failed to find cmd: " << cmd);
@ -1580,7 +1580,7 @@ void kio_krarcProtocol::invalidatePassword() {
if( !encrypted ) if( !encrypted )
return; return;
KIO::AuthInfo authInfo; TDEIO::AuthInfo authInfo;
authInfo.caption= i18n( "Krarc Password Dialog" ); authInfo.caption= i18n( "Krarc Password Dialog" );
authInfo.username= "archive"; authInfo.username= "archive";
authInfo.readOnly = true; authInfo.readOnly = true;
@ -1604,7 +1604,7 @@ TQString kio_krarcProtocol::getPassword() {
if( !encrypted ) if( !encrypted )
return (password = "" ); return (password = "" );
KIO::AuthInfo authInfo; TDEIO::AuthInfo authInfo;
authInfo.caption= i18n( "Krarc Password Dialog" ); authInfo.caption= i18n( "Krarc Password Dialog" );
authInfo.username= "archive"; authInfo.username= "archive";
authInfo.readOnly = true; authInfo.readOnly = true;

@ -32,7 +32,7 @@ class TDEProcess;
class KFileItem; class KFileItem;
class TQCString; class TQCString;
class kio_krarcProtocol : public TQObject, public KIO::SlaveBase { class kio_krarcProtocol : public TQObject, public TDEIO::SlaveBase {
Q_OBJECT Q_OBJECT
public: public:
@ -78,27 +78,27 @@ private:
/** return the name of the directory inside the archive. */ /** return the name of the directory inside the archive. */
TQString findArcDirectory(const KURL& url); TQString findArcDirectory(const KURL& url);
/** find the UDSEntry of a file in a directory. */ /** find the UDSEntry of a file in a directory. */
KIO::UDSEntry* findFileEntry(const KURL& url); TDEIO::UDSEntry* findFileEntry(const KURL& url);
/** add a new directory (file list container). */ /** add a new directory (file list container). */
KIO::UDSEntryList* addNewDir(TQString path); TDEIO::UDSEntryList* addNewDir(TQString path);
TQString fullPathName( TQString name ); TQString fullPathName( TQString name );
TQString convertFileName( TQString name ); TQString convertFileName( TQString name );
static TQString convertName( TQString name ); static TQString convertName( TQString name );
static TQString escape( TQString name ); static TQString escape( TQString name );
TQDict<KIO::UDSEntryList> dirDict; //< the directoris data structure. TQDict<TDEIO::UDSEntryList> dirDict; //< the directoris data structure.
bool encrypted; //< tells whether the archive is encrypted bool encrypted; //< tells whether the archive is encrypted
bool archiveChanged; //< true if the archive was changed. bool archiveChanged; //< true if the archive was changed.
bool archiveChanging; //< true if the archive is currently changing. bool archiveChanging; //< true if the archive is currently changing.
bool newArchiveURL; //< true if new archive was entered for the protocol bool newArchiveURL; //< true if new archive was entered for the protocol
KIO::filesize_t decompressedLen; //< the number of the decompressed bytes TDEIO::filesize_t decompressedLen; //< the number of the decompressed bytes
KFileItem* arcFile; //< the archive file item. KFileItem* arcFile; //< the archive file item.
TQString arcPath; //< the archive location TQString arcPath; //< the archive location
TQString arcTempDir; //< the currently used temp directory. TQString arcTempDir; //< the currently used temp directory.
TQString arcType; //< the archive type. TQString arcType; //< the archive type.
bool extArcReady; //< Used for RPM & DEB files. bool extArcReady; //< Used for RPM & DEB files.
TQString password; //< Password for the archives TQString password; //< Password for the archives
KConfig *krConfig; //< The configuration file for krusader TDEConfig *krConfig; //< The configuration file for krusader
TQString lastData; TQString lastData;
TQString encryptedArchPath; TQString encryptedArchPath;

@ -65,7 +65,7 @@ void KrKeyDialog::slotImportShortcuts() {
if ( filename.isEmpty() ) if ( filename.isEmpty() )
return; return;
KConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ ); TDEConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ );
if ( ! conf.hasGroup("Shortcuts") ) { if ( ! conf.hasGroup("Shortcuts") ) {
int answer = KMessageBox::warningContinueCancel( this, //parent int answer = KMessageBox::warningContinueCancel( this, //parent
i18n("This file does not seem to be a valid keymap.\n" i18n("This file does not seem to be a valid keymap.\n"
@ -136,7 +136,7 @@ void KrKeyDialog::slotExportShortcuts() {
!= KMessageBox::Continue) != KMessageBox::Continue)
return; return;
if ( f.open( IO_WriteOnly ) ) if ( f.open( IO_WriteOnly ) )
// This is the only way to detect if the file is writable since we don't get feetback from KConfig's sync // This is the only way to detect if the file is writable since we don't get feetback from TDEConfig's sync
// Additionaly this prevents merging if the file already contains some shortcuts // Additionaly this prevents merging if the file already contains some shortcuts
f.close(); f.close();
else { else {
@ -144,7 +144,7 @@ void KrKeyDialog::slotExportShortcuts() {
return; return;
} }
KConfig conf( filename, false /*read only*/, false /*no KDEGlobal*/ ); TDEConfig conf( filename, false /*read only*/, false /*no KDEGlobal*/ );
// unfortunately we can't use this function since it only writes the actions which are different from default. // unfortunately we can't use this function since it only writes the actions which are different from default.
//krApp->actionCollection()->writeShortcutSettings( "Shortcuts", &conf ); //krApp->actionCollection()->writeShortcutSettings( "Shortcuts", &conf );

@ -132,7 +132,7 @@ void KRPleaseWaitHandler::killJob(){
_wasCancelled = true; _wasCancelled = true;
} }
void KRPleaseWaitHandler::setJob(KIO::Job* j){ job=j; } void KRPleaseWaitHandler::setJob(TDEIO::Job* j){ job=j; }
void KRPleaseWaitHandler::incProgress(int i){ void KRPleaseWaitHandler::incProgress(int i){
if (incMutex) return; if (incMutex) return;

@ -54,11 +54,11 @@ public slots:
void incProgress(int i); void incProgress(int i);
void incProgress( TDEProcess *, char *buffer, int buflen ); void incProgress( TDEProcess *, char *buffer, int buflen );
void killJob(); void killJob();
void setJob(KIO::Job* j); void setJob(TDEIO::Job* j);
bool wasCancelled() const { return _wasCancelled; } bool wasCancelled() const { return _wasCancelled; }
private: private:
TQGuardedPtr<KIO::Job> job; TQGuardedPtr<TDEIO::Job> job;
KRPleaseWait * dlg; KRPleaseWait * dlg;
bool cycle, cycleMutex, incMutex, _wasCancelled; bool cycle, cycleMutex, incMutex, _wasCancelled;
}; };

@ -36,7 +36,7 @@
#include "krprogress.h" #include "krprogress.h"
#include "../krusader.h" #include "../krusader.h"
KrProgress::KrProgress( KIO::Job* job ) KrProgress::KrProgress( TDEIO::Job* job )
: ProgressBase( krApp ), : ProgressBase( krApp ),
m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0), m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0),
m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0){ m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0){
@ -115,16 +115,16 @@ KrProgress::KrProgress( KIO::Job* job )
setOnlyClean(false); setOnlyClean(false);
setStopOnClose(true); setStopOnClose(true);
// Connect global progress info signals // Connect global progress info signals
connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) );
connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ), connect( job, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString & ) ),
TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) ); TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ), connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ),
TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) ); TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ), connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ),
TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) ); TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ), connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) ); TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) );
// change to modal & move to Krusader's center // change to modal & move to Krusader's center
TQPoint center((krApp->width()-width())/2,(krApp->height()-height())/2); TQPoint center((krApp->width()-width())/2,(krApp->height()-height())/2);
@ -137,18 +137,18 @@ KrProgress::KrProgress( KIO::Job* job )
KrProgress::~KrProgress(){} KrProgress::~KrProgress(){}
void KrProgress::slotTotalSize( KIO::Job*, KIO::filesize_t bytes ){ void KrProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t bytes ){
m_iTotalSize = bytes; m_iTotalSize = bytes;
} }
void KrProgress::slotTotalFiles( KIO::Job*, unsigned long files ){ void KrProgress::slotTotalFiles( TDEIO::Job*, unsigned long files ){
m_iTotalFiles = files; m_iTotalFiles = files;
showTotals(); showTotals();
} }
void KrProgress::slotTotalDirs( KIO::Job*, unsigned long dirs ){ void KrProgress::slotTotalDirs( TDEIO::Job*, unsigned long dirs ){
m_iTotalDirs = dirs; m_iTotalDirs = dirs;
showTotals(); showTotals();
} }
@ -168,8 +168,8 @@ void KrProgress::showTotals(){
} }
} }
void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){ void KrProgress::slotPercent( TDEIO::Job*, unsigned long percent ){
TQString tmp(i18n( "%1% of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize))); TQString tmp(i18n( "%1% of %2 ").arg( percent ).arg( TDEIO::convertSize(m_iTotalSize)));
m_pProgressBar->setValue( percent ); m_pProgressBar->setValue( percent );
tmp.append(i18n(" (Reading)")); tmp.append(i18n(" (Reading)"));
@ -177,23 +177,23 @@ void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){
} }
void KrProgress::slotInfoMessage( KIO::Job*, const TQString & msg ) void KrProgress::slotInfoMessage( TDEIO::Job*, const TQString & msg )
{ {
speedLabel->setText( msg ); speedLabel->setText( msg );
speedLabel->setAlignment( speedLabel->alignment() & ~TQt::WordBreak ); speedLabel->setAlignment( speedLabel->alignment() & ~TQt::WordBreak );
} }
void KrProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) { void KrProgress::slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t bytes ) {
m_iProcessedSize = bytes; m_iProcessedSize = bytes;
TQString tmp; TQString tmp;
tmp = i18n( "%1 of %2 complete").arg( KIO::convertSize(bytes) ).arg( KIO::convertSize(m_iTotalSize)); tmp = i18n( "%1 of %2 complete").arg( TDEIO::convertSize(bytes) ).arg( TDEIO::convertSize(m_iTotalSize));
sizeLabel->setText( tmp ); sizeLabel->setText( tmp );
} }
void KrProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs ) void KrProgress::slotProcessedDirs( TDEIO::Job*, unsigned long dirs )
{ {
m_iProcessedDirs = dirs; m_iProcessedDirs = dirs;
@ -205,7 +205,7 @@ void KrProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs )
} }
void KrProgress::slotProcessedFiles( KIO::Job*, unsigned long files ) void KrProgress::slotProcessedFiles( TDEIO::Job*, unsigned long files )
{ {
m_iProcessedFiles = files; m_iProcessedFiles = files;
@ -219,18 +219,18 @@ void KrProgress::slotProcessedFiles( KIO::Job*, unsigned long files )
} }
void KrProgress::slotSpeed( KIO::Job*, unsigned long bytes_per_second ) void KrProgress::slotSpeed( TDEIO::Job*, unsigned long bytes_per_second )
{ {
if ( bytes_per_second == 0 ) { if ( bytes_per_second == 0 ) {
speedLabel->setText( i18n( "Working") ); speedLabel->setText( i18n( "Working") );
} else { } else {
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
unsigned int seconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second ); unsigned int seconds = TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second );
TQString remaining = KIO::convertSeconds(seconds); TQString remaining = TDEIO::convertSeconds(seconds);
#else #else
TQString remaining = KIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString(); TQString remaining = TDEIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString();
#endif #endif
speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( KIO::convertSize( bytes_per_second )).arg( remaining ) ); speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( TDEIO::convertSize( bytes_per_second )).arg( remaining ) );
} }
} }

@ -32,26 +32,26 @@
#include <tqobject.h> #include <tqobject.h>
class KrProgress : public KIO::ProgressBase { class KrProgress : public TDEIO::ProgressBase {
Q_OBJECT Q_OBJECT
public: public:
KrProgress(KIO::Job* job); KrProgress(TDEIO::Job* job);
virtual ~KrProgress(); virtual ~KrProgress();
public slots: public slots:
virtual void slotTotalSize( KIO::Job*, KIO::filesize_t bytes ); virtual void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t bytes );
virtual void slotTotalFiles( KIO::Job*, unsigned long files ); virtual void slotTotalFiles( TDEIO::Job*, unsigned long files );
virtual void slotTotalDirs( KIO::Job*, unsigned long dirs ); virtual void slotTotalDirs( TDEIO::Job*, unsigned long dirs );
virtual void slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ); virtual void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t bytes );
virtual void slotProcessedFiles( KIO::Job*, unsigned long files ); virtual void slotProcessedFiles( TDEIO::Job*, unsigned long files );
virtual void slotProcessedDirs( KIO::Job*, unsigned long dirs ); virtual void slotProcessedDirs( TDEIO::Job*, unsigned long dirs );
virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second ); virtual void slotSpeed( TDEIO::Job*, unsigned long bytes_per_second );
virtual void slotPercent( KIO::Job*, unsigned long percent ); virtual void slotPercent( TDEIO::Job*, unsigned long percent );
virtual void slotInfoMessage( KIO::Job*, const TQString & msg ); virtual void slotInfoMessage( TDEIO::Job*, const TQString & msg );
virtual void slotStop(); virtual void slotStop();
virtual void closeEvent( TQCloseEvent* ); virtual void closeEvent( TQCloseEvent* );
@ -70,11 +70,11 @@ protected:
KProgress* m_pProgressBar; KProgress* m_pProgressBar;
KIO::filesize_t m_iTotalSize; TDEIO::filesize_t m_iTotalSize;
unsigned long m_iTotalFiles; unsigned long m_iTotalFiles;
unsigned long m_iTotalDirs; unsigned long m_iTotalDirs;
KIO::filesize_t m_iProcessedSize; TDEIO::filesize_t m_iProcessedSize;
unsigned long m_iProcessedDirs; unsigned long m_iProcessedDirs;
unsigned long m_iProcessedFiles; unsigned long m_iProcessedFiles;

@ -65,7 +65,7 @@ TQColor KRPie::colors[ 12 ] = {TQt::red, TQt::blue, TQt::green, TQt::cyan, TQt::
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// This is the full constructor: use it for a mounted filesystem // This is the full constructor: use it for a mounted filesystem
KRFSDisplay::KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName, KRFSDisplay::KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName,
KIO::filesize_t _total, KIO::filesize_t _free ) : TQWidget( parent ), totalSpace( _total ), TDEIO::filesize_t _total, TDEIO::filesize_t _free ) : TQWidget( parent ), totalSpace( _total ),
freeSpace( _free ), alias( _alias ), realName( _realName ), mounted( true ), freeSpace( _free ), alias( _alias ), realName( _realName ), mounted( true ),
empty( false ), supermount( false ) { empty( false ), supermount( false ) {
resize( 150, 200 ); resize( 150, 200 );
@ -100,7 +100,7 @@ void KRFSDisplay::paintEvent( TQPaintEvent * ) {
paint.drawText( 10, 37, "(" + realName + ")" ); paint.drawText( 10, 37, "(" + realName + ")" );
if ( mounted ) { // incase the filesystem is already mounted if ( mounted ) { // incase the filesystem is already mounted
// second, the capacity // second, the capacity
paint.drawText( 10, 70, i18n( "Capacity: " ) + KIO::convertSizeFromKB( totalSpace ) ); paint.drawText( 10, 70, i18n( "Capacity: " ) + TDEIO::convertSizeFromKB( totalSpace ) );
// third, the 2 boxes (used, free) // third, the 2 boxes (used, free)
TQPen systemPen = paint.pen(); TQPen systemPen = paint.pen();
paint.setPen( TQt::black ); paint.setPen( TQt::black );
@ -110,8 +110,8 @@ void KRFSDisplay::paintEvent( TQPaintEvent * ) {
paint.fillRect( 11, 111, 8, 8, TQBrush( TQt::white ) ); paint.fillRect( 11, 111, 8, 8, TQBrush( TQt::white ) );
// now, the text for the boxes // now, the text for the boxes
paint.setPen( systemPen ); paint.setPen( systemPen );
paint.drawText( 25, 100, i18n( "Used: " ) + KIO::convertSizeFromKB( totalSpace - freeSpace ) ); paint.drawText( 25, 100, i18n( "Used: " ) + TDEIO::convertSizeFromKB( totalSpace - freeSpace ) );
paint.drawText( 25, 120, i18n( "Free: " ) + KIO::convertSizeFromKB( freeSpace ) ); paint.drawText( 25, 120, i18n( "Free: " ) + TDEIO::convertSizeFromKB( freeSpace ) );
// first, create the empty pie // first, create the empty pie
// bottom... // bottom...
paint.setPen( TQt::black ); paint.setPen( TQt::black );
@ -146,7 +146,7 @@ void KRFSDisplay::paintEvent( TQPaintEvent * ) {
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
KRPie::KRPie( KIO::filesize_t _totalSize, TQWidget *parent ) : TQWidget( parent, 0 ), totalSize( _totalSize ) { KRPie::KRPie( TDEIO::filesize_t _totalSize, TQWidget *parent ) : TQWidget( parent, 0 ), totalSize( _totalSize ) {
slices.setAutoDelete( true ); // kill items when they are removed slices.setAutoDelete( true ); // kill items when they are removed
slices.append( new KRPieSlice( 100, TQt::yellow, "DEFAULT" ) ); slices.append( new KRPieSlice( 100, TQt::yellow, "DEFAULT" ) );
sizeLeft = totalSize; sizeLeft = totalSize;
@ -193,7 +193,7 @@ void KRPie::paintEvent( TQPaintEvent * ) {
} }
void KRPie::addSlice( KIO::filesize_t size, TQString label ) { void KRPie::addSlice( TDEIO::filesize_t size, TQString label ) {
int i = ( slices.count() % 12 ); int i = ( slices.count() % 12 );
slices.removeLast(); slices.removeLast();
slices.append( new KRPieSlice( size * 100 / totalSize, colors[ i ], label ) ); slices.append( new KRPieSlice( size * 100 / totalSize, colors[ i ], label ) );

@ -46,15 +46,15 @@ class KRPie : public TQWidget {
Q_OBJECT Q_OBJECT
public: public:
KRPie( KIO::filesize_t _totalSize, TQWidget *parent = 0 ); KRPie( TDEIO::filesize_t _totalSize, TQWidget *parent = 0 );
void addSlice( KIO::filesize_t size, TQString label ); void addSlice( TDEIO::filesize_t size, TQString label );
protected: protected:
void paintEvent( TQPaintEvent * ); void paintEvent( TQPaintEvent * );
private: private:
TQList<KRPieSlice> slices; TQList<KRPieSlice> slices;
KIO::filesize_t totalSize, sizeLeft; TDEIO::filesize_t totalSize, sizeLeft;
static TQColor colors[ 12 ]; static TQColor colors[ 12 ];
}; };
@ -64,13 +64,13 @@ class KRFSDisplay : public TQWidget {
public: public:
// this constructor is used for a mounted filesystem // this constructor is used for a mounted filesystem
KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName, KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName,
KIO::filesize_t _total, KIO::filesize_t _free ); TDEIO::filesize_t _total, TDEIO::filesize_t _free );
// this one is for an unmounted/supermount file system // this one is for an unmounted/supermount file system
KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName, bool sm = false ); KRFSDisplay( TQWidget *parent, TQString _alias, TQString _realName, bool sm = false );
// the last one is used inside MountMan(R), when no filesystem is selected // the last one is used inside MountMan(R), when no filesystem is selected
KRFSDisplay( TQWidget *parent ); KRFSDisplay( TQWidget *parent );
inline void setTotalSpace( KIO::filesize_t t ) { totalSpace = t; } inline void setTotalSpace( TDEIO::filesize_t t ) { totalSpace = t; }
inline void setFreeSpace( KIO::filesize_t t ) { freeSpace = t; } inline void setFreeSpace( TDEIO::filesize_t t ) { freeSpace = t; }
inline void setAlias( TQString a ) { alias = a; } inline void setAlias( TQString a ) { alias = a; }
inline void setRealName( TQString r ) { realName = r; } inline void setRealName( TQString r ) { realName = r; }
inline void setMounted( bool m ) { mounted = m; } inline void setMounted( bool m ) { mounted = m; }
@ -81,7 +81,7 @@ class KRFSDisplay : public TQWidget {
void paintEvent( TQPaintEvent * ); void paintEvent( TQPaintEvent * );
private: private:
KIO::filesize_t totalSpace, freeSpace; TDEIO::filesize_t totalSpace, freeSpace;
TQString alias, realName; TQString alias, realName;
bool mounted, empty, supermount; bool mounted, empty, supermount;
}; };

@ -389,7 +389,7 @@ bool PackGUIBase::extraProperties( TQMap<TQString,TQString> & inMap ) {
} }
if( multipleVolume->isEnabled() && multipleVolume->isChecked() ) { if( multipleVolume->isEnabled() && multipleVolume->isChecked() ) {
KIO::filesize_t size = volumeSpinBox->value(); TDEIO::filesize_t size = volumeSpinBox->value();
switch( volumeUnitCombo->currentItem() ) { switch( volumeUnitCombo->currentItem() ) {
case 2: case 2:

@ -40,7 +40,7 @@ void PopularUrls::clearList() {
} }
void PopularUrls::save() { void PopularUrls::save() {
KConfigGroupSaver svr(krConfig, "Private"); TDEConfigGroupSaver svr(krConfig, "Private");
// prepare the string list containing urls and int list with ranks // prepare the string list containing urls and int list with ranks
TQStringList urlList; TQStringList urlList;
TQValueList<int> rankList; TQValueList<int> rankList;
@ -55,7 +55,7 @@ void PopularUrls::save() {
} }
void PopularUrls::load() { void PopularUrls::load() {
KConfigGroupSaver svr(krConfig, "Private"); TDEConfigGroupSaver svr(krConfig, "Private");
TQStringList urlList = krConfig->readListEntry("PopularUrls"); TQStringList urlList = krConfig->readListEntry("PopularUrls");
TQValueList<int> rankList = krConfig->readIntListEntry("PopularUrlsRank"); TQValueList<int> rankList = krConfig->readIntListEntry("PopularUrlsRank");
if (urlList.count() != rankList.count()) { if (urlList.count() != rankList.count()) {

@ -184,7 +184,7 @@ void LoaderWidget::setCurrentURL( KURL url )
searchedDirectory->setText( vfs::pathOrURL( url, 1) ); searchedDirectory->setText( vfs::pathOrURL( url, 1) );
} }
void LoaderWidget::setValues( int fileNum, int dirNum, KIO::filesize_t total ) void LoaderWidget::setValues( int fileNum, int dirNum, TDEIO::filesize_t total )
{ {
files->setText( TQString("%1").arg( fileNum ) ); files->setText( TQString("%1").arg( fileNum ) );
directories->setText( TQString("%1").arg( dirNum ) ); directories->setText( TQString("%1").arg( dirNum ) );
@ -475,7 +475,7 @@ int DiskUsage::calculateSizes( Directory *dirEntry, bool emitSig, int depth )
if( dirEntry == 0 ) if( dirEntry == 0 )
dirEntry = root; dirEntry = root;
KIO::filesize_t own = 0, total = 0; TDEIO::filesize_t own = 0, total = 0;
for( Iterator<File> it = dirEntry->iterator(); it != dirEntry->end(); ++it ) for( Iterator<File> it = dirEntry->iterator(); it != dirEntry->end(); ++it )
{ {
@ -492,7 +492,7 @@ int DiskUsage::calculateSizes( Directory *dirEntry, bool emitSig, int depth )
} }
} }
KIO::filesize_t oldOwn = dirEntry->ownSize(), oldTotal = dirEntry->size(); TDEIO::filesize_t oldOwn = dirEntry->ownSize(), oldTotal = dirEntry->size();
dirEntry->setSizes( total, own ); dirEntry->setSizes( total, own );
if( dirEntry == currentDirectory ) if( dirEntry == currentDirectory )
@ -637,20 +637,20 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
emit deleted( file ); emit deleted( file );
deleteNr++; deleteNr++;
TQGuardedPtr<KIO::Job> job; TQGuardedPtr<TDEIO::Job> job;
if( trash ) if( trash )
{ {
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
job = KIO::trash( url, true ); job = TDEIO::trash( url, true );
#else #else
job = new KIO::CopyJob( url,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true ); job = new TDEIO::CopyJob( url,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
#endif #endif
connect(job,TQT_SIGNAL(result(KIO::Job*)),krApp,TQT_SLOT(changeTrashIcon())); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),krApp,TQT_SLOT(changeTrashIcon()));
} }
else else
{ {
job = new KIO::DeleteJob( vfs::fromPathOrURL( file->fullPath() ), false, false); job = new TDEIO::DeleteJob( vfs::fromPathOrURL( file->fullPath() ), false, false);
} }
deleting = true; // during tqApp->processEvent strange things can occur deleting = true; // during tqApp->processEvent strange things can occur

@ -128,7 +128,7 @@ protected:
TQPtrDict<Properties> propertyMap; TQPtrDict<Properties> propertyMap;
Directory* currentDirectory; Directory* currentDirectory;
KIO::filesize_t currentSize; TDEIO::filesize_t currentSize;
virtual void keyPressEvent( TQKeyEvent * ); virtual void keyPressEvent( TQKeyEvent * );
virtual bool event( TQEvent * ); virtual bool event( TQEvent * );
@ -184,7 +184,7 @@ public:
void init(); void init();
void setCurrentURL( KURL url ); void setCurrentURL( KURL url );
void setValues( int fileNum, int dirNum, KIO::filesize_t total ); void setValues( int fileNum, int dirNum, TDEIO::filesize_t total );
bool wasCancelled() { return cancelled; } bool wasCancelled() { return cancelled; }
public slots: public slots:

@ -300,7 +300,7 @@ void DULines::slotDirChanged( Directory *dirEntry )
unsigned int italicStart = fileName.length(); unsigned int italicStart = fileName.length();
if( showFileSize ) if( showFileSize )
fileName += " [" + KIO::convertSize( item->size() ) + "]"; fileName += " [" + TDEIO::convertSize( item->size() ) + "]";
if( lastItem == 0 ) if( lastItem == 0 )
lastItem = new DULinesItem( diskUsage, item, this, "", item->percent() + " ", fileName, italicStart ); lastItem = new DULinesItem( diskUsage, item, this, "", item->percent() + " ", fileName, italicStart );

@ -13,10 +13,10 @@ uint Config::defaultRingDepth = 4;
Filelight::MapScheme Config::scheme; Filelight::MapScheme Config::scheme;
inline KConfig& inline TDEConfig&
Filelight::Config::kconfig() Filelight::Config::kconfig()
{ {
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
config->setGroup( "DiskUsage" ); config->setGroup( "DiskUsage" );
return *config; return *config;
} }
@ -24,7 +24,7 @@ Filelight::Config::kconfig()
void void
Filelight::Config::read() Filelight::Config::read()
{ {
const KConfig &config = kconfig(); const TDEConfig &config = kconfig();
varyLabelFontSizes = config.readBoolEntry( "varyLabelFontSizes", true ); varyLabelFontSizes = config.readBoolEntry( "varyLabelFontSizes", true );
showSmallFiles = config.readBoolEntry( "showSmallFiles", false ); showSmallFiles = config.readBoolEntry( "showSmallFiles", false );
@ -39,7 +39,7 @@ Filelight::Config::read()
void void
Filelight::Config::write() Filelight::Config::write()
{ {
KConfig &config = kconfig(); TDEConfig &config = kconfig();
config.writeEntry( "varyLabelFontSizes", varyLabelFontSizes ); config.writeEntry( "varyLabelFontSizes", varyLabelFontSizes );
config.writeEntry( "showSmallFiles", showSmallFiles); config.writeEntry( "showSmallFiles", showSmallFiles);

@ -4,7 +4,7 @@
#include <tqstringlist.h> #include <tqstringlist.h>
class KConfig; class TDEConfig;
namespace Filelight namespace Filelight
@ -13,7 +13,7 @@ namespace Filelight
class Config class Config
{ {
static KConfig& kconfig(); static TDEConfig& kconfig();
public: public:
static void read(); static void read();

@ -12,7 +12,7 @@
typedef KIO::filesize_t FileSize; typedef TDEIO::filesize_t FileSize;
template <class T> class Iterator; template <class T> class Iterator;
template <class T> class ConstIterator; template <class T> class ConstIterator;
@ -214,7 +214,7 @@ public:
inline void setPercent( int p ) {m_percent = p;} inline void setPercent( int p ) {m_percent = p;}
inline const Directory* parent() const {return m_parent;} inline const Directory* parent() const {return m_parent;}
inline void setSizes( KIO::filesize_t totalSize, KIO::filesize_t ownSize ) inline void setSizes( TDEIO::filesize_t totalSize, TDEIO::filesize_t ownSize )
{ {
m_ownSize = ownSize; m_ownSize = ownSize;
m_size = totalSize; m_size = totalSize;

@ -11,7 +11,7 @@
template <class T> class Chain; template <class T> class Chain;
class Directory; class Directory;
class File; class File;
namespace KIO { class Job; } namespace TDEIO { class Job; }
class KURL; class KURL;
namespace RadialMap namespace RadialMap
@ -75,7 +75,7 @@ namespace RadialMap
private slots: private slots:
void resizeTimeout(); void resizeTimeout();
void sendFakeMouseEvent(); void sendFakeMouseEvent();
void deleteJobFinished( KIO::Job* ); void deleteJobFinished( TDEIO::Job* );
void createFromCache( const Directory* ); void createFromCache( const Directory* );
signals: signals:

@ -194,9 +194,9 @@ RadialMap::Widget::mousePressEvent( TQMouseEvent *e )
const int userIntention = KMessageBox::warningContinueCancel( this, message, TQString(), KGuiItem( i18n("&Delete"), "editdelete" ) ); const int userIntention = KMessageBox::warningContinueCancel( this, message, TQString(), KGuiItem( i18n("&Delete"), "editdelete" ) );
if( userIntention == KMessageBox::Continue ) { if( userIntention == KMessageBox::Continue ) {
KIO::Job *job = KIO::del( url ); TDEIO::Job *job = TDEIO::del( url );
job->setWindow( this ); job->setWindow( this );
connect( job, TQT_SIGNAL(result( KIO::Job* )), TQT_SLOT(deleteJobFinished( KIO::Job* )) ); connect( job, TQT_SIGNAL(result( TDEIO::Job* )), TQT_SLOT(deleteJobFinished( TDEIO::Job* )) );
TQApplication::setOverrideCursor( KCursor::workingCursor() ); TQApplication::setOverrideCursor( KCursor::workingCursor() );
} }
} }
@ -231,7 +231,7 @@ RadialMap::Widget::mousePressEvent( TQMouseEvent *e )
} }
void void
RadialMap::Widget::deleteJobFinished( KIO::Job *job ) RadialMap::Widget::deleteJobFinished( TDEIO::Job *job )
{ {
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
if( !job->error() ) if( !job->error() )

@ -478,7 +478,7 @@ void AdvancedFilter::invalidDateMessage(TQLineEdit *p)
bool AdvancedFilter::fillQuery( KRQuery *query ) bool AdvancedFilter::fillQuery( KRQuery *query )
{ {
KIO::filesize_t minSize = 0, maxSize = 0; TDEIO::filesize_t minSize = 0, maxSize = 0;
// size calculations //////////////////////////////////////////////// // size calculations ////////////////////////////////////////////////
if ( biggerThanEnabled->isChecked() && if ( biggerThanEnabled->isChecked() &&

@ -82,7 +82,7 @@ KCMDLine::KCMDLine( TQWidget *parent, const char *name ) : TQWidget( parent, nam
cmdLine->setCompletionObject( &completion ); cmdLine->setCompletionObject( &completion );
cmdLine->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); cmdLine->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
// load the history // load the history
KConfigGroupSaver grpSvr( krConfig, "Private" ); TDEConfigGroupSaver grpSvr( krConfig, "Private" );
TQStringList list = krConfig->readListEntry( "cmdline history" ); TQStringList list = krConfig->readListEntry( "cmdline history" );
cmdLine->setHistoryItems( list ); cmdLine->setHistoryItems( list );
@ -142,7 +142,7 @@ void KCMDLine::setCurrent( const TQString &p ) {
} }
KCMDLine::~KCMDLine() { KCMDLine::~KCMDLine() {
KConfigGroupSaver grpSvr( krConfig, "Private" ); TDEConfigGroupSaver grpSvr( krConfig, "Private" );
TQStringList list = cmdLine->historyItems(); TQStringList list = cmdLine->historyItems();
//krOut << list[0] << endl; //krOut << list[0] << endl;
krConfig->writeEntry( "cmdline history", list ); krConfig->writeEntry( "cmdline history", list );
@ -189,7 +189,7 @@ TQString KCMDLine::command() const {
} }
KrActionBase::ExecType KCMDLine::execType() const { KrActionBase::ExecType KCMDLine::execType() const {
KConfigGroup grp( krConfig, "Private" ); TDEConfigGroup grp( krConfig, "Private" );
int i = grp.readNumEntry("Command Execution Mode",0); int i = grp.readNumEntry("Command Execution Mode",0);
return execModesMenu[i]; return execModesMenu[i];
} }

@ -60,7 +60,7 @@ void KrRemoteEncodingMenu::slotAboutToShow()
KURL currentURL = ACTIVE_PANEL->virtualPath(); KURL currentURL = ACTIVE_PANEL->virtualPath();
TQString charset = KIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY); TQString charset = TDEIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY);
if (!charset.isEmpty()) if (!charset.isEmpty())
{ {
int id = 1; int id = 1;
@ -120,7 +120,7 @@ void KrRemoteEncodingMenu::slotItemSelected(int id)
{ {
KURL currentURL = ACTIVE_PANEL->virtualPath(); KURL currentURL = ACTIVE_PANEL->virtualPath();
KConfig config(("kio_" + currentURL.protocol() + "rc").latin1()); TDEConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
TQString host = currentURL.host(); TQString host = currentURL.host();
if (!popupMenu()->isItemChecked(id)) if (!popupMenu()->isItemChecked(id))
@ -147,7 +147,7 @@ void KrRemoteEncodingMenu::slotDefault()
// We have no choice but delete all higher domain level // We have no choice but delete all higher domain level
// settings here since it affects what will be matched. // settings here since it affects what will be matched.
KConfig config(("kio_" + currentURL.protocol() + "rc").latin1()); TDEConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
TQStringList partList = TQStringList::split('.', currentURL.host(), false); TQStringList partList = TQStringList::split('.', currentURL.host(), false);
if (!partList.isEmpty()) if (!partList.isEmpty())
@ -197,7 +197,7 @@ void KrRemoteEncodingMenu::updateKIOSlaves()
TQByteArray data; TQByteArray data;
TQDataStream stream(data, IO_WriteOnly); TQDataStream stream(data, IO_WriteOnly);
stream << TQString(); stream << TQString();
client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(TQString)", data); client->send("*", "TDEIO::Scheduler", "reparseSlaveConfiguration(TQString)", data);
delete client; delete client;
// Reload the page with the new charset // Reload the page with the new charset

@ -129,23 +129,23 @@ void MediaButton::slotAboutToHide() {
} }
void MediaButton::createListWithMedia() { void MediaButton::createListWithMedia() {
KIO::ListJob *job = KIO::listDir( KURL( "media:/" ), false ); TDEIO::ListJob *job = TDEIO::listDir( KURL( "media:/" ), false );
connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); this, TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
this, TQT_SLOT( slotListResult( KIO::Job* ) ) ); this, TQT_SLOT( slotListResult( TDEIO::Job* ) ) );
busy = true; busy = true;
if( !busy ) if( !busy )
tqApp->processEvents(); tqApp->processEvents();
} }
void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries ) void MediaButton::slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& entries )
{ {
KMountPoint::List mountList = KMountPoint::currentMountPoints(); KMountPoint::List mountList = KMountPoint::currentMountPoints();
KIO::UDSEntryListConstIterator it = entries.begin(); TDEIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end(); TDEIO::UDSEntryListConstIterator end = entries.end();
while( it != end ) while( it != end )
{ {
@ -155,23 +155,23 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
TQString localPath; TQString localPath;
bool mounted = false; bool mounted = false;
KIO::UDSEntry::ConstIterator it2 = (*it).begin(); TDEIO::UDSEntry::ConstIterator it2 = (*it).begin();
for( ; it2 != (*it).end(); it2++ ) { for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) { switch ((*it2).m_uds) {
case KIO::UDS_NAME: case TDEIO::UDS_NAME:
text = KURL::decode_string((*it2).m_str); text = KURL::decode_string((*it2).m_str);
break; break;
case KIO::UDS_URL: case TDEIO::UDS_URL:
url = KURL::fromPathOrURL( (*it2).m_str ); url = KURL::fromPathOrURL( (*it2).m_str );
break; break;
case KIO::UDS_MIME_TYPE: case TDEIO::UDS_MIME_TYPE:
mime = (*it2).m_str; mime = (*it2).m_str;
if( !mime.endsWith( "unmounted" ) ) if( !mime.endsWith( "unmounted" ) )
mounted = true; mounted = true;
break; break;
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
case KIO::UDS_LOCAL_PATH: case TDEIO::UDS_LOCAL_PATH:
localPath = (*it2).m_str; localPath = (*it2).m_str;
break; break;
#endif #endif
@ -207,7 +207,7 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
} }
} }
void MediaButton::slotListResult( KIO::Job * ) { void MediaButton::slotListResult( TDEIO::Job * ) {
busy = false; busy = false;
} }
@ -373,9 +373,9 @@ void MediaButton::slotPopupActivated( int elem ) {
void MediaButton::gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) { void MediaButton::gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) {
KURL mediaURL = KURL::fromPathOrURL( mountPoint ); KURL mediaURL = KURL::fromPathOrURL( mountPoint );
KIO::filesize_t size = kBSize; TDEIO::filesize_t size = kBSize;
size *= 1024; size *= 1024;
TQString sizeText = KIO::convertSize( size ); TQString sizeText = TDEIO::convertSize( size );
for( unsigned i=0; i != urls.size(); i++ ) { for( unsigned i=0; i != urls.size(); i++ ) {
if( mediaURL.equals( urls[ i ], true ) ) { if( mediaURL.equals( urls[ i ], true ) ) {

@ -62,8 +62,8 @@ public slots:
void slotPopupActivated( int ); void slotPopupActivated( int );
void gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); void gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail);
void openPopup(); void openPopup();
void slotEntries( KIO::Job*, const KIO::UDSEntryList& ); void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& );
void slotListResult( KIO::Job* ); void slotListResult( TDEIO::Job* );
signals: signals:
void openUrl(const KURL&); void openUrl(const KURL&);

@ -115,7 +115,7 @@ void DiskUsageViewer::slotUpdateStatus( TQString status )
if( status.isEmpty() ) { if( status.isEmpty() ) {
Directory * dir = diskUsage->getCurrentDir(); Directory * dir = diskUsage->getCurrentDir();
if( dir ) if( dir )
status = prefix + dir->name() + " [" + KIO::convertSize( dir->size() ) + "]"; status = prefix + dir->name() + " [" + TDEIO::convertSize( dir->size() ) + "]";
} }
statusLabel->setText( status ); statusLabel->setText( status );
} }

@ -43,7 +43,7 @@ m_job( 0L ) {
timer = new TQTimer( this ); timer = new TQTimer( this );
connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( showPreview() ) ); connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( showPreview() ) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() ); setSupportedMimeTypes( TDEIO::PreviewJob::supportedMimeTypes() );
} }
KrusaderImageFilePreview::~KrusaderImageFilePreview() { KrusaderImageFilePreview::~KrusaderImageFilePreview() {
@ -76,8 +76,8 @@ void KrusaderImageFilePreview::showPreview( const KURL &url, bool force ) {
int h = imageLabel->contentsRect().height() - 4; int h = imageLabel->contentsRect().height() - 4;
m_job = createJob( url, w, h ); m_job = createJob( url, w, h );
connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ), connect( m_job, TQT_SIGNAL( result( TDEIO::Job * ) ),
this, TQT_SLOT( slotResult( KIO::Job * ) ) ); this, TQT_SLOT( slotResult( TDEIO::Job * ) ) );
connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*, connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*,
const TQPixmap& ) ), const TQPixmap& ) ),
TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ) ); TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ) );
@ -95,10 +95,10 @@ TQSize KrusaderImageFilePreview::sizeHint() const {
return TQSize( 20, 200 ); // otherwise it ends up huge??? return TQSize( 20, 200 ); // otherwise it ends up huge???
} }
KIO::PreviewJob * KrusaderImageFilePreview::createJob( const KURL& url, int w, int h ) { TDEIO::PreviewJob * KrusaderImageFilePreview::createJob( const KURL& url, int w, int h ) {
KURL::List urls; KURL::List urls;
urls.append( url ); urls.append( url );
return KIO::filePreview( urls, w, h, 0, 0, true, false ); return TDEIO::filePreview( urls, w, h, 0, 0, true, false );
} }
void KrusaderImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm ) { void KrusaderImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm ) {
@ -114,7 +114,7 @@ void KrusaderImageFilePreview::slotFailed( const KFileItem* item ) {
KIcon::DisabledState ) ); KIcon::DisabledState ) );
} }
void KrusaderImageFilePreview::slotResult( KIO::Job *job ) { void KrusaderImageFilePreview::slotResult( TDEIO::Job *job ) {
if ( job == m_job ) if ( job == m_job )
m_job = 0L; m_job = 0L;
} }

@ -48,11 +48,11 @@ class KrusaderImageFilePreview : public KPreviewWidgetBase {
protected: protected:
virtual void resizeEvent( TQResizeEvent *e ); virtual void resizeEvent( TQResizeEvent *e );
virtual KIO::PreviewJob * createJob( const KURL& url, virtual TDEIO::PreviewJob * createJob( const KURL& url,
int w, int h ); int w, int h );
private slots: private slots:
void slotResult( KIO::Job * ); void slotResult( TDEIO::Job * );
virtual void slotFailed( const KFileItem* ); virtual void slotFailed( const KFileItem* );
private: private:
@ -60,7 +60,7 @@ class KrusaderImageFilePreview : public KPreviewWidgetBase {
TQTimer *timer; TQTimer *timer;
TQLabel *imageLabel; TQLabel *imageLabel;
TQLabel *infoLabel; TQLabel *infoLabel;
KIO::PreviewJob *m_job; TDEIO::PreviewJob *m_job;
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:

@ -645,7 +645,7 @@ void KrViewer::viewHex() {
TQString file; TQString file;
// files that are not local must first be downloaded // files that are not local must first be downloaded
if ( !url.isLocalFile() ) { if ( !url.isLocalFile() ) {
if ( !KIO::NetAccess::download( url, file ) ) { if ( !TDEIO::NetAccess::download( url, file ) ) {
KMessageBox::sorry( this, i18n( "KrViewer is unable to download: " ) + url.url() ); KMessageBox::sorry( this, i18n( "KrViewer is unable to download: " ) + url.url() );
return ; return ;
} }
@ -659,8 +659,8 @@ void KrViewer::viewHex() {
FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" ); FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" );
KIO::filesize_t fileSize = f_in.size(); TDEIO::filesize_t fileSize = f_in.size();
KIO::filesize_t address = 0; TDEIO::filesize_t address = 0;
char buf[ 16 ]; char buf[ 16 ];
unsigned int* pBuff = ( unsigned int* ) buf; unsigned int* pBuff = ( unsigned int* ) buf;
@ -687,7 +687,7 @@ void KrViewer::viewHex() {
f_in.close(); f_in.close();
fclose( out ); fclose( out );
if ( !url.isLocalFile() ) if ( !url.isLocalFile() )
KIO::NetAccess::removeTempFile( file ); TDEIO::NetAccess::removeTempFile( file );
hex_part = static_cast<KParts::ReadOnlyPart*>( getPart( tmpFile.name(), "text/plain", true ) ); hex_part = static_cast<KParts::ReadOnlyPart*>( getPart( tmpFile.name(), "text/plain", true ) );
if ( !hex_part ) return ; if ( !hex_part ) return ;

@ -147,7 +147,7 @@ void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
TQString file; TQString file;
// files that are not local must first be downloaded // files that are not local must first be downloaded
if ( !curl.isLocalFile() ) { if ( !curl.isLocalFile() ) {
if ( !KIO::NetAccess::download( curl, file,this ) ) { if ( !TDEIO::NetAccess::download( curl, file,this ) ) {
KMessageBox::sorry( this, i18n( "KrViewer is unable to download: " ) + curl.url() ); KMessageBox::sorry( this, i18n( "KrViewer is unable to download: " ) + curl.url() );
return ; return ;
} }
@ -161,8 +161,8 @@ void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" ); FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" );
KIO::filesize_t fileSize = f_in.size(); TDEIO::filesize_t fileSize = f_in.size();
KIO::filesize_t address = 0; TDEIO::filesize_t address = 0;
char buf[ 16 ]; char buf[ 16 ];
unsigned int* pBuff = ( unsigned int* ) buf; unsigned int* pBuff = ( unsigned int* ) buf;
@ -189,7 +189,7 @@ void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
f_in.close(); f_in.close();
fclose( out ); fclose( out );
if ( !curl.isLocalFile() ) if ( !curl.isLocalFile() )
KIO::NetAccess::removeTempFile( file ); TDEIO::NetAccess::removeTempFile( file );
curl = tmpFile.name(); curl = tmpFile.name();
} }
@ -230,8 +230,8 @@ KParts::ReadOnlyPart* PanelEditor::openURL( const KURL &url, KrViewer::Mode mode
} }
bool create = true; bool create = true;
KIO::StatJob* statJob = KIO::stat( url, false ); TDEIO::StatJob* statJob = TDEIO::stat( url, false );
connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) ); connect( statJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
busy = true; busy = true;
while ( busy ) tqApp->processEvents(); while ( busy ) tqApp->processEvents();
if( !entry.isEmpty() ) { if( !entry.isEmpty() ) {
@ -294,9 +294,9 @@ KParts::ReadWritePart* PanelEditor::getPart( TQString mimetype ) {
return part; return part;
} }
void PanelEditor::slotStatResult( KIO::Job* job ) { void PanelEditor::slotStatResult( TDEIO::Job* job ) {
if( !job || job->error() ) entry = KIO::UDSEntry(); if( !job || job->error() ) entry = TDEIO::UDSEntry();
else entry = static_cast<KIO::StatJob*>(job)->statResult(); else entry = static_cast<TDEIO::StatJob*>(job)->statResult();
busy = false; busy = false;
} }

@ -75,7 +75,7 @@ public slots:
KParts::ReadOnlyPart* openURL( const KURL &url, KrViewer::Mode mode=KrViewer::Generic ); KParts::ReadOnlyPart* openURL( const KURL &url, KrViewer::Mode mode=KrViewer::Generic );
bool closeURL(); bool closeURL();
bool queryClose(); bool queryClose();
void slotStatResult( KIO::Job* job ); void slotStatResult( TDEIO::Job* job );
public: public:
PanelEditor( TQWidget *parent = 0 ); PanelEditor( TQWidget *parent = 0 );
@ -85,7 +85,7 @@ protected:
KParts::ReadWritePart* getPart( TQString mimetype ); KParts::ReadWritePart* getPart( TQString mimetype );
bool busy; bool busy;
KIO::UDSEntry entry; TDEIO::UDSEntry entry;
}; };
#endif #endif

@ -123,8 +123,8 @@ public:
* KonfiguratorCheckBox *myCheckBox = createCheckBox( "class", "name", false, parentWidget );<br> * KonfiguratorCheckBox *myCheckBox = createCheckBox( "class", "name", false, parentWidget );<br>
* myLayout->addWidget( myCheckBox, 0, 0 ); * myLayout->addWidget( myCheckBox, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the checkbox * @param dflt The default value of the checkbox
* @param text The text field of the checkbox * @param text The text field of the checkbox
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
@ -146,8 +146,8 @@ public:
* KonfiguratorSpinBox *mySpinBox = createSpinBox( "class", "name", 10, 1, 100, parentWidget );<br> * KonfiguratorSpinBox *mySpinBox = createSpinBox( "class", "name", 10, 1, 100, parentWidget );<br>
* myLayout->addWidget( mySpinBox, 0, 0 ); * myLayout->addWidget( mySpinBox, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the spinbox * @param dflt The default value of the spinbox
* @param min The minimum value of the spinbox * @param min The minimum value of the spinbox
* @param max The maximum value of the spinbox * @param max The maximum value of the spinbox
@ -168,8 +168,8 @@ public:
* KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br> * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br>
* myLayout->addWidget( myEditBox, 0, 0 ); * myLayout->addWidget( myEditBox, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar") * @param name The itemname used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the editbox * @param dflt The default value of the editbox
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
* @param rst The change of this parameter requires Krusader restart * @param rst The change of this parameter requires Krusader restart
@ -190,8 +190,8 @@ public:
* KonfiguratorListBox *myListBox = createListBox( "class", "name", valueList, parentWidget );<br> * KonfiguratorListBox *myListBox = createListBox( "class", "name", valueList, parentWidget );<br>
* myLayout->addWidget( myListBox, 0, 0 ); * myLayout->addWidget( myListBox, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar") * @param name The itemname used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the listbox * @param dflt The default value of the listbox
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
* @param rst The change of this parameter requires Krusader restart * @param rst The change of this parameter requires Krusader restart
@ -210,8 +210,8 @@ public:
* KonfiguratorURLRequester *myURLRequester = createURLRequester( "class", "name", "default", parentWidget );<br> * KonfiguratorURLRequester *myURLRequester = createURLRequester( "class", "name", "default", parentWidget );<br>
* myLayout->addWidget( myURLRequester, 0, 0 ); * myLayout->addWidget( myURLRequester, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar") * @param name The itemname used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the URL requester * @param dflt The default value of the URL requester
* @param text The text field of the URL requester * @param text The text field of the URL requester
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
@ -231,8 +231,8 @@ public:
* KonfiguratorFontChooser *myFontChooser = createFontChooser( "class", "name", new TQFont(), parentWidget );<br> * KonfiguratorFontChooser *myFontChooser = createFontChooser( "class", "name", new TQFont(), parentWidget );<br>
* myLayout->addWidget( myFontChooser, 0, 0 ); * myLayout->addWidget( myFontChooser, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the font chooser * @param dflt The default value of the font chooser
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
* @param rst The change of this parameter requires Krusader restart * @param rst The change of this parameter requires Krusader restart
@ -255,8 +255,8 @@ public:
* KonfiguratorComboBox *myComboBox = createComboBox( "class", "name", "value2", comboInfo, 3, parentWidget );<br> * KonfiguratorComboBox *myComboBox = createComboBox( "class", "name", "value2", comboInfo, 3, parentWidget );<br>
* myLayout->addWidget( myComboBox, 0, 0 ); * myLayout->addWidget( myComboBox, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the combobox * @param dflt The default value of the combobox
* @param params Pointer to the name-value pair array (combo elements) * @param params Pointer to the name-value pair array (combo elements)
* @param paramNum Number of the combobox elements * @param paramNum Number of the combobox elements
@ -407,8 +407,8 @@ public:
* myRadioGroup->find( i18n( "radio text1" ) )->setEnabled( false );<br> * myRadioGroup->find( i18n( "radio text1" ) )->setEnabled( false );<br>
* myLayout->addWidget( myRadioGroup, 0, 0 );<br> * myLayout->addWidget( myRadioGroup, 0, 0 );<br>
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the radio buttons * @param dflt The default value of the radio buttons
* @param sizex the maximum column number at horizontal placing * @param sizex the maximum column number at horizontal placing
* @param sizey the maximum row number at vertical placing * @param sizey the maximum row number at vertical placing
@ -460,8 +460,8 @@ public:
* KonfiguratorColorChooser *myColorChooser = createColorChooser( "class", "name", TQColor( 255, 0, 255 ), parentWidget );<br> * KonfiguratorColorChooser *myColorChooser = createColorChooser( "class", "name", TQColor( 255, 0, 255 ), parentWidget );<br>
* myLayout->addWidget( myColorChooser, 0, 0 ); * myLayout->addWidget( myColorChooser, 0, 0 );
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in TDEConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar") * @param name The item name used in TDEConfig (ex. "Do Tar")
* @param dflt The default value of the color chooser * @param dflt The default value of the color chooser
* @param parent Reference to the parent widget * @param parent Reference to the parent widget
* @param rst The change of this parameter requires Krusader restart * @param rst The change of this parameter requires Krusader restart
@ -495,11 +495,11 @@ private:
struct KONFIGURATOR_CHECKBOX_PARAM struct KONFIGURATOR_CHECKBOX_PARAM
{ {
/** /**
* The class used in KConfig (ex. "Archives") * The class used in TDEConfig (ex. "Archives")
*/ */
TQString configClass; TQString configClass;
/** /**
* The item name used in KConfig (ex. "Do Tar") * The item name used in TDEConfig (ex. "Do Tar")
*/ */
TQString configName; TQString configName;
/** /**

@ -598,7 +598,7 @@ void LocateDlg::feedToListBox()
} }
KURL url = KURL::fromPathOrURL(TQString("virt:/")+ queryName); KURL url = KURL::fromPathOrURL(TQString("virt:/")+ queryName);
v.vfs_refresh( url ); v.vfs_refresh( url );
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 ); v.vfs_addFiles( &urlList, TDEIO::CopyJob::Copy, 0 );
//ACTIVE_FUNC->openUrl(url); //ACTIVE_FUNC->openUrl(url);
ACTIVE_MNG->slotNewTab(url.prettyURL()); ACTIVE_MNG->slotNewTab(url.prettyURL());
accept(); accept();

@ -162,7 +162,7 @@ void KDiskFreeSp::dfDone()
KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path ) KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{ {
KDiskFreeSp * job = new KDiskFreeSp; KDiskFreeSp * job = new KDiskFreeSp;
TQString mountPoint = KIO::findPathMountPoint( path ); TQString mountPoint = TDEIO::findPathMountPoint( path );
job->readDF( mountPoint ); job->readDF( mountPoint );
return job; return job;
} }

@ -76,7 +76,7 @@ KMountMan::KMountMan() : TQObject(), Operational( false ), waiting(false), mount
// list of FS that we don't allow to mount/unmount // list of FS that we don't allow to mount/unmount
nonmount_fs << "supermount"; nonmount_fs << "supermount";
{ {
KConfigGroupSaver saver(krConfig, "Advanced"); TDEConfigGroupSaver saver(krConfig, "Advanced");
TQStringList nonmount = TQStringList::split(",", krConfig->readEntry("Nonmount Points", _NonMountPoints)); TQStringList nonmount = TQStringList::split(",", krConfig->readEntry("Nonmount Points", _NonMountPoints));
nonmount_fs_mntpoint += nonmount; nonmount_fs_mntpoint += nonmount;
// simplify the white space // simplify the white space
@ -115,7 +115,7 @@ KMountPoint *KMountMan::findInListByMntPoint(KMountPoint::List &lst, TQString va
return 0; return 0;
} }
void KMountMan::jobResult(KIO::Job *job) { void KMountMan::jobResult(TDEIO::Job *job) {
waiting = false; waiting = false;
if ( job->error() ) if ( job->error() )
job->showErrorDialog( 0 ); job->showErrorDialog( 0 );
@ -127,9 +127,9 @@ void KMountMan::mount( TQString mntPoint, bool blocking ) {
if (!m) return; if (!m) return;
if (blocking) if (blocking)
waiting = true; // prepare to block waiting = true; // prepare to block
KIO::SimpleJob *job = KIO::mount(false, m->mountType().local8Bit(), m->mountedFrom(), m->mountPoint(), false); TDEIO::SimpleJob *job = TDEIO::mount(false, m->mountType().local8Bit(), m->mountedFrom(), m->mountPoint(), false);
new KrProgress(job); new KrProgress(job);
connect(job, TQT_SIGNAL(result(KIO::Job* )), this, TQT_SLOT(jobResult(KIO::Job* ))); connect(job, TQT_SIGNAL(result(TDEIO::Job* )), this, TQT_SLOT(jobResult(TDEIO::Job* )));
while (blocking && waiting) { while (blocking && waiting) {
tqApp->processEvents(); tqApp->processEvents();
usleep( 1000 ); usleep( 1000 );
@ -139,9 +139,9 @@ void KMountMan::mount( TQString mntPoint, bool blocking ) {
void KMountMan::unmount( TQString mntPoint, bool blocking ) { void KMountMan::unmount( TQString mntPoint, bool blocking ) {
if (blocking) if (blocking)
waiting = true; // prepare to block waiting = true; // prepare to block
KIO::SimpleJob *job = KIO::unmount(mntPoint, false); TDEIO::SimpleJob *job = TDEIO::unmount(mntPoint, false);
new KrProgress(job); new KrProgress(job);
connect(job, TQT_SIGNAL(result(KIO::Job* )), this, TQT_SLOT(jobResult(KIO::Job* ))); connect(job, TQT_SIGNAL(result(TDEIO::Job* )), this, TQT_SLOT(jobResult(TDEIO::Job* )));
while (blocking && waiting) { while (blocking && waiting) {
tqApp->processEvents(); tqApp->processEvents();
usleep( 1000 ); usleep( 1000 );
@ -210,10 +210,10 @@ bool KMountMan::ejectable( TQString path ) {
} }
// a mountMan special version of KIO::convertSize, which deals // a mountMan special version of TDEIO::convertSize, which deals
// with large filesystems ==> >4GB, it actually recieve size in // with large filesystems ==> >4GB, it actually recieve size in
// a minimum block of 1024 ==> data is KB not bytes // a minimum block of 1024 ==> data is KB not bytes
TQString KMountMan::convertSize( KIO::filesize_t size ) { TQString KMountMan::convertSize( TDEIO::filesize_t size ) {
float fsize; float fsize;
TQString s; TQString s;
// Tera-byte // Tera-byte

@ -66,7 +66,7 @@ public:
void autoMount( TQString path ); // just call it before refreshing into a dir void autoMount( TQString path ); // just call it before refreshing into a dir
static void eject( TQString mntPoint ); static void eject( TQString mntPoint );
bool ejectable( TQString path ); bool ejectable( TQString path );
TQString convertSize( KIO::filesize_t size ); TQString convertSize( TDEIO::filesize_t size );
bool invalidFilesystem(TQString type); bool invalidFilesystem(TQString type);
bool nonmountFilesystem(TQString type, TQString mntPoint); bool nonmountFilesystem(TQString type, TQString mntPoint);
@ -79,7 +79,7 @@ public slots:
void quickList(); void quickList();
protected slots: protected slots:
void jobResult(KIO::Job *job); void jobResult(TDEIO::Job *job);
protected: protected:
// used internally // used internally

@ -201,8 +201,8 @@ void KMountManGUI::gettingSpaceData( const TQString &mountPoint, unsigned long k
void KMountManGUI::addItemToMountList( TQListView *lst, fsData &fs ) { void KMountManGUI::addItemToMountList( TQListView *lst, fsData &fs ) {
bool mtd = fs.mounted(); bool mtd = fs.mounted();
TQString tSize = TQString( "%1" ).arg( KIO::convertSizeFromKB( fs.totalBlks() ) ); TQString tSize = TQString( "%1" ).arg( TDEIO::convertSizeFromKB( fs.totalBlks() ) );
TQString fSize = TQString( "%1" ).arg( KIO::convertSizeFromKB( fs.freeBlks() ) ); TQString fSize = TQString( "%1" ).arg( TDEIO::convertSizeFromKB( fs.freeBlks() ) );
TQString sPrct = TQString( "%1%" ).arg( 100 - ( fs.usedPerct() ) ); TQString sPrct = TQString( "%1%" ).arg( 100 - ( fs.usedPerct() ) );
TQListViewItem *item = new TQListViewItem( lst, fs.name(), TQListViewItem *item = new TQListViewItem( lst, fs.name(),
fs.type(), fs.mntPoint(), fs.type(), fs.mntPoint(),

@ -129,10 +129,10 @@ public:
inline long freeBlks() { inline long freeBlks() {
return FreeBlks; return FreeBlks;
} }
inline KIO::filesize_t totalBytes() { inline TDEIO::filesize_t totalBytes() {
return TotalBlks * 1024; return TotalBlks * 1024;
} }
inline KIO::filesize_t freeBytes() { inline TDEIO::filesize_t freeBytes() {
return FreeBlks * 1024; return FreeBlks * 1024;
} }
//////////////////// insert a good round function here ///////////////// //////////////////// insert a good round function here /////////////////

@ -79,11 +79,11 @@ void KrBriefViewToolTip::maybeTip( const TQPoint &pos )
} }
KrBriefView::KrBriefView( TQHeader * headerIn, TQWidget *parent, bool &left, KConfig *cfg, const char *name ): KrBriefView::KrBriefView( TQHeader * headerIn, TQWidget *parent, bool &left, TDEConfig *cfg, const char *name ):
KIconView(parent, name), KrView( cfg ), header( headerIn ), _currDragItem( 0 ), KIconView(parent, name), KrView( cfg ), header( headerIn ), _currDragItem( 0 ),
currentlyRenamedItem( 0 ), pressedItem( 0 ), mouseEvent( 0 ) { currentlyRenamedItem( 0 ), pressedItem( 0 ), mouseEvent( 0 ) {
setWidget( this ); setWidget( this );
_nameInKConfig = TQString( "KrBriefView" ) + TQString( ( left ? "Left" : "Right" ) ); _nameInTDEConfig = TQString( "KrBriefView" ) + TQString( ( left ? "Left" : "Right" ) );
krConfig->setGroup("Private"); krConfig->setGroup("Private");
if (krConfig->readBoolEntry("Enable Input Method", true)) if (krConfig->readBoolEntry("Enable Input Method", true))
setInputMethodEnabled(true); setInputMethodEnabled(true);
@ -93,8 +93,8 @@ KrBriefView::KrBriefView( TQHeader * headerIn, TQWidget *parent, bool &left, KCo
void KrBriefView::setup() { void KrBriefView::setup() {
lastSwushPosition = 0; lastSwushPosition = 0;
// use the {} so that KConfigGroupSaver will work correctly! // use the {} so that TDEConfigGroupSaver will work correctly!
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) ); setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) );
// decide on single click/double click selection // decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) && if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
@ -118,7 +118,7 @@ void KrBriefView::setup() {
connect( &KrColorCache::getColorCache(), TQT_SIGNAL( colorsRefreshed() ), this, TQT_SLOT( refreshColors() ) ); connect( &KrColorCache::getColorCache(), TQT_SIGNAL( colorsRefreshed() ), this, TQT_SLOT( refreshColors() ) );
// add whatever columns are needed to the listview // add whatever columns are needed to the listview
krConfig->setGroup( nameInKConfig() ); krConfig->setGroup( nameInTDEConfig() );
// determine basic settings for the view // determine basic settings for the view
setAcceptDrops( true ); setAcceptDrops( true );
@ -341,7 +341,7 @@ void KrBriefView::slotClicked( TQIconViewItem *item ) {
if ( !modifierPressed ) { if ( !modifierPressed ) {
if ( singleClicked && !renameTimer.isActive() ) { if ( singleClicked && !renameTimer.isActive() ) {
KConfig * config = TDEGlobal::config(); TDEConfig * config = TDEGlobal::config();
config->setGroup( "KDE" ); config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 ); int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
@ -378,7 +378,7 @@ void KrBriefView::prepareForActive() {
void KrBriefView::prepareForPassive() { void KrBriefView::prepareForPassive() {
KrView::prepareForPassive(); KrView::prepareForPassive();
CANCEL_TWO_CLICK_RENAME; CANCEL_TWO_CLICK_RENAME;
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) { if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) {
if ( MAIN_VIEW ) { if ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) { if ( ACTIVE_PANEL ) {
@ -537,7 +537,7 @@ void KrBriefView::contentsMousePressEvent( TQMouseEvent * e ) {
} }
// stop quick search in case a mouse click occured // stop quick search in case a mouse click occured
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) { if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) {
if ( MAIN_VIEW ) { if ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) { if ( ACTIVE_PANEL ) {
@ -792,7 +792,7 @@ void KrBriefView::imStartEvent(TQIMEvent* e)
ACTIVE_PANEL->quickSearch->myIMStartEvent( e ); ACTIVE_PANEL->quickSearch->myIMStartEvent( e );
return ; return ;
}else { }else {
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) )
KIconView::imStartEvent( e ); KIconView::imStartEvent( e );
else { else {
@ -1098,7 +1098,7 @@ void KrBriefView::keyPressEvent( TQKeyEvent * e ) {
//if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) { //if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) {
// are we using krusader's classic quicksearch, or wincmd style? // are we using krusader's classic quicksearch, or wincmd style?
{ {
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) )
KIconView::keyPressEvent( e ); KIconView::keyPressEvent( e );
else { else {
@ -1155,7 +1155,7 @@ void KrBriefView::renameCurrentItem() {
rename( static_cast<TQIconViewItem*>( it ) ); rename( static_cast<TQIconViewItem*>( it ) );
// if applicable, select only the name without extension // if applicable, select only the name without extension
/* TODO: /* TODO:
KConfigGroupSaver svr(krConfig,"Look&Feel"); TDEConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) { if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() ) if (it->hasExtension() && !it->VF->vfile_isDir() )
renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1); renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
@ -1181,7 +1181,7 @@ void KrBriefView::quickSearch( const TQString & str, int direction ) {
KrViewItem * item = getCurrentKrViewItem(); KrViewItem * item = getCurrentKrViewItem();
if (!item) if (!item)
return; return;
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch ); bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch );
if ( !direction ) { if ( !direction ) {
if ( caseSensitive ? item->name().startsWith( str ) : item->name().lower().startsWith( str.lower() ) ) if ( caseSensitive ? item->name().startsWith( str ) : item->name().lower().startsWith( str.lower() ) )
@ -1303,7 +1303,7 @@ void KrBriefView::initProperties() {
_properties = new KrBriefViewProperties; _properties = new KrBriefViewProperties;
_properties->filter = KrViewProperties::All; _properties->filter = KrViewProperties::All;
_properties->filterMask = KRQuery( "*" ); _properties->filterMask = KRQuery( "*" );
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
_properties->displayIcons = _config->readBoolEntry( "With Icons", _WithIcons ); _properties->displayIcons = _config->readBoolEntry( "With Icons", _WithIcons );
bool dirsByNameAlways = _config->readBoolEntry("Always sort dirs by name", false); bool dirsByNameAlways = _config->readBoolEntry("Always sort dirs by name", false);
_properties->sortMode = static_cast<KrViewProperties::SortSpec>( KrViewProperties::Name | _properties->sortMode = static_cast<KrViewProperties::SortSpec>( KrViewProperties::Name |
@ -1335,7 +1335,7 @@ void KrBriefView::initProperties() {
} }
_properties->atomicExtensions = atomicExtensions; _properties->atomicExtensions = atomicExtensions;
_config->setGroup( nameInKConfig() ); _config->setGroup( nameInTDEConfig() );
PROPS->numberOfColumns = _config->readNumEntry( "Number Of Brief Columns", _NumberOfBriefColumns ); PROPS->numberOfColumns = _config->readNumEntry( "Number Of Brief Columns", _NumberOfBriefColumns );
if( PROPS->numberOfColumns < 1 ) if( PROPS->numberOfColumns < 1 )
PROPS->numberOfColumns = 1; PROPS->numberOfColumns = 1;
@ -1358,7 +1358,7 @@ void KrBriefView::setColumnNr()
int result=popup.exec(TQCursor::pos()); int result=popup.exec(TQCursor::pos());
krConfig->setGroup( nameInKConfig() ); krConfig->setGroup( nameInTDEConfig() );
if( result > COL_ID && result <= COL_ID + MAX_COLS ) if( result > COL_ID && result <= COL_ID + MAX_COLS )
{ {

@ -58,7 +58,7 @@ class KrBriefView: public KIconView, public KrView {
Q_OBJECT Q_OBJECT
public: public:
KrBriefView( TQHeader *header, TQWidget *parent, bool &left, KConfig *cfg = krConfig, const char *name = 0 ); KrBriefView( TQHeader *header, TQWidget *parent, bool &left, TDEConfig *cfg = krConfig, const char *name = 0 );
virtual ~KrBriefView(); virtual ~KrBriefView();
virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstItem() ); } virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstItem() ); }
virtual inline KrViewItem *getLast() { return dynamic_cast<KrViewItem*>( lastItem() ); } virtual inline KrViewItem *getLast() { return dynamic_cast<KrViewItem*>( lastItem() ); }
@ -81,7 +81,7 @@ public:
virtual void prepareForPassive(); virtual void prepareForPassive();
virtual void saveSettings() {} virtual void saveSettings() {}
virtual void restoreSettings() {} virtual void restoreSettings() {}
virtual TQString nameInKConfig() {return _nameInKConfig;} virtual TQString nameInTDEConfig() {return _nameInTDEConfig;}
virtual void resizeEvent ( TQResizeEvent * ); virtual void resizeEvent ( TQResizeEvent * );
signals: signals:

@ -23,7 +23,7 @@ KrBriefViewItem::KrBriefViewItem(KrBriefView *parent, TQIconViewItem *after, vfi
initiated = false; initiated = false;
// get the expected height of an item - should be done only once // get the expected height of an item - should be done only once
if (expHeight == 0) { if (expHeight == 0) {
KConfigGroupSaver svr(krConfig, "Look&Feel"); TDEConfigGroupSaver svr(krConfig, "Look&Feel");
expHeight = 2 + (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt(); expHeight = 2 + (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt();
} }
if( PROPS->displayIcons ) if( PROPS->displayIcons )

@ -144,7 +144,7 @@ void KrCalcSpaceDialog::showResult(){
if (!m_thread) return; if (!m_thread) return;
TQString msg; TQString msg;
TQString fileName = ( ( m_thread->getItems().count() == 1 ) ? ( i18n( "Name: " ) + m_thread->getItems().first() + "\n" ) : TQString( "" ) ); TQString fileName = ( ( m_thread->getItems().count() == 1 ) ? ( i18n( "Name: " ) + m_thread->getItems().first() + "\n" ) : TQString( "" ) );
msg = fileName + i18n( "Total occupied space: %1").arg( KIO::convertSize( m_thread->getTotalSize() ) ); msg = fileName + i18n( "Total occupied space: %1").arg( TDEIO::convertSize( m_thread->getTotalSize() ) );
if (m_thread->getTotalSize() >= 1024) if (m_thread->getTotalSize() >= 1024)
msg += " (" + KRpermHandler::parseSize( m_thread->getTotalSize() ) + "bytes)"; msg += " (" + KRpermHandler::parseSize( m_thread->getTotalSize() ) + "bytes)";
msg += "\n"; msg += "\n";

@ -58,7 +58,7 @@ class KrCalcSpaceDialog : public KDialogBase{
needed. Creator must call finished(), if the thread is no longer needed. needed. Creator must call finished(), if the thread is no longer needed.
*/ */
class CalcThread : public TQThread{ class CalcThread : public TQThread{
KIO::filesize_t m_totalSize, m_currentSize; TDEIO::filesize_t m_totalSize, m_currentSize;
unsigned long m_totalFiles; unsigned long m_totalFiles;
unsigned long m_totalDirs; unsigned long m_totalDirs;
const TQStringList m_items; const TQStringList m_items;
@ -70,7 +70,7 @@ class KrCalcSpaceDialog : public KDialogBase{
bool m_stop; bool m_stop;
void cleanUp(); // Deletes this, if possible void cleanUp(); // Deletes this, if possible
public: public:
KIO::filesize_t getTotalSize() const {return m_totalSize + m_currentSize;} // the result TDEIO::filesize_t getTotalSize() const {return m_totalSize + m_currentSize;} // the result
unsigned long getTotalFiles() const {return m_totalFiles;} // the result unsigned long getTotalFiles() const {return m_totalFiles;} // the result
unsigned long getTotalDirs() const {return m_totalDirs;} // the result unsigned long getTotalDirs() const {return m_totalDirs;} // the result
const TQStringList & getItems() const {return m_items;} // list of directories to calculate const TQStringList & getItems() const {return m_items;} // list of directories to calculate
@ -87,7 +87,7 @@ class KrCalcSpaceDialog : public KDialogBase{
int m_timerCounter; // internal counter. The timer runs faster as the rehresh (see comment there) int m_timerCounter; // internal counter. The timer runs faster as the rehresh (see comment there)
void calculationFinished(); // called if the calulation is done void calculationFinished(); // called if the calulation is done
void showResult(); // show the current result in teh dialog void showResult(); // show the current result in teh dialog
static void setDirSize(KrDetailedViewItem * viewItem, KIO::filesize_t size) {viewItem->setSize(size);} static void setDirSize(KrDetailedViewItem * viewItem, TDEIO::filesize_t size) {viewItem->setSize(size);}
protected slots: protected slots:
void timer(); // poll timer was fired void timer(); // poll timer was fired
void slotCancel(); // cancel was pressed void slotCancel(); // cancel was pressed
@ -95,7 +95,7 @@ public:
// autoclose: wait 3 sec. before showing the dialog. Close it, when done // autoclose: wait 3 sec. before showing the dialog. Close it, when done
KrCalcSpaceDialog(TQWidget *parent, ListPanel * panel, const TQStringList & items, bool autoclose); KrCalcSpaceDialog(TQWidget *parent, ListPanel * panel, const TQStringList & items, bool autoclose);
~KrCalcSpaceDialog(); ~KrCalcSpaceDialog();
KIO::filesize_t getTotalSize() const {return m_thread->getTotalSize();} // the result TDEIO::filesize_t getTotalSize() const {return m_thread->getTotalSize();} // the result
unsigned long getTotalFiles() const {return m_thread->getTotalFiles();} // the result unsigned long getTotalFiles() const {return m_thread->getTotalFiles();} // the result
unsigned long getTotalDirs() const {return m_thread->getTotalDirs();} // the result unsigned long getTotalDirs() const {return m_thread->getTotalDirs();} // the result
bool wasCanceled() const {return m_canceled;} // cancel was pressed; result is probably wrong bool wasCanceled() const {return m_canceled;} // cancel was pressed; result is probably wrong

@ -55,7 +55,7 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include <tqdict.h> #include <tqdict.h>
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// The following is KrDetailedView's settings in KConfig: // The following is KrDetailedView's settings in TDEConfig:
// Group name: KrDetailedView // Group name: KrDetailedView
// //
// Ext Column // Ext Column
@ -87,11 +87,11 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
TQString KrDetailedView::ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ]; TQString KrDetailedView::ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ];
KrDetailedView::KrDetailedView( TQWidget *parent, bool &left, KConfig *cfg, const char *name ) : KrDetailedView::KrDetailedView( TQWidget *parent, bool &left, TDEConfig *cfg, const char *name ) :
KListView( parent, name ), KrView( cfg ), _currDragItem( 0L ), currentlyRenamedItem( 0 ), KListView( parent, name ), KrView( cfg ), _currDragItem( 0L ), currentlyRenamedItem( 0 ),
pressedItem( 0 ) { pressedItem( 0 ) {
setWidget( this ); setWidget( this );
_nameInKConfig=TQString( "KrDetailedView" ) + TQString( ( left ? "Left" : "Right" ) ) ; _nameInTDEConfig=TQString( "KrDetailedView" ) + TQString( ( left ? "Left" : "Right" ) ) ;
krConfig->setGroup("Private"); krConfig->setGroup("Private");
if (krConfig->readBoolEntry("Enable Input Method", true)) if (krConfig->readBoolEntry("Enable Input Method", true))
setInputMethodEnabled(true); setInputMethodEnabled(true);
@ -112,8 +112,8 @@ void KrDetailedView::setup() {
} }
/////////////////////////////// listview //////////////////////////////////// /////////////////////////////// listview ////////////////////////////////////
{ // use the {} so that KConfigGroupSaver will work correctly! { // use the {} so that TDEConfigGroupSaver will work correctly!
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) ); setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) );
// decide on single click/double click selection // decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) && if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
@ -139,7 +139,7 @@ void KrDetailedView::setup() {
} }
// add whatever columns are needed to the listview // add whatever columns are needed to the listview
krConfig->setGroup( nameInKConfig() ); krConfig->setGroup( nameInTDEConfig() );
newColumn( KrDetailedViewProperties::Name ); // we always have a name newColumn( KrDetailedViewProperties::Name ); // we always have a name
setColumnWidthMode( COLUMN(Name), TQListView::Manual ); setColumnWidthMode( COLUMN(Name), TQListView::Manual );
@ -431,7 +431,7 @@ void KrDetailedView::slotClicked( TQListViewItem *item ) {
if ( !modifierPressed ) { if ( !modifierPressed ) {
if ( singleClicked && !renameTimer.isActive() ) { if ( singleClicked && !renameTimer.isActive() ) {
KConfig * config = TDEGlobal::config(); TDEConfig * config = TDEGlobal::config();
config->setGroup( "KDE" ); config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 ); int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
@ -470,7 +470,7 @@ void KrDetailedView::prepareForPassive() {
CANCEL_TWO_CLICK_RENAME; CANCEL_TWO_CLICK_RENAME;
if ( renameLineEdit() ->isVisible() ) if ( renameLineEdit() ->isVisible() )
renameLineEdit() ->clearFocus(); renameLineEdit() ->clearFocus();
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) { if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) {
if ( MAIN_VIEW ) { if ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) { if ( ACTIVE_PANEL ) {
@ -627,7 +627,7 @@ void KrDetailedView::contentsMousePressEvent( TQMouseEvent * e ) {
} }
// stop quick search in case a mouse click occured // stop quick search in case a mouse click occured
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) { if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) {
if ( MAIN_VIEW ) { if ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) { if ( ACTIVE_PANEL ) {
@ -862,7 +862,7 @@ void KrDetailedView::imStartEvent(TQIMEvent* e)
ACTIVE_PANEL->quickSearch->myIMStartEvent( e ); ACTIVE_PANEL->quickSearch->myIMStartEvent( e );
return ; return ;
}else { }else {
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) )
KListView::imStartEvent( e ); KListView::imStartEvent( e );
else { else {
@ -1092,7 +1092,7 @@ void KrDetailedView::keyPressEvent( TQKeyEvent * e ) {
// there's a folder we can't enter (permissions). in that case, the returned // there's a folder we can't enter (permissions). in that case, the returned
// size will not be correct. // size will not be correct.
// //
KIO::filesize_t totalSize = 0; TDEIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0, totalDirs = 0; unsigned long totalFiles = 0, totalDirs = 0;
TQStringList items; TQStringList items;
items.push_back( viewItem->name() ); items.push_back( viewItem->name() );
@ -1135,7 +1135,7 @@ mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
//if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) { //if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) {
// are we using krusader's classic quicksearch, or wincmd style? // are we using krusader's classic quicksearch, or wincmd style?
{ {
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) )
KListView::keyPressEvent( e ); KListView::keyPressEvent( e );
else { else {
@ -1212,7 +1212,7 @@ void KrDetailedView::renameCurrentItem() {
if ( c >= 0 ) { if ( c >= 0 ) {
rename( static_cast<TQListViewItem*>( it ), c ); rename( static_cast<TQListViewItem*>( it ), c );
// if applicable, select only the name without extension // if applicable, select only the name without extension
KConfigGroupSaver svr(krConfig,"Look&Feel"); TDEConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) { if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() ) if (it->hasExtension() && !it->VF->vfile_isDir() )
renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1); renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
@ -1272,7 +1272,7 @@ void KrDetailedView::quickSearch( const TQString & str, int direction ) {
KrViewItem * item = getCurrentKrViewItem(); KrViewItem * item = getCurrentKrViewItem();
if (!item) if (!item)
return; return;
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch ); bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch );
if ( !direction ) { if ( !direction ) {
if ( caseSensitive ? item->name().startsWith( str ) : item->name().lower().startsWith( str.lower() ) ) if ( caseSensitive ? item->name().startsWith( str ) : item->name().lower().startsWith( str.lower() ) )
@ -1396,7 +1396,7 @@ void KrDetailedView::initOperator() {
void KrDetailedView::initProperties() { void KrDetailedView::initProperties() {
_properties = new KrDetailedViewProperties; _properties = new KrDetailedViewProperties;
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
for (int i=0; i<KrDetailedViewProperties::MAX_COLUMNS;++i) for (int i=0; i<KrDetailedViewProperties::MAX_COLUMNS;++i)
PROPS->column[i]=-1; PROPS->column[i]=-1;
PROPS->displayIcons = _config->readBoolEntry( "With Icons", _WithIcons ); PROPS->displayIcons = _config->readBoolEntry( "With Icons", _WithIcons );
@ -1473,7 +1473,7 @@ void KrDetailedView::selectColumns()
int result=popup.exec(TQCursor::pos()); int result=popup.exec(TQCursor::pos());
krConfig->setGroup( nameInKConfig() ); krConfig->setGroup( nameInTDEConfig() );
switch( result - COLUMN_POPUP_IDS ) switch( result - COLUMN_POPUP_IDS )
{ {

@ -75,7 +75,7 @@ class KrDetailedView : public KListView, public KrView {
friend class KrDetailedViewItem; friend class KrDetailedViewItem;
public: public:
KrDetailedView( TQWidget *parent, bool &left, KConfig *cfg = krConfig, const char *name = 0 ); KrDetailedView( TQWidget *parent, bool &left, TDEConfig *cfg = krConfig, const char *name = 0 );
virtual ~KrDetailedView(); virtual ~KrDetailedView();
virtual int column( KrDetailedViewProperties::ColumnType type ); virtual int column( KrDetailedViewProperties::ColumnType type );
virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstChild() ); } virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstChild() ); }
@ -96,8 +96,8 @@ public:
virtual void setSortMode( KrViewProperties::SortSpec mode ); virtual void setSortMode( KrViewProperties::SortSpec mode );
virtual void prepareForActive(); virtual void prepareForActive();
virtual void prepareForPassive(); virtual void prepareForPassive();
virtual inline void saveSettings() { KListView::saveLayout( _config, nameInKConfig() ); } virtual inline void saveSettings() { KListView::saveLayout( _config, nameInTDEConfig() ); }
virtual inline void restoreSettings() { KListView::restoreLayout( _config, nameInKConfig() ); } virtual inline void restoreSettings() { KListView::restoreLayout( _config, nameInTDEConfig() ); }
signals: signals:
void middleButtonClicked( KrViewItem *item ); void middleButtonClicked( KrViewItem *item );

@ -63,7 +63,7 @@ KrDetailedViewItem::KrDetailedViewItem(KrDetailedView *parent, TQListViewItem *a
initiated = false; initiated = false;
// get the expected height of an item - should be done only once // get the expected height of an item - should be done only once
if (expHeight == 0) { if (expHeight == 0) {
KConfigGroupSaver svr(krConfig, "Look&Feel"); TDEConfigGroupSaver svr(krConfig, "Look&Feel");
expHeight = 2 + (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt(); expHeight = 2 + (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt();
} }
@ -108,7 +108,7 @@ void KrDetailedViewItem::repaintItem() {
} }
if ((id = COLUMN(Size)) != -1) { if ((id = COLUMN(Size)) != -1) {
if (_vf->vfile_isDir() && _vf->vfile_getSize() <= 0) setText(id, i18n("<DIR>")); if (_vf->vfile_isDir() && _vf->vfile_getSize() <= 0) setText(id, i18n("<DIR>"));
else setText(id, PROPS->humanReadableSize ? KIO::convertSize(_vf->vfile_getSize())+" " : else setText(id, PROPS->humanReadableSize ? TDEIO::convertSize(_vf->vfile_getSize())+" " :
KRpermHandler::parseSize(_vf->vfile_getSize())+" "); KRpermHandler::parseSize(_vf->vfile_getSize())+" ");
} }
@ -160,7 +160,7 @@ void KrDetailedViewItem::repaintItem() {
#endif #endif
} }
TQString num2qstring(KIO::filesize_t num){ TQString num2qstring(TDEIO::filesize_t num){
TQString buf; TQString buf;
buf.sprintf("%025llu",num); buf.sprintf("%025llu",num);
return buf; return buf;

@ -137,7 +137,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *parent) : KPopupMenu(par
insertItem( i18n( "Rename" ), RENAME_ID ); insertItem( i18n( "Rename" ), RENAME_ID );
// -------- MOVE TO TRASH // -------- MOVE TO TRASH
KConfigGroupSaver saver(krConfig, "General"); TDEConfigGroupSaver saver(krConfig, "General");
bool trash = krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ); bool trash = krConfig->readBoolEntry( "Move To Trash", _MoveToTrash );
if( trash ) if( trash )
insertItem( i18n( "Move to Trash" ), TRASH_ID ); insertItem( i18n( "Move to Trash" ), TRASH_ID );
@ -326,7 +326,7 @@ void KrPopupMenu::performAction(int id) {
chdir( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ).local8Bit() ); chdir( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ).local8Bit() );
TDEProcess proc; TDEProcess proc;
{ {
KConfigGroupSaver saver(krConfig, "General"); TDEConfigGroupSaver saver(krConfig, "General");
TQString term = krConfig->readEntry( "Terminal", _Terminal ); TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term ); proc << KrServices::separateArgs( term );
if ( !panel->func->getVFile(item)->vfile_isDir() ) proc << "-e" << item->name(); if ( !panel->func->getVFile(item)->vfile_isDir() ) proc << "-e" << item->name();

@ -31,15 +31,15 @@ void KrPreviewPopup::setUrls(const KURL::List* urls){
//insertItem(i18n("Configure preview"),0); //insertItem(i18n("Configure preview"),0);
insertItem(i18n("Preview not available"),0); insertItem(i18n("Preview not available"),0);
KIO::PreviewJob* pjob; TDEIO::PreviewJob* pjob;
TQStringList plugins = KIO::PreviewJob::availablePlugins(); TQStringList plugins = TDEIO::PreviewJob::availablePlugins();
for( unsigned int i=0; i< urls->count(); ++i){ for( unsigned int i=0; i< urls->count(); ++i){
KFileItem* kfi = new KFileItem(KFileItem::Unknown,KFileItem::Unknown,*(urls->at(i))); KFileItem* kfi = new KFileItem(KFileItem::Unknown,KFileItem::Unknown,*(urls->at(i)));
files.append(kfi); files.append(kfi);
} }
pjob = new KIO::PreviewJob(files,200,200,200,1,true,true,0); pjob = new TDEIO::PreviewJob(files,200,200,200,1,true,true,0);
connect(pjob,TQT_SIGNAL(gotPreview(const KFileItem*,const TQPixmap&)), connect(pjob,TQT_SIGNAL(gotPreview(const KFileItem*,const TQPixmap&)),
this,TQT_SLOT(addPreview(const KFileItem*,const TQPixmap&))); this,TQT_SLOT(addPreview(const KFileItem*,const TQPixmap&)));
} }

@ -66,8 +66,8 @@ void KrViewOperator::startDrag() {
// ----------------------------- krview // ----------------------------- krview
KrView::KrView( KConfig *cfg ) : _config( cfg ), _widget(0), _nameToMakeCurrent( TQString() ), _nameToMakeCurrentIfAdded( TQString() ), KrView::KrView( TDEConfig *cfg ) : _config( cfg ), _widget(0), _nameToMakeCurrent( TQString() ), _nameToMakeCurrentIfAdded( TQString() ),
_numSelected( 0 ), _count( 0 ), _numDirs( 0 ), _countSize( 0 ), _selectedSize( 0 ), _properties(0), _focused( false ), _nameInKConfig(TQString()) { _numSelected( 0 ), _count( 0 ), _numDirs( 0 ), _countSize( 0 ), _selectedSize( 0 ), _properties(0), _focused( false ), _nameInTDEConfig(TQString()) {
} }
KrView::~KrView() { KrView::~KrView() {
@ -79,8 +79,8 @@ KrView::~KrView() {
void KrView::init() { void KrView::init() {
// sanity checks: // sanity checks:
if (_nameInKConfig.isEmpty()) if (_nameInTDEConfig.isEmpty())
tqFatal("_nameInKConfig must be set during construction of KrView inheritors"); tqFatal("_nameInTDEConfig must be set during construction of KrView inheritors");
if (!_widget) if (!_widget)
tqFatal("_widget must be set during construction of KrView inheritors"); tqFatal("_widget must be set during construction of KrView inheritors");
// ok, continue // ok, continue
@ -163,9 +163,9 @@ TQString KrView::statistics() {
_countSize += it->getVfile()->vfile_getSize(); _countSize += it->getVfile()->vfile_getSize();
} }
TQString tmp = TQString(i18n("%1 out of %2, %3 (%4) out of %5 (%6)")) TQString tmp = TQString(i18n("%1 out of %2, %3 (%4) out of %5 (%6)"))
.arg( _numSelected ).arg( _count ).arg( KIO::convertSize( _selectedSize ) ) .arg( _numSelected ).arg( _count ).arg( TDEIO::convertSize( _selectedSize ) )
.arg( KRpermHandler::parseSize(_selectedSize) ) .arg( KRpermHandler::parseSize(_selectedSize) )
.arg( KIO::convertSize( _countSize ) ).arg( KRpermHandler::parseSize(_countSize) ); .arg( TDEIO::convertSize( _countSize ) ).arg( KRpermHandler::parseSize(_countSize) );
// notify if we're running a filtered view // notify if we're running a filtered view
if (filter() != KrViewProperties::All) if (filter() != KrViewProperties::All)
tmp = ">> [ " + filterMask().nameFilter() + " ] "+tmp; tmp = ">> [ " + filterMask().nameFilter() + " ] "+tmp;
@ -173,7 +173,7 @@ TQString KrView::statistics() {
} }
void KrView::changeSelection( const KRQuery& filter, bool select, bool includeDirs ) { void KrView::changeSelection( const KRQuery& filter, bool select, bool includeDirs ) {
KConfigGroupSaver grpSvr( _config, "Look&Feel" ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
bool markDirs = _config->readBoolEntry( "Mark Dirs", _MarkDirs ) || includeDirs; bool markDirs = _config->readBoolEntry( "Mark Dirs", _MarkDirs ) || includeDirs;
KrViewItem *temp = getCurrentKrViewItem(); KrViewItem *temp = getCurrentKrViewItem();
@ -205,7 +205,7 @@ void KrView::changeSelection( const KRQuery& filter, bool select, bool includeDi
} }
void KrView::invertSelection() { void KrView::invertSelection() {
KConfigGroupSaver grpSvr( _config, "Look&Feel" /*nameInKConfig()*/ ); TDEConfigGroupSaver grpSvr( _config, "Look&Feel" /*nameInTDEConfig()*/ );
bool markDirs = _config->readBoolEntry( "Mark Dirs", _MarkDirs ); bool markDirs = _config->readBoolEntry( "Mark Dirs", _MarkDirs );
KrViewItem *temp = getCurrentKrViewItem(); KrViewItem *temp = getCurrentKrViewItem();

@ -171,7 +171,7 @@ public:
virtual void prepareForActive() { _focused = true; } virtual void prepareForActive() { _focused = true; }
virtual void prepareForPassive() { _focused = false; } virtual void prepareForPassive() { _focused = false; }
virtual void renameCurrentItem(); // Rename current item. returns immediatly virtual void renameCurrentItem(); // Rename current item. returns immediatly
virtual TQString nameInKConfig() const { return _nameInKConfig; } virtual TQString nameInTDEConfig() const { return _nameInTDEConfig; }
protected: protected:
virtual KrViewItem *preAddItem(vfile *vf) = 0; virtual KrViewItem *preAddItem(vfile *vf) = 0;
@ -186,11 +186,11 @@ public:
virtual void updateItem(vfile *vf); virtual void updateItem(vfile *vf);
virtual void delItem(const TQString &name); virtual void delItem(const TQString &name);
virtual uint numSelected() const { return _numSelected; } virtual uint numSelected() const { return _numSelected; }
virtual KIO::filesize_t selectedSize() const { return _selectedSize; } virtual TDEIO::filesize_t selectedSize() const { return _selectedSize; }
virtual uint numFiles() const { return _count-_numDirs; } virtual uint numFiles() const { return _count-_numDirs; }
virtual uint numDirs() const { return _numDirs; } virtual uint numDirs() const { return _numDirs; }
virtual uint count() const { return _count; } virtual uint count() const { return _count; }
virtual KIO::filesize_t countSize() const { return _countSize; } virtual TDEIO::filesize_t countSize() const { return _countSize; }
virtual void getSelectedItems(TQStringList* names); virtual void getSelectedItems(TQStringList* names);
virtual void getItemsByMask(TQString mask, TQStringList* names, bool dirs = true, bool files = true); virtual void getItemsByMask(TQString mask, TQStringList* names, bool dirs = true, bool files = true);
virtual void getSelectedKrViewItems(KrViewItemList *items); virtual void getSelectedKrViewItems(KrViewItemList *items);
@ -223,24 +223,24 @@ public:
// todo: what about selection modes ??? // todo: what about selection modes ???
virtual ~KrView(); virtual ~KrView();
protected: protected:
KrView(KConfig *cfg = krConfig); KrView(TDEConfig *cfg = krConfig);
static TQPixmap getIcon(vfile *vf); static TQPixmap getIcon(vfile *vf);
void changeSelection(const KRQuery& filter, bool select, bool includeDirs = false); void changeSelection(const KRQuery& filter, bool select, bool includeDirs = false);
protected: protected:
KConfig *_config; TDEConfig *_config;
TQWidget *_widget; TQWidget *_widget;
TQString _nameToMakeCurrent; TQString _nameToMakeCurrent;
TQString _nameToMakeCurrentIfAdded; TQString _nameToMakeCurrentIfAdded;
uint _numSelected, _count, _numDirs; uint _numSelected, _count, _numDirs;
KIO::filesize_t _countSize, _selectedSize; TDEIO::filesize_t _countSize, _selectedSize;
bool _left; bool _left;
KrViewProperties *_properties; KrViewProperties *_properties;
KrViewOperator *_operator; KrViewOperator *_operator;
TQDict<KrViewItem> _dict; TQDict<KrViewItem> _dict;
bool _focused; bool _focused;
TQString _nameInKConfig; TQString _nameInTDEConfig;
}; };
#endif /* KRVIEW_H */ #endif /* KRVIEW_H */

@ -49,7 +49,7 @@ TQString KrViewItem::description() const {
TQString text = _vf->vfile_getName(); TQString text = _vf->vfile_getName();
TQString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false); TQString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false);
TQString myLinkDest = _vf->vfile_getSymDest(); TQString myLinkDest = _vf->vfile_getSymDest();
KIO::filesize_t mySize = _vf->vfile_getSize(); TDEIO::filesize_t mySize = _vf->vfile_getSize();
TQString text2 = text.copy(); TQString text2 = text.copy();
mode_t m_fileMode = _vf->vfile_getMode(); mode_t m_fileMode = _vf->vfile_getMode();
@ -66,7 +66,7 @@ TQString KrViewItem::description() const {
text += tmp; text += tmp;
} else if ( S_ISREG( m_fileMode ) ){ } else if ( S_ISREG( m_fileMode ) ){
text = TQString("%1 (%2)").arg(text2).arg( PROPS->humanReadableSize ? text = TQString("%1 (%2)").arg(text2).arg( PROPS->humanReadableSize ?
KRpermHandler::parseSize(_vf->vfile_getSize()) : KIO::convertSize( mySize ) ); KRpermHandler::parseSize(_vf->vfile_getSize()) : TDEIO::convertSize( mySize ) );
text += " "; text += " ";
text += comment; text += comment;
} else if ( S_ISDIR ( m_fileMode ) ){ } else if ( S_ISDIR ( m_fileMode ) ){

@ -62,7 +62,7 @@ public:
protected: protected:
// used INTERNALLY when calculation of dir size changes the displayed size of the item // used INTERNALLY when calculation of dir size changes the displayed size of the item
inline void setSize(KIO::filesize_t size) { _vf->vfile_setSize(size); } inline void setSize(TDEIO::filesize_t size) { _vf->vfile_setSize(size); }
vfile* _vf; // each view item holds a pointer to a corrosponding vfile for fast access vfile* _vf; // each view item holds a pointer to a corrosponding vfile for fast access
bool dummyVfile; // used in case our item represents the ".." (updir) item bool dummyVfile; // used in case our item represents the ".." (updir) item

@ -760,8 +760,8 @@ void ListPanel::gotStats( const TQString &mountPoint, unsigned long kBSize,
} }
TQString stats = i18n( "%1 free out of %2 (%3%) on %4 [ (%5) ]" ) TQString stats = i18n( "%1 free out of %2 (%3%) on %4 [ (%5) ]" )
.arg( KIO::convertSizeFromKB( kBAvail ) ) .arg( TDEIO::convertSizeFromKB( kBAvail ) )
.arg( KIO::convertSizeFromKB( kBSize ) ).arg( perc ) .arg( TDEIO::convertSizeFromKB( kBSize ) ).arg( perc )
.arg( mountPoint ).arg( fstype ); .arg( mountPoint ).arg( fstype );
status->setText( stats ); status->setText( stats );
} }
@ -838,7 +838,7 @@ void ListPanel::handleDropOnView( TQDropEvent *e, TQWidget *widget ) {
break; break;
} }
KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy; TDEIO::CopyJob::CopyMode mode = TDEIO::CopyJob::Copy;
// the KURL::List is finished, let's go // the KURL::List is finished, let's go
// --> display the COPY/MOVE/LINK menu // --> display the COPY/MOVE/LINK menu
@ -854,13 +854,13 @@ void ListPanel::handleDropOnView( TQDropEvent *e, TQWidget *widget ) {
int result = popup.exec( tmp ); int result = popup.exec( tmp );
switch ( result ) { switch ( result ) {
case 1 : case 1 :
mode = KIO::CopyJob::Copy; mode = TDEIO::CopyJob::Copy;
break; break;
case 2 : case 2 :
mode = KIO::CopyJob::Move; mode = TDEIO::CopyJob::Move;
break; break;
case 3 : case 3 :
mode = KIO::CopyJob::Link; mode = TDEIO::CopyJob::Link;
break; break;
case - 1 : // user pressed outside the menu case - 1 : // user pressed outside the menu
case 4: case 4:
@ -1038,7 +1038,7 @@ void ListPanel::panelInactive() {
func->files()->vfs_enableRefresh(false); func->files()->vfs_enableRefresh(false);
} }
void ListPanel::slotJobStarted(KIO::Job* job) { void ListPanel::slotJobStarted(TDEIO::Job* job) {
// disable the parts of the panel we don't want touched // disable the parts of the panel we don't want touched
//static_cast<KrDetailedView*>(view)->setEnabled(false); //static_cast<KrDetailedView*>(view)->setEnabled(false);
status->setEnabled(false); status->setEnabled(false);
@ -1054,14 +1054,14 @@ void ListPanel::slotJobStarted(KIO::Job* job) {
syncBrowseButton->setEnabled(false); syncBrowseButton->setEnabled(false);
// connect to the job interface to provide in-panel refresh notification // connect to the job interface to provide in-panel refresh notification
connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ), connect( job, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString & ) ),
TQT_SLOT( inlineRefreshInfoMessage( KIO::Job*, const TQString & ) ) ); TQT_SLOT( inlineRefreshInfoMessage( TDEIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( inlineRefreshPercent( KIO::Job*, unsigned long ) ) ); TQT_SLOT( inlineRefreshPercent( TDEIO::Job*, unsigned long ) ) );
connect(job,TQT_SIGNAL(result(KIO::Job*)), connect(job,TQT_SIGNAL(result(TDEIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(KIO::Job*))); this,TQT_SLOT(inlineRefreshListResult(TDEIO::Job*)));
connect(job,TQT_SIGNAL(canceled(KIO::Job*)), connect(job,TQT_SIGNAL(canceled(TDEIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(KIO::Job*))); this,TQT_SLOT(inlineRefreshListResult(TDEIO::Job*)));
inlineRefreshJob = job; inlineRefreshJob = job;
@ -1076,16 +1076,16 @@ void ListPanel::inlineRefreshCancel() {
} }
} }
void ListPanel::inlineRefreshPercent( KIO::Job*, unsigned long perc) { void ListPanel::inlineRefreshPercent( TDEIO::Job*, unsigned long perc) {
TQString msg = TQString(">> %1: %2 % complete...").arg(i18n("Reading")).arg(perc); TQString msg = TQString(">> %1: %2 % complete...").arg(i18n("Reading")).arg(perc);
totals->setText(msg); totals->setText(msg);
} }
void ListPanel::inlineRefreshInfoMessage( KIO::Job*, const TQString &msg ) { void ListPanel::inlineRefreshInfoMessage( TDEIO::Job*, const TQString &msg ) {
totals->setText(">> " + i18n("Reading: ") + msg); totals->setText(">> " + i18n("Reading: ") + msg);
} }
void ListPanel::inlineRefreshListResult(KIO::Job*) { void ListPanel::inlineRefreshListResult(TDEIO::Job*) {
inlineRefreshJob = 0; inlineRefreshJob = 0;
// reenable everything // reenable everything
//static_cast<KrDetailedView*>(view)->setEnabled(true); //static_cast<KrDetailedView*>(view)->setEnabled(true);

@ -153,10 +153,10 @@ protected slots:
void handleDropOnStatus( TQDropEvent * ); // handles drops on the status line void handleDropOnStatus( TQDropEvent * ); // handles drops on the status line
void startDragging( TQStringList, TQPixmap ); void startDragging( TQStringList, TQPixmap );
// those handle the in-panel refresh notifications // those handle the in-panel refresh notifications
void slotJobStarted(KIO::Job* job); void slotJobStarted(TDEIO::Job* job);
void inlineRefreshInfoMessage( KIO::Job* job, const TQString &msg ); void inlineRefreshInfoMessage( TDEIO::Job* job, const TQString &msg );
void inlineRefreshListResult(KIO::Job* job); void inlineRefreshListResult(TDEIO::Job* job);
void inlineRefreshPercent( KIO::Job*, unsigned long ); void inlineRefreshPercent( TDEIO::Job*, unsigned long );
void inlineRefreshCancel(); void inlineRefreshCancel();
signals: signals:
@ -195,7 +195,7 @@ public:
MediaButton *mediaButton; MediaButton *mediaButton;
SyncBrowseButton *syncBrowseButton; SyncBrowseButton *syncBrowseButton;
KPushButton *inlineRefreshCancelButton; KPushButton *inlineRefreshCancelButton;
KIO::Job *inlineRefreshJob; TDEIO::Job *inlineRefreshJob;
TQSplitter *splt; TQSplitter *splt;
TQHeader * header; TQHeader * header;

@ -167,8 +167,8 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
return; return;
} }
} }
connect( files(), TQT_SIGNAL(startJob(KIO::Job* )), connect( files(), TQT_SIGNAL(startJob(TDEIO::Job* )),
panel, TQT_SLOT(slotJobStarted(KIO::Job* ))); panel, TQT_SLOT(slotJobStarted(TDEIO::Job* )));
if ( vfsP->vfs_refresh( u ) ) { if ( vfsP->vfs_refresh( u ) ) {
break; // we have a valid refreshed URL now break; // we have a valid refreshed URL now
} }
@ -448,23 +448,23 @@ void ListPanelFunc::moveFiles() {
if( !virtualBaseURL.isEmpty() ) { if( !virtualBaseURL.isEmpty() ) {
// keep the directory structure for virtual paths // keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Move, false, true ); VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, TDEIO::CopyJob::Move, false, true );
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) ); connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
if ( dest.equals( panel->otherPanel->virtualPath(), true ) ) if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) ); connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
} }
// if we are not moving to the other panel : // if we are not moving to the other panel :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) { else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
// you can rename only *one* file not a batch, // you can rename only *one* file not a batch,
// so a batch dest must alwayes be a directory // so a batch dest must alwayes be a directory
if ( fileNames.count() > 1 ) dest.adjustPath(1); if ( fileNames.count() > 1 ) dest.adjustPath(1);
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls, dest, KIO::CopyJob::Move, false, true ); TDEIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls, dest, TDEIO::CopyJob::Move, false, true );
job->setAutoErrorHandlingEnabled( true ); job->setAutoErrorHandlingEnabled( true );
// refresh our panel when done // refresh our panel when done
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
// and if needed the other panel as well // and if needed the other panel as well
if ( dest.equals( panel->otherPanel->virtualPath(), true ) ) if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
} else { // let the other panel do the dirty job } else { // let the other panel do the dirty job
//check if copy is supported //check if copy is supported
@ -473,7 +473,7 @@ void ListPanelFunc::moveFiles() {
return ; return ;
} }
// finally.. // finally..
otherFunc() ->files() ->vfs_addFiles( fileUrls, KIO::CopyJob::Move, files(), "", pmode ); otherFunc() ->files() ->vfs_addFiles( fileUrls, TDEIO::CopyJob::Move, files(), "", pmode );
} }
} }
@ -596,22 +596,22 @@ void ListPanelFunc::copyFiles() {
if( !virtualBaseURL.isEmpty() ) { if( !virtualBaseURL.isEmpty() ) {
// keep the directory structure for virtual paths // keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Copy, false, true ); VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, TDEIO::CopyJob::Copy, false, true );
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) ); connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
if ( dest.equals( panel->otherPanel->virtualPath(), true ) ) if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) ); connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
} }
// if we are not copying to the other panel : // if we are not copying to the other panel :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) { else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
// you can rename only *one* file not a batch, // you can rename only *one* file not a batch,
// so a batch dest must alwayes be a directory // so a batch dest must alwayes be a directory
if ( fileNames.count() > 1 ) dest.adjustPath(1); if ( fileNames.count() > 1 ) dest.adjustPath(1);
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls, dest, KIO::CopyJob::Copy, false, true ); TDEIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls, dest, TDEIO::CopyJob::Copy, false, true );
job->setAutoErrorHandlingEnabled( true ); job->setAutoErrorHandlingEnabled( true );
if ( dest.equals( panel->virtualPath(), true ) || if ( dest.equals( panel->virtualPath(), true ) ||
dest.upURL().equals( panel->virtualPath(), true ) ) dest.upURL().equals( panel->virtualPath(), true ) )
// refresh our panel when done // refresh our panel when done
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
// let the other panel do the dirty job // let the other panel do the dirty job
} else { } else {
//check if copy is supported //check if copy is supported
@ -620,7 +620,7 @@ void ListPanelFunc::copyFiles() {
return ; return ;
} }
// finally.. // finally..
otherFunc() ->files() ->vfs_addFiles( fileUrls, KIO::CopyJob::Copy, 0, "", pmode ); otherFunc() ->files() ->vfs_addFiles( fileUrls, TDEIO::CopyJob::Copy, 0, "", pmode );
} }
} }
@ -820,7 +820,7 @@ void ListPanelFunc::pack() {
// get the files to be packed: // get the files to be packed:
files() ->vfs_getFiles( &fileNames ); files() ->vfs_getFiles( &fileNames );
KIO::filesize_t totalSize = 0; TDEIO::filesize_t totalSize = 0;
unsigned long totalDirs = 0, totalFiles = 0; unsigned long totalDirs = 0, totalFiles = 0;
if( !calcSpace( fileNames, totalSize, totalFiles, totalDirs ) ) if( !calcSpace( fileNames, totalSize, totalFiles, totalDirs ) )
return; return;
@ -836,7 +836,7 @@ void ListPanelFunc::pack() {
tempDir->setAutoDelete( true ); tempDir->setAutoDelete( true );
arcDir = tempDir->name(); arcDir = tempDir->name();
KURL::List *urlList = files() ->vfs_getFiles( &fileNames ); KURL::List *urlList = files() ->vfs_getFiles( &fileNames );
KIO::NetAccess::dircopy( *urlList, vfs::fromPathOrURL( arcDir ), 0 ); TDEIO::NetAccess::dircopy( *urlList, vfs::fromPathOrURL( arcDir ), 0 );
delete urlList; delete urlList;
} }
@ -853,7 +853,7 @@ void ListPanelFunc::pack() {
// copy from the temp file to it's right place // copy from the temp file to it's right place
if ( tempDestFile ) { if ( tempDestFile ) {
KIO::NetAccess::file_move( vfs::fromPathOrURL( arcFile ), destURL ); TDEIO::NetAccess::file_move( vfs::fromPathOrURL( arcFile ), destURL );
delete tempDestFile; delete tempDestFile;
} }
@ -874,7 +874,7 @@ void ListPanelFunc::testArchive() {
// download the file if it's on a remote filesystem // download the file if it's on a remote filesystem
if ( !arcURL.isLocalFile() ) { if ( !arcURL.isLocalFile() ) {
url = locateLocal( "tmp", TQString( arcName ) ); url = locateLocal( "tmp", TQString( arcName ) );
if ( !KIO::NetAccess::download( arcURL, url, 0 ) ) { if ( !TDEIO::NetAccess::download( arcURL, url, 0 ) ) {
KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() ); KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() );
return ; return ;
} }
@ -935,7 +935,7 @@ void ListPanelFunc::unpack() {
TQString url = TQString(); TQString url = TQString();
if ( !arcURL.isLocalFile() ) { if ( !arcURL.isLocalFile() ) {
url = locateLocal( "tmp", TQString( arcName ) ); url = locateLocal( "tmp", TQString( arcName ) );
if ( !KIO::NetAccess::download( arcURL, url, 0 ) ) { if ( !TDEIO::NetAccess::download( arcURL, url, 0 ) ) {
KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() ); KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() );
continue; continue;
} }
@ -982,7 +982,7 @@ void ListPanelFunc::unpack() {
if ( nameList[ i ] != "." && nameList[ i ] != ".." ) if ( nameList[ i ] != "." && nameList[ i ] != ".." )
urlList.append( vfs::fromPathOrURL( dest.path( 1 ) + nameList[ i ] ) ); urlList.append( vfs::fromPathOrURL( dest.path( 1 ) + nameList[ i ] ) );
if ( urlList.count() > 0 ) if ( urlList.count() > 0 )
KIO::NetAccess::dircopy( urlList, originalDestURL, 0 ); TDEIO::NetAccess::dircopy( urlList, originalDestURL, 0 );
delete tempDir; delete tempDir;
} }
} }
@ -1044,7 +1044,7 @@ void ListPanelFunc::calcSpace() {
panel->slotUpdateTotals(); panel->slotUpdateTotals();
} }
bool ListPanelFunc::calcSpace( const TQStringList & items, KIO::filesize_t & totalSize, unsigned long & totalFiles, unsigned long & totalDirs ) { bool ListPanelFunc::calcSpace( const TQStringList & items, TDEIO::filesize_t & totalSize, unsigned long & totalFiles, unsigned long & totalDirs ) {
KrCalcSpaceDialog calc( krApp, panel, items, true ); KrCalcSpaceDialog calc( krApp, panel, items, true );
calc.exec(); calc.exec();
totalSize = calc.getTotalSize(); totalSize = calc.getTotalSize();
@ -1178,7 +1178,7 @@ void ListPanelFunc::pasteFromClipboard() {
KURL destUrl = panel->virtualPath(); KURL destUrl = panel->virtualPath();
files()->vfs_addFiles( &urls, cutSelection ? KIO::CopyJob::Move : KIO::CopyJob::Copy, otherFunc()->files(), files()->vfs_addFiles( &urls, cutSelection ? TDEIO::CopyJob::Move : TDEIO::CopyJob::Copy, otherFunc()->files(),
"", PM_DEFAULT ); "", PM_DEFAULT );
} }
} }

@ -85,7 +85,7 @@ public:
// calculate the occupied space. A dialog appears, if calculation lasts more than 3 seconds // calculate the occupied space. A dialog appears, if calculation lasts more than 3 seconds
// and disappears, if the calculation is done. Returns true, if the result is ok and false // and disappears, if the calculation is done. Returns true, if the result is ok and false
// otherwise (Cancel was pressed). // otherwise (Cancel was pressed).
bool calcSpace(const TQStringList & items,KIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs); bool calcSpace(const TQStringList & items,TDEIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs);
void FTPDisconnect(); void FTPDisconnect();
void newFTPconnection(); void newFTPconnection();
inline ListPanelFunc* otherFunc(){ return panel->otherPanel->func; } inline ListPanelFunc* otherFunc(){ return panel->otherPanel->func; }

@ -380,16 +380,16 @@ void PanelPopup::slotDroppedOnTree(TQWidget *widget, TQDropEvent *e, KURL::List
TQPoint tmp = widget->mapToGlobal( e->pos() ); TQPoint tmp = widget->mapToGlobal( e->pos() );
int result = popup.exec( TQCursor::pos() ); int result = popup.exec( TQCursor::pos() );
KIO::CopyJob *job; TDEIO::CopyJob *job;
switch ( result ) { switch ( result ) {
case 1 : case 1 :
job = KIO::copy(lst, dest, true); job = TDEIO::copy(lst, dest, true);
break; break;
case 2 : case 2 :
job = KIO::move(lst, dest, true); job = TDEIO::move(lst, dest, true);
break; break;
case 3 : case 3 :
job = KIO::link(lst, dest, true); job = TDEIO::link(lst, dest, true);
break; break;
case - 1 : // user pressed outside the menu case - 1 : // user pressed outside the menu
case 4: case 4:

@ -59,7 +59,7 @@ protected:
TQWidgetStack *stack; TQWidgetStack *stack;
KrusaderImageFilePreview *viewer; KrusaderImageFilePreview *viewer;
KrSqueezedTextLabel *dataLine; KrSqueezedTextLabel *dataLine;
TQGuardedPtr<KIO::PreviewJob> pjob; TQGuardedPtr<TDEIO::PreviewJob> pjob;
KFileTreeView *tree; KFileTreeView *tree;
TQToolButton *treeBtn, *previewBtn, *quickBtn, *viewerBtn, *duBtn; TQToolButton *treeBtn, *previewBtn, *quickBtn, *viewerBtn, *duBtn;
TQButtonGroup *btns; TQButtonGroup *btns;

@ -9,7 +9,7 @@ Queue::~Queue()
// TODO: save queue on delete? or just delete jobs // TODO: save queue on delete? or just delete jobs
} }
void Queue::enqueue(KIO::Job *job) void Queue::enqueue(TDEIO::Job *job)
{ {
_jobs.append(job); _jobs.append(job);

@ -6,7 +6,7 @@
#include <tqptrlist.h> #include <tqptrlist.h>
/** /**
* Queue can hold anything which inherits KIO::Job, and schedule it, start it, stop etc... * Queue can hold anything which inherits TDEIO::Job, and schedule it, start it, stop etc...
* the main reason to hold the Job itself (at least for phase 1) is to keep the code * the main reason to hold the Job itself (at least for phase 1) is to keep the code
* in krusader relatively unchaged, and allow to create the job as usual and choose if * in krusader relatively unchaged, and allow to create the job as usual and choose if
* to start it, or queue it. * to start it, or queue it.
@ -21,13 +21,13 @@ public:
virtual ~Queue(); virtual ~Queue();
inline const TQString& name() const { return _name; } inline const TQString& name() const { return _name; }
void enqueue(KIO::Job *job); void enqueue(TDEIO::Job *job);
protected: protected:
void dumpQueue(); void dumpQueue();
TQString _name; TQString _name;
TQPtrList<KIO::Job> _jobs; TQPtrList<TDEIO::Job> _jobs;
}; };
#endif // QUEUE_H #endif // QUEUE_H

@ -351,7 +351,7 @@ void KrSearchDialog::resizeEvent( TQResizeEvent *e )
} }
} }
void KrSearchDialog::found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString foundText){ void KrSearchDialog::found(TQString what, TQString where, TDEIO::filesize_t size, time_t mtime, TQString perm, TQString foundText){
// convert the time_t to struct tm // convert the time_t to struct tm
struct tm* t=localtime((time_t *)&mtime); struct tm* t=localtime((time_t *)&mtime);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min)); TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
@ -405,8 +405,8 @@ void KrSearchDialog::startSearch() {
searcher = new KRSearchMod(query); searcher = new KRSearchMod(query);
connect(searcher, TQT_SIGNAL(searching(const TQString&)), connect(searcher, TQT_SIGNAL(searching(const TQString&)),
searchingLabel, TQT_SLOT(setText(const TQString&))); searchingLabel, TQT_SLOT(setText(const TQString&)));
connect(searcher, TQT_SIGNAL(found(TQString,TQString,KIO::filesize_t,time_t,TQString,TQString)), connect(searcher, TQT_SIGNAL(found(TQString,TQString,TDEIO::filesize_t,time_t,TQString,TQString)),
this, TQT_SLOT(found(TQString,TQString,KIO::filesize_t,time_t,TQString,TQString))); this, TQT_SLOT(found(TQString,TQString,TDEIO::filesize_t,time_t,TQString,TQString)));
connect(searcher, TQT_SIGNAL(finished()), this, TQT_SLOT(stopSearch())); connect(searcher, TQT_SIGNAL(finished()), this, TQT_SLOT(stopSearch()));
isSearching = true; isSearching = true;
@ -595,7 +595,7 @@ void KrSearchDialog::feedToListBox()
} }
KURL url = KURL::fromPathOrURL( TQString("virt:/") + queryName ); KURL url = KURL::fromPathOrURL( TQString("virt:/") + queryName );
v.vfs_refresh( url ); v.vfs_refresh( url );
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 ); v.vfs_addFiles( &urlList, TDEIO::CopyJob::Copy, 0 );
//ACTIVE_FUNC->openUrl(url); //ACTIVE_FUNC->openUrl(url);
ACTIVE_MNG->slotNewTab(url.prettyURL()); ACTIVE_MNG->slotNewTab(url.prettyURL());
closeDialog(); closeDialog();

@ -67,7 +67,7 @@ public slots:
void stopSearch(); void stopSearch();
void feedToListBox(); void feedToListBox();
void copyToClipBoard(); void copyToClipBoard();
void found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString foundText); void found(TQString what, TQString where, TDEIO::filesize_t size, time_t mtime, TQString perm, TQString foundText);
void closeDialog( bool isAccept = true ); void closeDialog( bool isAccept = true );
void resultDoubleClicked(TQListViewItem*); void resultDoubleClicked(TQListViewItem*);
void resultClicked(TQListViewItem*); void resultClicked(TQListViewItem*);
@ -129,7 +129,7 @@ private:
class ResultListViewItem : public TQListViewItem class ResultListViewItem : public TQListViewItem
{ {
public: public:
ResultListViewItem( TQListView *resultsList, TQString name, TQString where, KIO::filesize_t size, ResultListViewItem( TQListView *resultsList, TQString name, TQString where, TDEIO::filesize_t size,
TQDateTime date, TQString perm ) : TQListViewItem( resultsList, name, where, TQDateTime date, TQString perm ) : TQListViewItem( resultsList, name, where,
KRpermHandler::parseSize(size), KRpermHandler::parseSize(size),
TDEGlobal::locale()->formatDateTime( date ), perm ) TDEGlobal::locale()->formatDateTime( date ), perm )
@ -146,7 +146,7 @@ public:
{ {
if( col == 2 ) { if( col == 2 ) {
ResultListViewItem *other = (ResultListViewItem *)i; ResultListViewItem *other = (ResultListViewItem *)i;
KIO::filesize_t otherSize = other->getSize(); TDEIO::filesize_t otherSize = other->getSize();
if( fileSize == otherSize ) if( fileSize == otherSize )
return 0; return 0;
@ -167,7 +167,7 @@ public:
return TQListViewItem::compare( i, col, ascending ); return TQListViewItem::compare( i, col, ascending );
} }
KIO::filesize_t getSize() { TDEIO::filesize_t getSize() {
return fileSize; return fileSize;
} }
@ -176,7 +176,7 @@ public:
} }
private: private:
KIO::filesize_t fileSize; TDEIO::filesize_t fileSize;
TQDateTime fileDate; TQDateTime fileDate;
TQString _foundText; TQString _foundText;
}; };

@ -149,7 +149,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name(); mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name();
// creating a vfile object for matching with krquery // creating a vfile object for matching with krquery
vfile * vf = new vfile(name, (KIO::filesize_t)stat_p.st_size, KRpermHandler::mode2TQString(stat_p.st_mode), vfile * vf = new vfile(name, (TDEIO::filesize_t)stat_p.st_size, KRpermHandler::mode2TQString(stat_p.st_mode),
stat_p.st_mtime, S_ISLNK(stat_p.st_mode), stat_p.st_uid, stat_p.st_gid, stat_p.st_mtime, S_ISLNK(stat_p.st_mode), stat_p.st_uid, stat_p.st_gid,
mime, "", stat_p.st_mode); mime, "", stat_p.st_mode);
vf->vfile_setUrl( url ); vf->vfile_setUrl( url );
@ -187,7 +187,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
{ {
// if we got here - we got a winner // if we got here - we got a winner
results.append( dir + name ); results.append( dir + name );
emit found( name, dir, ( KIO::filesize_t ) stat_p.st_size, stat_p.st_mtime, KRpermHandler::mode2TQString( stat_p.st_mode ), query->foundText() ); emit found( name, dir, ( TDEIO::filesize_t ) stat_p.st_size, stat_p.st_mtime, KRpermHandler::mode2TQString( stat_p.st_mode ), query->foundText() );
} }
delete vf; delete vf;

@ -65,7 +65,7 @@ private:
signals: signals:
void finished(); void finished();
void searching(const TQString&); void searching(const TQString&);
void found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString textFound); void found(TQString what, TQString where, TDEIO::filesize_t size, time_t mtime, TQString perm, TQString textFound);
private slots: private slots:
void slotProcessEvents( bool & stopped ); void slotProcessEvents( bool & stopped );

@ -85,23 +85,23 @@ void Combiner::combine()
{ {
permissions = file.permissions() | TQFileInfo::WriteUser; permissions = file.permissions() | TQFileInfo::WriteUser;
combineReadJob = KIO::get( splURL, false, false ); combineReadJob = TDEIO::get( splURL, false, false );
connect(combineReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(combineReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(combineSplitFileDataReceived(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(combineSplitFileDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)), connect(combineReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineSplitFileFinished(KIO::Job *))); this, TQT_SLOT(combineSplitFileFinished(TDEIO::Job *)));
} }
exec(); exec();
} }
void Combiner::combineSplitFileDataReceived(KIO::Job *, const TQByteArray &byteArray) void Combiner::combineSplitFileDataReceived(TDEIO::Job *, const TQByteArray &byteArray)
{ {
splitFile += TQString( byteArray ); splitFile += TQString( byteArray );
} }
void Combiner::combineSplitFileFinished(KIO::Job *job) void Combiner::combineSplitFileFinished(TDEIO::Job *job)
{ {
combineReadJob = 0; combineReadJob = 0;
TQString error; TQString error;
@ -195,19 +195,19 @@ void Combiner::openNextFile()
} }
/* creating a write job */ /* creating a write job */
combineReadJob = KIO::get( readURL, false, false ); combineReadJob = TDEIO::get( readURL, false, false );
connect(combineReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(combineReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(combineDataReceived(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(combineDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)), connect(combineReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineReceiveFinished(KIO::Job *))); this, TQT_SLOT(combineReceiveFinished(TDEIO::Job *)));
if( hasValidSplitFile ) if( hasValidSplitFile )
connect(combineReadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), connect(combineReadJob, TQT_SIGNAL(percent (TDEIO::Job *, unsigned long)),
this, TQT_SLOT(combineWritePercent(KIO::Job *, unsigned long))); this, TQT_SLOT(combineWritePercent(TDEIO::Job *, unsigned long)));
} }
void Combiner::combineDataReceived(KIO::Job *, const TQByteArray &byteArray) void Combiner::combineDataReceived(TDEIO::Job *, const TQByteArray &byteArray)
{ {
if( byteArray.size() == 0 ) if( byteArray.size() == 0 )
return; return;
@ -226,12 +226,12 @@ void Combiner::combineDataReceived(KIO::Job *, const TQByteArray &byteArray)
else if( unixNaming ) else if( unixNaming )
writeURL.setFileName( baseURL.fileName() + ".out" ); writeURL.setFileName( baseURL.fileName() + ".out" );
combineWriteJob = KIO::put( writeURL, permissions, true, false, false ); combineWriteJob = TDEIO::put( writeURL, permissions, true, false, false );
connect(combineWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)), connect(combineWriteJob, TQT_SIGNAL(dataReq(TDEIO::Job *, TQByteArray &)),
this, TQT_SLOT(combineDataSend(KIO::Job *, TQByteArray &))); this, TQT_SLOT(combineDataSend(TDEIO::Job *, TQByteArray &)));
connect(combineWriteJob, TQT_SIGNAL(result(KIO::Job*)), connect(combineWriteJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineSendFinished(KIO::Job *))); this, TQT_SLOT(combineSendFinished(TDEIO::Job *)));
} }
if( combineWriteJob ) if( combineWriteJob )
@ -241,7 +241,7 @@ void Combiner::combineDataReceived(KIO::Job *, const TQByteArray &byteArray)
} }
} }
void Combiner::combineReceiveFinished(KIO::Job *job) void Combiner::combineReceiveFinished(TDEIO::Job *job)
{ {
combineReadJob = 0; /* KIO automatically deletes the object after Finished signal */ combineReadJob = 0; /* KIO automatically deletes the object after Finished signal */
@ -274,7 +274,7 @@ void Combiner::combineReceiveFinished(KIO::Job *job)
openNextFile(); openNextFile();
} }
void Combiner::combineDataSend(KIO::Job *, TQByteArray &byteArray) void Combiner::combineDataSend(TDEIO::Job *, TQByteArray &byteArray)
{ {
byteArray = transferArray; byteArray = transferArray;
transferArray = TQByteArray(); transferArray = TQByteArray();
@ -286,7 +286,7 @@ void Combiner::combineDataSend(KIO::Job *, TQByteArray &byteArray)
} }
} }
void Combiner::combineSendFinished(KIO::Job *job) void Combiner::combineSendFinished(TDEIO::Job *job)
{ {
combineWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ combineWriteJob = 0; /* KIO automatically deletes the object after Finished signal */
@ -319,7 +319,7 @@ void Combiner::combineAbortJobs()
combineReadJob = combineWriteJob = 0; combineReadJob = combineWriteJob = 0;
} }
void Combiner::combineWritePercent(KIO::Job *, unsigned long) void Combiner::combineWritePercent(TDEIO::Job *, unsigned long)
{ {
int percent = (int)((((double)receivedSize / expectedSize ) * 100. ) + 0.5 ); int percent = (int)((((double)receivedSize / expectedSize ) * 100. ) + 0.5 );
setProgress( percent ); setProgress( percent );

@ -58,15 +58,15 @@ private:
bool hasValidSplitFile; bool hasValidSplitFile;
TQString expectedFileName; TQString expectedFileName;
KIO::filesize_t expectedSize; TDEIO::filesize_t expectedSize;
TQString expectedCrcSum; TQString expectedCrcSum;
int fileCounter; int fileCounter;
int permissions; int permissions;
KIO::filesize_t receivedSize; TDEIO::filesize_t receivedSize;
KIO::TransferJob *combineReadJob; TDEIO::TransferJob *combineReadJob;
KIO::TransferJob *combineWriteJob; TDEIO::TransferJob *combineWriteJob;
bool unixNaming; bool unixNaming;
@ -77,13 +77,13 @@ public:
void combine(); void combine();
public slots: public slots:
void combineSplitFileDataReceived(KIO::Job *, const TQByteArray &byteArray); void combineSplitFileDataReceived(TDEIO::Job *, const TQByteArray &byteArray);
void combineSplitFileFinished(KIO::Job *job); void combineSplitFileFinished(TDEIO::Job *job);
void combineDataReceived(KIO::Job *, const TQByteArray &); void combineDataReceived(TDEIO::Job *, const TQByteArray &);
void combineReceiveFinished(KIO::Job *); void combineReceiveFinished(TDEIO::Job *);
void combineDataSend(KIO::Job *, TQByteArray &); void combineDataSend(TDEIO::Job *, TQByteArray &);
void combineSendFinished(KIO::Job *); void combineSendFinished(TDEIO::Job *);
void combineWritePercent(KIO::Job *, unsigned long); void combineWritePercent(TDEIO::Job *, unsigned long);
private: private:
void openNextFile(); void openNextFile();

@ -57,7 +57,7 @@ Splitter::~Splitter()
delete crcContext; delete crcContext;
} }
void Splitter::split( KIO::filesize_t splitSizeIn ) void Splitter::split( TDEIO::filesize_t splitSizeIn )
{ {
KFileItem file(KFileItem::Unknown, KFileItem::Unknown, fileName ); KFileItem file(KFileItem::Unknown, KFileItem::Unknown, fileName );
file.refresh(); file.refresh();
@ -78,14 +78,14 @@ void Splitter::split( KIO::filesize_t splitSizeIn )
fileSize = 0; fileSize = 0;
fileNumber = 0; fileNumber = 0;
splitReadJob = KIO::get( fileName, false, false ); splitReadJob = TDEIO::get( fileName, false, false );
connect(splitReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(splitReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(splitDataReceived(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(splitDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(splitReadJob, TQT_SIGNAL(result(KIO::Job*)), connect(splitReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(splitReceiveFinished(KIO::Job *))); this, TQT_SLOT(splitReceiveFinished(TDEIO::Job *)));
connect(splitReadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)), connect(splitReadJob, TQT_SIGNAL(percent (TDEIO::Job *, unsigned long)),
this, TQT_SLOT(splitReceivePercent(KIO::Job *, unsigned long))); this, TQT_SLOT(splitReceivePercent(TDEIO::Job *, unsigned long)));
splitWriteJob = 0; splitWriteJob = 0;
noValidWriteJob = true; noValidWriteJob = true;
@ -93,7 +93,7 @@ void Splitter::split( KIO::filesize_t splitSizeIn )
exec(); exec();
} }
void Splitter::splitDataReceived(KIO::Job *, const TQByteArray &byteArray) void Splitter::splitDataReceived(TDEIO::Job *, const TQByteArray &byteArray)
{ {
if( byteArray.size() == 0 ) if( byteArray.size() == 0 )
return; return;
@ -112,7 +112,7 @@ void Splitter::splitDataReceived(KIO::Job *, const TQByteArray &byteArray)
} }
} }
void Splitter::splitReceiveFinished(KIO::Job *job) void Splitter::splitReceiveFinished(TDEIO::Job *job)
{ {
splitReadJob = 0; /* KIO automatically deletes the object after Finished signal */ splitReadJob = 0; /* KIO automatically deletes the object after Finished signal */
@ -131,11 +131,11 @@ void Splitter::splitReceiveFinished(KIO::Job *job)
.rightJustify(8, '0'); .rightJustify(8, '0');
splitFile = TQString( "filename=%1\n" ).arg( fileName.fileName() )+ splitFile = TQString( "filename=%1\n" ).arg( fileName.fileName() )+
TQString( "size=%1\n" ) .arg( KIO::number( fileSize ) )+ TQString( "size=%1\n" ) .arg( TDEIO::number( fileSize ) )+
TQString( "crc32=%1\n" ) .arg( crcResult ); TQString( "crc32=%1\n" ) .arg( crcResult );
} }
void Splitter::splitReceivePercent (KIO::Job *, unsigned long percent) void Splitter::splitReceivePercent (TDEIO::Job *, unsigned long percent)
{ {
setProgress( percent ); setProgress( percent );
} }
@ -150,16 +150,16 @@ void Splitter::splitCreateWriteJob()
writeURL.addPath( outFileName ); writeURL.addPath( outFileName );
/* creating a write job */ /* creating a write job */
splitWriteJob = KIO::put( writeURL, permissions, true, false, false ); splitWriteJob = TDEIO::put( writeURL, permissions, true, false, false );
outputFileSize = 0; outputFileSize = 0;
connect(splitWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)), connect(splitWriteJob, TQT_SIGNAL(dataReq(TDEIO::Job *, TQByteArray &)),
this, TQT_SLOT(splitDataSend(KIO::Job *, TQByteArray &))); this, TQT_SLOT(splitDataSend(TDEIO::Job *, TQByteArray &)));
connect(splitWriteJob, TQT_SIGNAL(result(KIO::Job*)), connect(splitWriteJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(splitSendFinished(KIO::Job *))); this, TQT_SLOT(splitSendFinished(TDEIO::Job *)));
noValidWriteJob = false; noValidWriteJob = false;
} }
void Splitter::splitDataSend(KIO::Job *, TQByteArray &byteArray) void Splitter::splitDataSend(TDEIO::Job *, TQByteArray &byteArray)
{ {
int bufferLen = transferArray.size(); int bufferLen = transferArray.size();
@ -191,7 +191,7 @@ void Splitter::splitDataSend(KIO::Job *, TQByteArray &byteArray)
} }
} }
void Splitter::splitSendFinished(KIO::Job *job) void Splitter::splitSendFinished(TDEIO::Job *job)
{ {
splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */
@ -210,11 +210,11 @@ void Splitter::splitSendFinished(KIO::Job *job)
/* writing the split information file out */ /* writing the split information file out */
writeURL = destinationDir; writeURL = destinationDir;
writeURL.addPath( fileName.fileName() + ".crc" ); writeURL.addPath( fileName.fileName() + ".crc" );
splitWriteJob = KIO::put( writeURL, permissions, true, false, false ); splitWriteJob = TDEIO::put( writeURL, permissions, true, false, false );
connect(splitWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)), connect(splitWriteJob, TQT_SIGNAL(dataReq(TDEIO::Job *, TQByteArray &)),
this, TQT_SLOT(splitFileSend(KIO::Job *, TQByteArray &))); this, TQT_SLOT(splitFileSend(TDEIO::Job *, TQByteArray &)));
connect(splitWriteJob, TQT_SIGNAL(result(KIO::Job*)), connect(splitWriteJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(splitFileFinished(KIO::Job *))); this, TQT_SLOT(splitFileFinished(TDEIO::Job *)));
} }
} }
@ -228,14 +228,14 @@ void Splitter::splitAbortJobs()
splitReadJob = splitWriteJob = 0; splitReadJob = splitWriteJob = 0;
} }
void Splitter::splitFileSend(KIO::Job *, TQByteArray &byteArray) void Splitter::splitFileSend(TDEIO::Job *, TQByteArray &byteArray)
{ {
const char *content = splitFile.ascii(); const char *content = splitFile.ascii();
byteArray.duplicate( content, strlen ( content ) ); byteArray.duplicate( content, strlen ( content ) );
splitFile = ""; splitFile = "";
} }
void Splitter::splitFileFinished(KIO::Job *job) void Splitter::splitFileFinished(TDEIO::Job *job)
{ {
splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */ splitWriteJob = 0; /* KIO automatically deletes the object after Finished signal */

@ -45,40 +45,40 @@ class Splitter : public TQProgressDialog
private: private:
KURL fileName; KURL fileName;
KURL destinationDir; KURL destinationDir;
KIO::filesize_t splitSize; TDEIO::filesize_t splitSize;
KIO::filesize_t fileSize; TDEIO::filesize_t fileSize;
int permissions; int permissions;
TQString splitFile; TQString splitFile;
KURL writeURL; KURL writeURL;
int fileNumber; int fileNumber;
KIO::filesize_t outputFileSize; TDEIO::filesize_t outputFileSize;
bool noValidWriteJob; bool noValidWriteJob;
CRC32 *crcContext; CRC32 *crcContext;
TQByteArray transferArray; TQByteArray transferArray;
KIO::TransferJob *splitReadJob; TDEIO::TransferJob *splitReadJob;
KIO::TransferJob *splitWriteJob; TDEIO::TransferJob *splitWriteJob;
public: public:
Splitter( TQWidget* parent, KURL fileNameIn, KURL destinationDirIn ); Splitter( TQWidget* parent, KURL fileNameIn, KURL destinationDirIn );
~Splitter(); ~Splitter();
void split( KIO::filesize_t splitSizeIn ); void split( TDEIO::filesize_t splitSizeIn );
private: private:
void splitCreateWriteJob(); void splitCreateWriteJob();
void splitAbortJobs(); void splitAbortJobs();
public slots: public slots:
void splitDataReceived(KIO::Job *, const TQByteArray &); void splitDataReceived(TDEIO::Job *, const TQByteArray &);
void splitDataSend(KIO::Job *, TQByteArray &); void splitDataSend(TDEIO::Job *, TQByteArray &);
void splitSendFinished(KIO::Job *); void splitSendFinished(TDEIO::Job *);
void splitReceiveFinished(KIO::Job *); void splitReceiveFinished(TDEIO::Job *);
void splitReceivePercent (KIO::Job *, unsigned long); void splitReceivePercent (TDEIO::Job *, unsigned long);
void splitFileSend(KIO::Job *, TQByteArray &); void splitFileSend(TDEIO::Job *, TQByteArray &);
void splitFileFinished(KIO::Job *); void splitFileFinished(TDEIO::Job *);
}; };
#endif /* __SPLITTER_H__ */ #endif /* __SPLITTER_H__ */

@ -44,7 +44,7 @@
struct PredefinedDevice struct PredefinedDevice
{ {
TQString name; TQString name;
KIO::filesize_t capacity; TDEIO::filesize_t capacity;
}; };
class SplitterSpinBox : public TQSpinBox class SplitterSpinBox : public TQSpinBox
@ -52,8 +52,8 @@ struct PredefinedDevice
Q_OBJECT Q_OBJECT
private: private:
KIO::filesize_t division; TDEIO::filesize_t division;
KIO::filesize_t value; TDEIO::filesize_t value;
public: public:
SplitterSpinBox ( TQWidget * parent = 0, const char * name = 0 ) : TQSpinBox( parent, name ), division( 1 ), value( 1 ) SplitterSpinBox ( TQWidget * parent = 0, const char * name = 0 ) : TQSpinBox( parent, name ), division( 1 ), value( 1 )
@ -64,15 +64,15 @@ struct PredefinedDevice
setValidator ( dval ); setValidator ( dval );
} }
void setLongValue( KIO::filesize_t valueIn ) { void setLongValue( TDEIO::filesize_t valueIn ) {
value = valueIn; value = valueIn;
if( value == 0 ) if( value == 0 )
value++; value++;
updateDisplay(); updateDisplay();
} }
KIO::filesize_t longValue() { TDEIO::filesize_t longValue() {
KIO::filesize_t val = (KIO::filesize_t)( division * text().toDouble() + 0.5 ) ; TDEIO::filesize_t val = (TDEIO::filesize_t)( division * text().toDouble() + 0.5 ) ;
if( val == 0 ) if( val == 0 )
val++; val++;
return val; return val;
@ -82,12 +82,12 @@ struct PredefinedDevice
{ {
TQString frac(""); TQString frac("");
KIO::filesize_t int_part = value / division; TDEIO::filesize_t int_part = value / division;
KIO::filesize_t frac_mod = value % division; TDEIO::filesize_t frac_mod = value % division;
if( frac_mod ) if( frac_mod )
{ {
KIO::filesize_t frac_part = (KIO::filesize_t)((1000. * frac_mod) /division + 0.5); TDEIO::filesize_t frac_part = (TDEIO::filesize_t)((1000. * frac_mod) /division + 0.5);
if( frac_part ) if( frac_part )
{ {
@ -111,7 +111,7 @@ struct PredefinedDevice
return value; return value;
} }
void setDivision( KIO::filesize_t div ) void setDivision( TDEIO::filesize_t div )
{ {
division = div; division = div;
updateDisplay(); updateDisplay();
@ -147,7 +147,7 @@ class SplitterGUI : TQDialog
private: private:
int predefinedDeviceNum; int predefinedDeviceNum;
KIO::filesize_t userDefinedSize; TDEIO::filesize_t userDefinedSize;
int lastSelectedDevice; int lastSelectedDevice;
int resultCode; int resultCode;
@ -162,7 +162,7 @@ public:
SplitterGUI( TQWidget* parent, KURL fileURL, KURL defaultDir ); SplitterGUI( TQWidget* parent, KURL fileURL, KURL defaultDir );
KURL getDestinationDir() {return vfs::fromPathOrURL( urlReq->url() );} KURL getDestinationDir() {return vfs::fromPathOrURL( urlReq->url() );}
KIO::filesize_t getSplitSize() {return spinBox->longValue();} TDEIO::filesize_t getSplitSize() {return spinBox->longValue();}
int result() {return resultCode;} int result() {return resultCode;}
public slots: public slots:

@ -191,7 +191,7 @@ void FeedToListBoxDialog::slotOk() {
KMessageBox::error( parentWidget(), i18n( "Cannot open %1!" ).arg( url.prettyURL() ) ); KMessageBox::error( parentWidget(), i18n( "Cannot open %1!" ).arg( url.prettyURL() ) );
return; return;
} }
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 ); v.vfs_addFiles( &urlList, TDEIO::CopyJob::Copy, 0 );
ACTIVE_MNG->slotNewTab(url.prettyURL()); ACTIVE_MNG->slotNewTab(url.prettyURL());
accepted = true; accepted = true;
accept(); accept();

@ -37,9 +37,9 @@
#include <klocale.h> #include <klocale.h>
SynchronizeDialog::SynchronizeDialog( TQWidget* parent, const char* name, bool modal, WFlags fl, SynchronizeDialog::SynchronizeDialog( TQWidget* parent, const char* name, bool modal, WFlags fl,
Synchronizer *sync, int pleftCopyNr, KIO::filesize_t pleftCopySize, Synchronizer *sync, int pleftCopyNr, TDEIO::filesize_t pleftCopySize,
int prightCopyNr, KIO::filesize_t prightCopySize, int pdeleteNr, int prightCopyNr, TDEIO::filesize_t prightCopySize, int pdeleteNr,
KIO::filesize_t pdeleteSize, int parThreads ) : TQDialog( parent, name, modal, fl ), TDEIO::filesize_t pdeleteSize, int parThreads ) : TQDialog( parent, name, modal, fl ),
synchronizer( sync ), leftCopyNr ( pleftCopyNr ), synchronizer( sync ), leftCopyNr ( pleftCopyNr ),
leftCopySize( pleftCopySize ), rightCopyNr ( prightCopyNr ), leftCopySize( pleftCopySize ), rightCopyNr ( prightCopyNr ),
rightCopySize( prightCopySize ), deleteNr( pdeleteNr ), rightCopySize( prightCopySize ), deleteNr( pdeleteNr ),
@ -135,8 +135,8 @@ void SynchronizeDialog::startSynchronization()
btnStart->setEnabled( false ); btnStart->setEnabled( false );
btnPause->setEnabled( syncStarted = true ); btnPause->setEnabled( syncStarted = true );
connect( synchronizer, TQT_SIGNAL( synchronizationFinished() ), this, TQT_SLOT( synchronizationFinished() ) ); connect( synchronizer, TQT_SIGNAL( synchronizationFinished() ), this, TQT_SLOT( synchronizationFinished() ) );
connect( synchronizer, TQT_SIGNAL( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ) ), connect( synchronizer, TQT_SIGNAL( processedSizes( int, TDEIO::filesize_t, int, TDEIO::filesize_t, int, TDEIO::filesize_t ) ),
this, TQT_SLOT( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t) ) ); this, TQT_SLOT( processedSizes( int, TDEIO::filesize_t, int, TDEIO::filesize_t, int, TDEIO::filesize_t) ) );
connect( synchronizer, TQT_SIGNAL( pauseAccepted() ), this, TQT_SLOT( pauseAccepted() ) ); connect( synchronizer, TQT_SIGNAL( pauseAccepted() ), this, TQT_SLOT( pauseAccepted() ) );
if( !cbRightToLeft->isChecked() ) leftCopySize = 0; if( !cbRightToLeft->isChecked() ) leftCopySize = 0;
@ -152,8 +152,8 @@ void SynchronizeDialog::synchronizationFinished()
TQDialog::reject(); TQDialog::reject();
} }
void SynchronizeDialog::processedSizes( int leftNr, KIO::filesize_t leftSize, int rightNr, void SynchronizeDialog::processedSizes( int leftNr, TDEIO::filesize_t leftSize, int rightNr,
KIO::filesize_t rightSize, int delNr, KIO::filesize_t delSize ) TDEIO::filesize_t rightSize, int delNr, TDEIO::filesize_t delSize )
{ {
lbRightToLeft->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( leftNr ).arg( leftCopyNr ) lbRightToLeft->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( leftNr ).arg( leftCopyNr )
.arg( KRpermHandler::parseSize( leftSize ).stripWhiteSpace() ) .arg( KRpermHandler::parseSize( leftSize ).stripWhiteSpace() )
@ -165,8 +165,8 @@ void SynchronizeDialog::processedSizes( int leftNr, KIO::filesize_t leftSize, in
.arg( KRpermHandler::parseSize( delSize ).stripWhiteSpace() ) .arg( KRpermHandler::parseSize( delSize ).stripWhiteSpace() )
.arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ) ); .arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ) );
KIO::filesize_t totalSum = leftCopySize + rightCopySize + deleteSize; TDEIO::filesize_t totalSum = leftCopySize + rightCopySize + deleteSize;
KIO::filesize_t processedSum = leftSize + rightSize + delSize; TDEIO::filesize_t processedSum = leftSize + rightSize + delSize;
if( totalSum == 0 ) if( totalSum == 0 )
totalSum++; totalSum++;

@ -46,7 +46,7 @@ class SynchronizeDialog : TQDialog
public: public:
SynchronizeDialog( TQWidget*, const char*, bool, WFlags, Synchronizer *sync, SynchronizeDialog( TQWidget*, const char*, bool, WFlags, Synchronizer *sync,
int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t, int); int, TDEIO::filesize_t, int, TDEIO::filesize_t, int, TDEIO::filesize_t, int);
~SynchronizeDialog(); ~SynchronizeDialog();
inline bool wasSyncronizationStarted() { return syncStarted; } inline bool wasSyncronizationStarted() { return syncStarted; }
@ -54,7 +54,7 @@ class SynchronizeDialog : TQDialog
public slots: public slots:
void startSynchronization(); void startSynchronization();
void synchronizationFinished(); void synchronizationFinished();
void processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t); void processedSizes( int, TDEIO::filesize_t, int, TDEIO::filesize_t, int, TDEIO::filesize_t);
void pauseOrResume(); void pauseOrResume();
void pauseAccepted(); void pauseAccepted();
@ -77,11 +77,11 @@ class SynchronizeDialog : TQDialog
Synchronizer *synchronizer; Synchronizer *synchronizer;
int leftCopyNr; int leftCopyNr;
KIO::filesize_t leftCopySize; TDEIO::filesize_t leftCopySize;
int rightCopyNr; int rightCopyNr;
KIO::filesize_t rightCopySize; TDEIO::filesize_t rightCopySize;
int deleteNr; int deleteNr;
KIO::filesize_t deleteSize; TDEIO::filesize_t deleteSize;
int parallelThreads; int parallelThreads;

@ -355,7 +355,7 @@ TQString Synchronizer::getTaskTypeName( TaskType taskType )
SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *parent, const TQString &leftFile, SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *parent, const TQString &leftFile,
const TQString &rightFile, const TQString &leftDir, const TQString &rightFile, const TQString &leftDir,
const TQString &rightDir, bool existsLeft, bool existsRight, const TQString &rightDir, bool existsLeft, bool existsRight,
KIO::filesize_t leftSize, KIO::filesize_t rightSize, TDEIO::filesize_t leftSize, TDEIO::filesize_t rightSize,
time_t leftDate, time_t rightDate, const TQString &leftLink, time_t leftDate, time_t rightDate, const TQString &leftLink,
const TQString &rightLink, const TQString &leftOwner, const TQString &rightLink, const TQString &leftOwner,
const TQString &rightOwner, const TQString &leftGroup, const TQString &rightOwner, const TQString &leftGroup,
@ -420,7 +420,7 @@ void Synchronizer::setPermanent( SynchronizerFileItem *item )
} }
SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *parent, SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *parent,
const TQString &file_name, const TQString &dir, KIO::filesize_t size, const TQString &file_name, const TQString &dir, TDEIO::filesize_t size,
time_t date, const TQString &link, const TQString &owner, time_t date, const TQString &link, const TQString &owner,
const TQString &group, mode_t mode, const TQString &acl, bool isDir, const TQString &group, mode_t mode, const TQString &acl, bool isDir,
bool isTemp ) bool isTemp )
@ -431,7 +431,7 @@ SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *pare
} }
SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *parent, SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *parent,
const TQString &file_name, const TQString &dir, KIO::filesize_t size, const TQString &file_name, const TQString &dir, TDEIO::filesize_t size,
time_t date, const TQString &link, const TQString &owner, time_t date, const TQString &link, const TQString &owner,
const TQString &group, mode_t mode, const TQString &acl, bool isDir, const TQString &group, mode_t mode, const TQString &acl, bool isDir,
bool isTemp ) bool isTemp )
@ -444,7 +444,7 @@ SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *par
SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *parent, SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *parent,
const TQString &leftName, const TQString &rightName, const TQString &leftName, const TQString &rightName,
const TQString &leftDir, const TQString &rightDir, const TQString &leftDir, const TQString &rightDir,
KIO::filesize_t leftSize, KIO::filesize_t rightSize, time_t leftDate, time_t rightDate, TDEIO::filesize_t leftSize, TDEIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
const TQString &leftLink, const TQString &rightLink, const TQString &leftLink, const TQString &rightLink,
const TQString &leftOwner, const TQString &rightOwner, const TQString &leftOwner, const TQString &rightOwner,
const TQString &leftGroup, const TQString &rightGroup, const TQString &leftGroup, const TQString &rightGroup,
@ -797,8 +797,8 @@ void Synchronizer::copyToRight( SynchronizerFileItem *item )
} }
} }
bool Synchronizer::totalSizes( int * leftCopyNr, KIO::filesize_t *leftCopySize, int * rightCopyNr, bool Synchronizer::totalSizes( int * leftCopyNr, TDEIO::filesize_t *leftCopySize, int * rightCopyNr,
KIO::filesize_t *rightCopySize, int *deleteNr, KIO::filesize_t *deletableSize ) TDEIO::filesize_t *rightCopySize, int *deleteNr, TDEIO::filesize_t *deletableSize )
{ {
bool hasAnythingToDo = false; bool hasAnythingToDo = false;
@ -953,8 +953,8 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
case TT_COPY_TO_LEFT: case TT_COPY_TO_LEFT:
if( task->isDir() ) if( task->isDir() )
{ {
KIO::SimpleJob *job = KIO::mkdir( leftURL ); TDEIO::SimpleJob *job = TDEIO::mkdir( leftURL );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
disableNewTasks = true; disableNewTasks = true;
} }
@ -965,16 +965,16 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
destURL = vfs::fromPathOrURL( task->destination() ); destURL = vfs::fromPathOrURL( task->destination() );
if( task->rightLink().isNull() ) { if( task->rightLink().isNull() ) {
KIO::FileCopyJob *job = KIO::file_copy(rightURL, destURL, -1, TDEIO::FileCopyJob *job = TDEIO::file_copy(rightURL, destURL, -1,
overWrite || task->overWrite(), false, false ); overWrite || task->overWrite(), false, false );
connect(job,TQT_SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this, connect(job,TQT_SIGNAL(processedSize (TDEIO::Job *, TDEIO::filesize_t )), this,
TQT_SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t ))); TQT_SLOT (slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t )));
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
} else { } else {
KIO::SimpleJob *job = KIO::symlink( task->rightLink(), destURL, TDEIO::SimpleJob *job = TDEIO::symlink( task->rightLink(), destURL,
overWrite || task->overWrite(), false ); overWrite || task->overWrite(), false );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
} }
} }
@ -982,8 +982,8 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
case TT_COPY_TO_RIGHT: case TT_COPY_TO_RIGHT:
if( task->isDir() ) if( task->isDir() )
{ {
KIO::SimpleJob *job = KIO::mkdir( rightURL ); TDEIO::SimpleJob *job = TDEIO::mkdir( rightURL );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
disableNewTasks = true; disableNewTasks = true;
} }
@ -994,24 +994,24 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
destURL = vfs::fromPathOrURL( task->destination() ); destURL = vfs::fromPathOrURL( task->destination() );
if( task->leftLink().isNull() ) { if( task->leftLink().isNull() ) {
KIO::FileCopyJob *job = KIO::file_copy(leftURL, destURL, -1, TDEIO::FileCopyJob *job = TDEIO::file_copy(leftURL, destURL, -1,
overWrite || task->overWrite(), false, false ); overWrite || task->overWrite(), false, false );
connect(job,TQT_SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this, connect(job,TQT_SIGNAL(processedSize (TDEIO::Job *, TDEIO::filesize_t )), this,
TQT_SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t ))); TQT_SLOT (slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t )));
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
} else { } else {
KIO::SimpleJob *job = KIO::symlink( task->leftLink(), destURL, TDEIO::SimpleJob *job = TDEIO::symlink( task->leftLink(), destURL,
overWrite || task->overWrite(), false ); overWrite || task->overWrite(), false );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
} }
} }
break; break;
case TT_DELETE: case TT_DELETE:
{ {
KIO::DeleteJob *job = KIO::del( leftURL, false ); TDEIO::DeleteJob *job = TDEIO::del( leftURL, false );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(slotTaskFinished(TDEIO::Job*)));
jobMap[ job ] = task; jobMap[ job ] = task;
} }
break; break;
@ -1020,14 +1020,14 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
} }
} }
void Synchronizer::slotTaskFinished(KIO::Job *job ) void Synchronizer::slotTaskFinished(TDEIO::Job *job )
{ {
inTaskFinished++; inTaskFinished++;
SynchronizerFileItem * item = jobMap[ job ]; SynchronizerFileItem * item = jobMap[ job ];
jobMap.remove( job ); jobMap.remove( job );
KIO::filesize_t receivedSize = 0; TDEIO::filesize_t receivedSize = 0;
if( receivedMap.contains( job ) ) { if( receivedMap.contains( job ) ) {
receivedSize = receivedMap[ job ]; receivedSize = receivedMap[ job ];
@ -1135,9 +1135,9 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
} }
else else
{ {
if( job->error() == KIO::ERR_FILE_ALREADY_EXIST && item->task() != TT_DELETE ) if( job->error() == TDEIO::ERR_FILE_ALREADY_EXIST && item->task() != TT_DELETE )
{ {
KIO::RenameDlg_Result result; TDEIO::RenameDlg_Result result;
TQString newDest; TQString newDest;
if( autoSkip ) if( autoSkip )
@ -1150,7 +1150,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"), result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"),
vfs::pathOrURL( rightURL ), vfs::pathOrURL( leftURL ), vfs::pathOrURL( rightURL ), vfs::pathOrURL( leftURL ),
(KIO::RenameDlg_Mode)( KIO::M_OVERWRITE | KIO::M_SKIP | KIO::M_MULTI ), newDest, (TDEIO::RenameDlg_Mode)( TDEIO::M_OVERWRITE | TDEIO::M_SKIP | TDEIO::M_MULTI ), newDest,
item->rightSize(), item->leftSize(), (time_t)-1, (time_t)-1, item->rightSize(), item->leftSize(), (time_t)-1, (time_t)-1,
item->rightDate(), item->leftDate()); item->rightDate(), item->leftDate());
@ -1163,7 +1163,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"), result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"),
vfs::pathOrURL( leftURL ), vfs::pathOrURL( rightURL ), vfs::pathOrURL( leftURL ), vfs::pathOrURL( rightURL ),
(KIO::RenameDlg_Mode)( KIO::M_OVERWRITE | KIO::M_SKIP | KIO::M_MULTI ), newDest, (TDEIO::RenameDlg_Mode)( TDEIO::M_OVERWRITE | TDEIO::M_SKIP | TDEIO::M_MULTI ), newDest,
item->leftSize(), item->rightSize(), (time_t)-1, (time_t)-1, item->leftSize(), item->rightSize(), (time_t)-1, (time_t)-1,
item->leftDate(), item->rightDate()); item->leftDate(), item->rightDate());
@ -1172,31 +1172,31 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
switch ( result ) switch ( result )
{ {
case KIO::R_RENAME: case TDEIO::R_RENAME:
item->setDestination( newDest ); item->setDestination( newDest );
executeTask( item ); executeTask( item );
inTaskFinished--; inTaskFinished--;
return; return;
case KIO::R_OVERWRITE: case TDEIO::R_OVERWRITE:
item->setOverWrite(); item->setOverWrite();
executeTask( item ); executeTask( item );
inTaskFinished--; inTaskFinished--;
return; return;
case KIO::R_OVERWRITE_ALL: case TDEIO::R_OVERWRITE_ALL:
overWrite = true; overWrite = true;
executeTask( item ); executeTask( item );
inTaskFinished--; inTaskFinished--;
return; return;
case KIO::R_AUTO_SKIP: case TDEIO::R_AUTO_SKIP:
autoSkip = true; autoSkip = true;
case KIO::R_SKIP: case TDEIO::R_SKIP:
default: default:
break; break;
} }
break; break;
} }
if( job->error() != KIO::ERR_DOES_NOT_EXIST || item->task() != TT_DELETE ) if( job->error() != TDEIO::ERR_DOES_NOT_EXIST || item->task() != TT_DELETE )
{ {
if( autoSkip ) if( autoSkip )
break; break;
@ -1225,17 +1225,17 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
TQWidget *mainWidget = tqApp->mainWidget(); // WORKAROUND, don't give focus to the main widget TQWidget *mainWidget = tqApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
tqApp->setMainWidget( syncDlgWidget ); tqApp->setMainWidget( syncDlgWidget );
KIO::SkipDlg_Result result = Observer::self()->open_SkipDlg( job, true, error ); TDEIO::SkipDlg_Result result = Observer::self()->open_SkipDlg( job, true, error );
tqApp->setMainWidget( mainWidget ); tqApp->setMainWidget( mainWidget );
switch( result ) switch( result )
{ {
case KIO::S_CANCEL: case TDEIO::S_CANCEL:
executeTask( item ); /* simply retry */ executeTask( item ); /* simply retry */
inTaskFinished--; inTaskFinished--;
return; return;
case KIO::S_AUTO_SKIP: case TDEIO::S_AUTO_SKIP:
autoSkip = true; autoSkip = true;
default: default:
break; break;
@ -1272,12 +1272,12 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
} }
} }
void Synchronizer::slotProcessedSize( KIO::Job * job , KIO::filesize_t size) void Synchronizer::slotProcessedSize( TDEIO::Job * job , TDEIO::filesize_t size)
{ {
KIO::filesize_t dl = 0, dr = 0, dd = 0; TDEIO::filesize_t dl = 0, dr = 0, dd = 0;
SynchronizerFileItem * item = jobMap[ job ]; SynchronizerFileItem * item = jobMap[ job ];
KIO::filesize_t lastProcessedSize = 0; TDEIO::filesize_t lastProcessedSize = 0;
if( receivedMap.contains( job ) ) if( receivedMap.contains( job ) )
lastProcessedSize = receivedMap[ job ]; lastProcessedSize = receivedMap[ job ];

@ -65,7 +65,7 @@ class Synchronizer : public TQObject
void stop() {stopped = true;} void stop() {stopped = true;}
void setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del ); void setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del );
int refresh( bool nostatus=false ); int refresh( bool nostatus=false );
bool totalSizes( int *, KIO::filesize_t *, int *, KIO::filesize_t *, int *, KIO::filesize_t * ); bool totalSizes( int *, TDEIO::filesize_t *, int *, TDEIO::filesize_t *, int *, TDEIO::filesize_t * );
void synchronize( TQWidget *,bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled, void synchronize( TQWidget *,bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled,
bool overWrite, int parThreads ); bool overWrite, int parThreads );
void synchronizeWithKGet(); void synchronizeWithKGet();
@ -95,13 +95,13 @@ class Synchronizer : public TQObject
void comparedFileData( SynchronizerFileItem * ); void comparedFileData( SynchronizerFileItem * );
void markChanged( SynchronizerFileItem *, bool ); void markChanged( SynchronizerFileItem *, bool );
void synchronizationFinished(); void synchronizationFinished();
void processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ); void processedSizes( int, TDEIO::filesize_t, int, TDEIO::filesize_t, int, TDEIO::filesize_t );
void pauseAccepted(); void pauseAccepted();
void statusInfo( TQString ); void statusInfo( TQString );
public slots: public slots:
void slotTaskFinished(KIO::Job*); void slotTaskFinished(TDEIO::Job*);
void slotProcessedSize( KIO::Job * , KIO::filesize_t ); void slotProcessedSize( TDEIO::Job * , TDEIO::filesize_t );
private: private:
bool isDir( const vfile * file ); bool isDir( const vfile * file );
@ -111,19 +111,19 @@ class Synchronizer : public TQObject
const TQString &leftDir, const TQString &rightDir ); const TQString &leftDir, const TQString &rightDir );
void addSingleDirectory( SynchronizerFileItem *, SynchronizerDirList *, const TQString &, bool ); void addSingleDirectory( SynchronizerFileItem *, SynchronizerDirList *, const TQString &, bool );
SynchronizerFileItem * addItem( SynchronizerFileItem *, const TQString &, const TQString &, SynchronizerFileItem * addItem( SynchronizerFileItem *, const TQString &, const TQString &,
const TQString &, const TQString &, bool, bool, KIO::filesize_t, const TQString &, const TQString &, bool, bool, TDEIO::filesize_t,
KIO::filesize_t, time_t, time_t, const TQString &, const TQString &, TDEIO::filesize_t, time_t, time_t, const TQString &, const TQString &,
const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &,
mode_t, mode_t, const TQString &, const TQString &, TaskType, bool, bool); mode_t, mode_t, const TQString &, const TQString &, TaskType, bool, bool);
SynchronizerFileItem * addLeftOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &, SynchronizerFileItem * addLeftOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &,
KIO::filesize_t, time_t, const TQString &, const TQString &, TDEIO::filesize_t, time_t, const TQString &, const TQString &,
const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false ); const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false );
SynchronizerFileItem * addRightOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &, SynchronizerFileItem * addRightOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &,
KIO::filesize_t, time_t, const TQString &, const TQString &, TDEIO::filesize_t, time_t, const TQString &, const TQString &,
const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false ); const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false );
SynchronizerFileItem * addDuplicateItem( SynchronizerFileItem *, const TQString &, const TQString &, SynchronizerFileItem * addDuplicateItem( SynchronizerFileItem *, const TQString &, const TQString &,
const TQString &, const TQString &, KIO::filesize_t, const TQString &, const TQString &, TDEIO::filesize_t,
KIO::filesize_t, time_t, time_t, const TQString &, TDEIO::filesize_t, time_t, time_t, const TQString &,
const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &,
const TQString &, const TQString &, mode_t, mode_t, const TQString &, const TQString &, const TQString &, mode_t, mode_t, const TQString &,
const TQString &, bool isDir = false, bool isTemp = false ); const TQString &, bool isDir = false, bool isTemp = false );
@ -183,17 +183,17 @@ class Synchronizer : public TQObject
int rightCopyNr; // the file number copied to right int rightCopyNr; // the file number copied to right
int deleteNr; // the number of the deleted files int deleteNr; // the number of the deleted files
int parallelThreads;// the number of the parallel procesing threads int parallelThreads;// the number of the parallel procesing threads
KIO::filesize_t leftCopySize; // the total size copied to left TDEIO::filesize_t leftCopySize; // the total size copied to left
KIO::filesize_t rightCopySize; // the total size copied to right TDEIO::filesize_t rightCopySize; // the total size copied to right
KIO::filesize_t deleteSize; // the size of the deleted files TDEIO::filesize_t deleteSize; // the size of the deleted files
int comparedDirs; // the number of the compared directories int comparedDirs; // the number of the compared directories
int fileCount; // the number of counted files int fileCount; // the number of counted files
private: private:
TQPtrList<SynchronizerTask> stack; // stack for comparing TQPtrList<SynchronizerTask> stack; // stack for comparing
TQMap<KIO::Job *,SynchronizerFileItem *> jobMap; // job maps TQMap<TDEIO::Job *,SynchronizerFileItem *> jobMap; // job maps
TQMap<KIO::Job *,KIO::filesize_t> receivedMap; // the received file size TQMap<TDEIO::Job *,TDEIO::filesize_t> receivedMap; // the received file size
SynchronizerFileItem *lastTask; // reference to the last stack SynchronizerFileItem *lastTask; // reference to the last stack
int inTaskFinished; // counter of quasy 'threads' in slotTaskFinished int inTaskFinished; // counter of quasy 'threads' in slotTaskFinished

@ -153,11 +153,11 @@ bool SynchronizerDirList::load( const TQString &urlIn, bool wait ) {
emit finished( result = true ); emit finished( result = true );
return true; return true;
} else { } else {
KIO::Job *job = KIO::listDir( url, false, true ); TDEIO::Job *job = TDEIO::listDir( url, false, true );
connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); this, TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
this, TQT_SLOT( slotListResult( KIO::Job* ) ) ); this, TQT_SLOT( slotListResult( TDEIO::Job* ) ) );
busy = true; busy = true;
if( !wait ) if( !wait )
@ -169,20 +169,20 @@ bool SynchronizerDirList::load( const TQString &urlIn, bool wait ) {
} }
} }
void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList& entries ) void SynchronizerDirList::slotEntries( TDEIO::Job * job, const TDEIO::UDSEntryList& entries )
{ {
KIO::UDSEntryListConstIterator it = entries.begin(); TDEIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end(); TDEIO::UDSEntryListConstIterator end = entries.end();
int rwx = -1; int rwx = -1;
TQString prot = (( KIO::ListJob *)job )->url().protocol(); TQString prot = (( TDEIO::ListJob *)job )->url().protocol();
if( prot == "krarc" || prot == "tar" || prot == "zip" ) if( prot == "krarc" || prot == "tar" || prot == "zip" )
rwx = PERM_ALL; rwx = PERM_ALL;
while( it != end ) while( it != end )
{ {
KFileItem kfi( *it, (( KIO::ListJob *)job )->url(), true, true ); KFileItem kfi( *it, (( TDEIO::ListJob *)job )->url(), true, true );
TQString key = kfi.text(); TQString key = kfi.text();
if( key != "." && key != ".." && (!ignoreHidden || !key.startsWith(".") ) ) { if( key != "." && key != ".." && (!ignoreHidden || !key.startsWith(".") ) ) {
mode_t mode = kfi.mode() | kfi.permissions(); mode_t mode = kfi.mode() | kfi.permissions();
@ -190,7 +190,7 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
if ( kfi.isDir() ) if ( kfi.isDir() )
perm[ 0 ] = 'd'; perm[ 0 ] = 'd';
vfile *item = new vfile( kfi.text(), kfi.size(), perm, kfi.time( KIO::UDS_MODIFICATION_TIME ), vfile *item = new vfile( kfi.text(), kfi.size(), perm, kfi.time( TDEIO::UDS_MODIFICATION_TIME ),
kfi.isLink(), kfi.user(), kfi.group(), kfi.user(), kfi.isLink(), kfi.user(), kfi.group(), kfi.user(),
kfi.mimetype(), kfi.linkDest(), mode, rwx kfi.mimetype(), kfi.linkDest(), mode, rwx
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL ) #if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
@ -203,7 +203,7 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
} }
} }
void SynchronizerDirList::slotListResult( KIO::Job *job ) { void SynchronizerDirList::slotListResult( TDEIO::Job *job ) {
busy = false; busy = false;
if ( job && job->error() ) { if ( job && job->error() ) {
job->showErrorDialog( parentWidget ); job->showErrorDialog( parentWidget );

@ -55,8 +55,8 @@ public:
public slots: public slots:
void slotEntries( KIO::Job * job, const KIO::UDSEntryList& entries ); void slotEntries( TDEIO::Job * job, const TDEIO::UDSEntryList& entries );
void slotListResult( KIO::Job *job ); void slotListResult( TDEIO::Job *job );
signals: signals:
void finished( bool err ); void finished( bool err );

@ -71,8 +71,8 @@ class SynchronizerFileItem
bool m_marked; // flag, indicates to show the file bool m_marked; // flag, indicates to show the file
bool m_existsLeft; // flag, the file exists in the left directory bool m_existsLeft; // flag, the file exists in the left directory
bool m_existsRight; // flag, the file exists in the right directory bool m_existsRight; // flag, the file exists in the right directory
KIO::filesize_t m_leftSize; // the file size at the left directory TDEIO::filesize_t m_leftSize; // the file size at the left directory
KIO::filesize_t m_rightSize; // the file size at the right directory TDEIO::filesize_t m_rightSize; // the file size at the right directory
time_t m_leftDate; // the file date at the left directory time_t m_leftDate; // the file date at the left directory
time_t m_rightDate; // the file date at the left directory time_t m_rightDate; // the file date at the left directory
TQString m_leftLink; // the left file's symbolic link destination TQString m_leftLink; // the left file's symbolic link destination
@ -96,8 +96,8 @@ class SynchronizerFileItem
public: public:
SynchronizerFileItem(const TQString &leftNam, const TQString &rightNam, const TQString &leftDir, SynchronizerFileItem(const TQString &leftNam, const TQString &rightNam, const TQString &leftDir,
const TQString &rightDir, bool mark, bool exL, bool exR, KIO::filesize_t leftSize, const TQString &rightDir, bool mark, bool exL, bool exR, TDEIO::filesize_t leftSize,
KIO::filesize_t rightSize, time_t leftDate, time_t rightDate, TDEIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
const TQString &leftLink, const TQString &rightLink, const TQString &leftOwner, const TQString &leftLink, const TQString &rightLink, const TQString &leftOwner,
const TQString &rightOwner, const TQString &leftGroup, const TQString &rightGroup, const TQString &rightOwner, const TQString &leftGroup, const TQString &rightGroup,
mode_t leftMode, mode_t rightMode, const TQString &leftACL, const TQString &rightACL, mode_t leftMode, mode_t rightMode, const TQString &leftACL, const TQString &rightACL,
@ -121,8 +121,8 @@ class SynchronizerFileItem
inline bool existsInLeft() {return m_existsLeft;} inline bool existsInLeft() {return m_existsLeft;}
inline bool existsInRight() {return m_existsRight;} inline bool existsInRight() {return m_existsRight;}
inline bool overWrite() {return m_overWrite;} inline bool overWrite() {return m_overWrite;}
inline KIO::filesize_t leftSize() {return m_leftSize;} inline TDEIO::filesize_t leftSize() {return m_leftSize;}
inline KIO::filesize_t rightSize() {return m_rightSize;} inline TDEIO::filesize_t rightSize() {return m_rightSize;}
inline time_t leftDate() {return m_leftDate;} inline time_t leftDate() {return m_leftDate;}
inline time_t rightDate() {return m_rightDate;} inline time_t rightDate() {return m_rightDate;}
inline const TQString & leftLink() {return m_leftLink;} inline const TQString & leftLink() {return m_leftLink;}
@ -157,7 +157,7 @@ class SynchronizerFileItem
inline void swap( bool asym=false ) {SWAP( m_existsLeft, m_existsRight, bool ); inline void swap( bool asym=false ) {SWAP( m_existsLeft, m_existsRight, bool );
SWAP( m_leftName, m_rightName, TQString ); SWAP( m_leftName, m_rightName, TQString );
SWAP( m_leftDirectory, m_rightDirectory, TQString ); SWAP( m_leftDirectory, m_rightDirectory, TQString );
SWAP( m_leftSize, m_rightSize, KIO::filesize_t ); SWAP( m_leftSize, m_rightSize, TDEIO::filesize_t );
SWAP( m_leftDate, m_rightDate, time_t ); SWAP( m_leftDate, m_rightDate, time_t );
SWAP( m_leftLink, m_rightLink, TQString ); SWAP( m_leftLink, m_rightLink, TQString );
SWAP( m_leftOwner, m_rightOwner, TQString ); SWAP( m_leftOwner, m_rightOwner, TQString );

@ -2135,7 +2135,7 @@ void SynchronizerGUI::refresh()
void SynchronizerGUI::synchronize() void SynchronizerGUI::synchronize()
{ {
int copyToLeftNr, copyToRightNr, deleteNr; int copyToLeftNr, copyToRightNr, deleteNr;
KIO::filesize_t copyToLeftSize, copyToRightSize, deleteSize; TDEIO::filesize_t copyToLeftSize, copyToRightSize, deleteSize;
if( !synchronizer.totalSizes( &copyToLeftNr, &copyToLeftSize, &copyToRightNr, &copyToRightSize, if( !synchronizer.totalSizes( &copyToLeftNr, &copyToLeftSize, &copyToRightNr, &copyToRightSize,
&deleteNr, &deleteSize ) ) &deleteNr, &deleteSize ) )

@ -107,7 +107,7 @@ void CompareTask::slotOtherFinished( bool result ) {
} }
CompareContentTask::CompareContentTask( Synchronizer *syn, SynchronizerFileItem *itemIn, const KURL &leftURLIn, CompareContentTask::CompareContentTask( Synchronizer *syn, SynchronizerFileItem *itemIn, const KURL &leftURLIn,
const KURL &rightURLIn, KIO::filesize_t sizeIn ) : SynchronizerTask(), const KURL &rightURLIn, TDEIO::filesize_t sizeIn ) : SynchronizerTask(),
leftURL( leftURLIn ), rightURL( rightURLIn ), leftURL( leftURLIn ), rightURL( rightURLIn ),
size( sizeIn ), errorPrinted(false), leftReadJob( 0 ), size( sizeIn ), errorPrinted(false), leftReadJob( 0 ),
rightReadJob( 0 ), compareArray(), item( itemIn ), timer( 0 ), rightReadJob( 0 ), compareArray(), item( itemIn ), timer( 0 ),
@ -149,17 +149,17 @@ void CompareContentTask::start() {
localFileCompareCycle(); localFileCompareCycle();
} else { } else {
leftReadJob = KIO::get( leftURL, false, false ); leftReadJob = TDEIO::get( leftURL, false, false );
rightReadJob = KIO::get( rightURL, false, false ); rightReadJob = TDEIO::get( rightURL, false, false );
connect(leftReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(leftReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotDataReceived(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(slotDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(rightReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(rightReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotDataReceived(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(slotDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(leftReadJob, TQT_SIGNAL(result(KIO::Job*)), connect(leftReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotFinished(KIO::Job *))); this, TQT_SLOT(slotFinished(TDEIO::Job *)));
connect(rightReadJob, TQT_SIGNAL(result(KIO::Job*)), connect(rightReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(slotFinished(KIO::Job *))); this, TQT_SLOT(slotFinished(TDEIO::Job *)));
rightReadJob->suspend(); rightReadJob->suspend();
@ -221,7 +221,7 @@ void CompareContentTask::localFileCompareCycle() {
} }
void CompareContentTask::slotDataReceived(KIO::Job *job, const TQByteArray &data) void CompareContentTask::slotDataReceived(TDEIO::Job *job, const TQByteArray &data)
{ {
int bufferLen = compareArray.size(); int bufferLen = compareArray.size();
int dataLen = data.size(); int dataLen = data.size();
@ -261,7 +261,7 @@ void CompareContentTask::slotDataReceived(KIO::Job *job, const TQByteArray &data
}while ( false ); }while ( false );
KIO::TransferJob *otherJob = ( job == leftReadJob ) ? rightReadJob : leftReadJob; TDEIO::TransferJob *otherJob = ( job == leftReadJob ) ? rightReadJob : leftReadJob;
if( otherJob == 0 ) if( otherJob == 0 )
{ {
@ -270,17 +270,17 @@ void CompareContentTask::slotDataReceived(KIO::Job *job, const TQByteArray &data
} }
else else
{ {
if( !((KIO::TransferJob *)job)->isSuspended() ) if( !((TDEIO::TransferJob *)job)->isSuspended() )
{ {
((KIO::TransferJob *)job)->suspend(); ((TDEIO::TransferJob *)job)->suspend();
otherJob->resume(); otherJob->resume();
} }
} }
} }
void CompareContentTask::slotFinished(KIO::Job *job) void CompareContentTask::slotFinished(TDEIO::Job *job)
{ {
KIO::TransferJob *otherJob = ( job == leftReadJob ) ? rightReadJob : leftReadJob; TDEIO::TransferJob *otherJob = ( job == leftReadJob ) ? rightReadJob : leftReadJob;
if( job == leftReadJob ) if( job == leftReadJob )
leftReadJob = 0; leftReadJob = 0;
@ -296,7 +296,7 @@ void CompareContentTask::slotFinished(KIO::Job *job)
abortContentComparing(); abortContentComparing();
} }
if( job->error() && job->error() != KIO::ERR_USER_CANCELED && !errorPrinted ) if( job->error() && job->error() != TDEIO::ERR_USER_CANCELED && !errorPrinted )
{ {
errorPrinted = true; errorPrinted = true;
KMessageBox::error(parentWidget, i18n("IO error at comparing file %1 with %2!") KMessageBox::error(parentWidget, i18n("IO error at comparing file %1 with %2!")

@ -132,12 +132,12 @@ class CompareContentTask : public SynchronizerTask {
public: public:
CompareContentTask( Synchronizer *, SynchronizerFileItem *, const KURL &, const KURL &, KIO::filesize_t ); CompareContentTask( Synchronizer *, SynchronizerFileItem *, const KURL &, const KURL &, TDEIO::filesize_t );
virtual ~CompareContentTask(); virtual ~CompareContentTask();
public slots: public slots:
void slotDataReceived(KIO::Job *job, const TQByteArray &data); void slotDataReceived(TDEIO::Job *job, const TQByteArray &data);
void slotFinished(KIO::Job *job); void slotFinished(TDEIO::Job *job);
void sendStatusMessage(); void sendStatusMessage();
protected: protected:
@ -151,11 +151,11 @@ private:
KURL leftURL; // the currently processed URL (left) KURL leftURL; // the currently processed URL (left)
KURL rightURL; // the currently processed URL (right) KURL rightURL; // the currently processed URL (right)
KIO::filesize_t size; // the size of the compared files TDEIO::filesize_t size; // the size of the compared files
bool errorPrinted; // flag indicates error bool errorPrinted; // flag indicates error
KIO::TransferJob *leftReadJob; // compare left read job TDEIO::TransferJob *leftReadJob; // compare left read job
KIO::TransferJob *rightReadJob; // compare right read job TDEIO::TransferJob *rightReadJob; // compare right read job
TQByteArray compareArray; // the array for comparing TQByteArray compareArray; // the array for comparing
SynchronizerFileItem *item; // the item for content compare SynchronizerFileItem *item; // the item for content compare
TQTimer *timer; // timer to show the process dialog at compare by content TQTimer *timer; // timer to show the process dialog at compare by content
@ -163,7 +163,7 @@ private:
TQFile *leftFile; // the left side local file TQFile *leftFile; // the left side local file
TQFile *rightFile; // the right side local file TQFile *rightFile; // the right side local file
KIO::filesize_t received; // the received size TDEIO::filesize_t received; // the received size
Synchronizer *sync; Synchronizer *sync;
}; };

@ -676,7 +676,7 @@ TagString exp_Copy::expFunc( const ListPanel*, const TagStringList& parameter, c
return TQString(); return TQString();
} }
PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, KIO::CopyJob::Copy, false, true ); PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, TDEIO::CopyJob::Copy, false, true );
return TQString(); // this doesn't return everything, that's normal! return TQString(); // this doesn't return everything, that's normal!
} }
@ -707,7 +707,7 @@ TagString exp_Move::expFunc( const ListPanel*, const TagStringList& parameter, c
return TQString(); return TQString();
} }
PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, KIO::CopyJob::Move, false, true ); PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, TDEIO::CopyJob::Move, false, true );
return TQString(); // this doesn't return anything, that's normal! return TQString(); // this doesn't return anything, that's normal!
} }

@ -264,7 +264,7 @@ bool arc_vfs::getDirs(){
// copy a file to the vfs (physical) // copy a file to the vfs (physical)
void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode /*pmode*/ ){ void arc_vfs::vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode /*pmode*/ ){
if ( addCmd.isEmpty() ) return; if ( addCmd.isEmpty() ) return;
// get the path inside the archive // get the path inside the archive
@ -283,10 +283,10 @@ void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQOb
KURL dest; KURL dest;
dest.setPath(tmpDir+path+dir); dest.setPath(tmpDir+path+dir);
KIO::Job* job = new KIO::CopyJob(*fileUrls,dest,mode,false,true); TDEIO::Job* job = new TDEIO::CopyJob(*fileUrls,dest,mode,false,true);
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) ); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
if(mode == KIO::CopyJob::Move) // notify the other panel if(mode == TDEIO::CopyJob::Move) // notify the other panel
connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) ); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
} }
@ -300,8 +300,8 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
KURL::List* filesUrls = vfs_getFiles(fileNames); // extract KURL::List* filesUrls = vfs_getFiles(fileNames); // extract
changed = true; changed = true;
KIO::Job *job = new KIO::CopyJob(*filesUrls,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true ); TDEIO::Job *job = new TDEIO::CopyJob(*filesUrls,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)));
} }
// else we have to delete the files from both the archive and the temp dir // else we have to delete the files from both the archive and the temp dir
else { else {
@ -310,7 +310,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
chdir(tmpDir.local8Bit()); chdir(tmpDir.local8Bit());
TQStringList files; TQStringList files;
KIO::filesize_t totalSizeVal = 0; TDEIO::filesize_t totalSizeVal = 0;
unsigned long totalFilesVal = 0; unsigned long totalFilesVal = 0;
// names -> urls // names -> urls
@ -373,7 +373,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
chdir(tmpDir.local8Bit()); chdir(tmpDir.local8Bit());
// names -> urls // names -> urls
TQStringList files; TQStringList files;
KIO::filesize_t totalSize = 0; TDEIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0; unsigned long totalFiles = 0;
for(TQStringList::Iterator name = names->begin(); name != names->end(); ++name ){ for(TQStringList::Iterator name = names->begin(); name != names->end(); ++name ){
processName(*name,&files,&totalSize,&totalFiles); processName(*name,&files,&totalSize,&totalFiles);
@ -443,8 +443,8 @@ void arc_vfs::vfs_rename(TQString fileName,TQString newName){
KURL dest; KURL dest;
dest.setPath(tmpDir+path+"/"+newName); dest.setPath(tmpDir+path+"/"+newName);
KIO::Job* job = new KIO::CopyJob(temp,dest,KIO::CopyJob::Move,false,false); TDEIO::Job* job = new TDEIO::CopyJob(temp,dest,TDEIO::CopyJob::Move,false,false);
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) ); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
} }
bool arc_vfs::vfs_refresh(TQString origin){ bool arc_vfs::vfs_refresh(TQString origin){
@ -678,7 +678,7 @@ TQString arc_vfs::changeDir(TQString name){
} }
// calculate space // calculate space
void arc_vfs::vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs,bool* stop){ void arc_vfs::vfs_calcSpace(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs,bool* stop){
if ( *stop ) return; if ( *stop ) return;
vfile* vf = vfs_search(name); vfile* vf = vfs_search(name);
@ -710,7 +710,7 @@ void arc_vfs::vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned l
} }
} }
void arc_vfs::processName(const TQString& name, TQStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles ){ void arc_vfs::processName(const TQString& name, TQStringList *urls,TDEIO::filesize_t *totalSize,unsigned long *totalFiles ){
vfile* vf = vfs_search(name); vfile* vf = vfs_search(name);
if ( vf == 0 ) return; if ( vf == 0 ) return;
@ -741,7 +741,7 @@ void arc_vfs::processName(const TQString& name, TQStringList *urls,KIO::filesize
void arc_vfs::parseLine(TQString line, TQFile* temp){ void arc_vfs::parseLine(TQString line, TQFile* temp){
TQString name; TQString name;
KIO::filesize_t size = 0; TDEIO::filesize_t size = 0;
TQString perm; TQString perm;
TQFileInfo qfi(arcFile); TQFileInfo qfi(arcFile);
time_t mtime = qfi.lastModified().toTime_t(); time_t mtime = qfi.lastModified().toTime_t();

@ -48,7 +48,7 @@ public:
~arc_vfs(); ~arc_vfs();
// copy a file to the vfs (physical) // copy a file to the vfs (physical)
void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify=0,TQString dir = "", PreserveMode pmode = PM_DEFAULT ); void vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify=0,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
// remove a file from the vfs (physical) // remove a file from the vfs (physical)
void vfs_delFiles(TQStringList *fileNames); void vfs_delFiles(TQStringList *fileNames);
// return a path to the file // return a path to the file
@ -59,7 +59,7 @@ public:
// rename file // rename file
void vfs_rename(TQString fileName,TQString newName); void vfs_rename(TQString fileName,TQString newName);
// calculate space // calculate space
void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop); void vfs_calcSpace(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop);
// return the working dir // return the working dir
TQString vfs_workingDir(); TQString vfs_workingDir();
@ -75,7 +75,7 @@ protected:
TQList<arc_dir> dirList; TQList<arc_dir> dirList;
TQValueList<extFile> extFiles; // the name, time & size of files unpacked from this archive TQValueList<extFile> extFiles; // the name, time & size of files unpacked from this archive
void processName(const TQString& name,TQStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles ); void processName(const TQString& name,TQStringList *urls,TDEIO::filesize_t *totalSize,unsigned long *totalFiles );
bool getDirs(); // fill the dir list bool getDirs(); // fill the dir list
vfileDict* findDir(TQString name); vfileDict* findDir(TQString name);
arc_dir* findArcDir(TQString name); arc_dir* findArcDir(TQString name);

@ -66,15 +66,15 @@ ftp_vfs::~ftp_vfs() {
busy = false; busy = false;
} }
void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) { void ftp_vfs::slotAddFiles( TDEIO::Job *, const TDEIO::UDSEntryList& entries ) {
int rwx = -1; int rwx = -1;
TQString prot = vfs_origin.protocol(); TQString prot = vfs_origin.protocol();
if( prot == "krarc" || prot == "tar" || prot == "zip" ) if( prot == "krarc" || prot == "tar" || prot == "zip" )
rwx = PERM_ALL; rwx = PERM_ALL;
KIO::UDSEntryListConstIterator it = entries.begin(); TDEIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end(); TDEIO::UDSEntryListConstIterator end = entries.end();
// as long as u can find files - add them to the vfs // as long as u can find files - add them to the vfs
for ( ; it != end; ++it ) { for ( ; it != end; ++it ) {
@ -86,8 +86,8 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
// ignore un-needed entries // ignore un-needed entries
if ( name.isEmpty() || name == "." || name == ".." ) continue; if ( name.isEmpty() || name == "." || name == ".." ) continue;
KIO::filesize_t size = kfi.size(); TDEIO::filesize_t size = kfi.size();
time_t mtime = kfi.time( KIO::UDS_MODIFICATION_TIME ); time_t mtime = kfi.time( TDEIO::UDS_MODIFICATION_TIME );
bool symLink = kfi.isLink(); bool symLink = kfi.isLink();
mode_t mode = kfi.mode() | kfi.permissions(); mode_t mode = kfi.mode() | kfi.permissions();
TQString perm = KRpermHandler::mode2TQString( mode ); TQString perm = KRpermHandler::mode2TQString( mode );
@ -137,18 +137,18 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
} }
} }
void ftp_vfs::slotPermanentRedirection( KIO::Job*, const KURL&, const KURL& newUrl ) { void ftp_vfs::slotPermanentRedirection( TDEIO::Job*, const KURL&, const KURL& newUrl ) {
vfs_origin = newUrl; vfs_origin = newUrl;
vfs_origin.adjustPath(-1); vfs_origin.adjustPath(-1);
} }
void ftp_vfs::slotRedirection( KIO::Job *, const KURL &url ) { void ftp_vfs::slotRedirection( TDEIO::Job *, const KURL &url ) {
// update the origin // update the origin
vfs_origin = url; vfs_origin = url;
vfs_origin.adjustPath(-1); vfs_origin.adjustPath(-1);
} }
void ftp_vfs::slotListResult( KIO::Job *job ) { void ftp_vfs::slotListResult( TDEIO::Job *job ) {
if ( job && job->error() ) { if ( job && job->error() ) {
// we failed to refresh // we failed to refresh
listError = true; listError = true;
@ -184,16 +184,16 @@ bool ftp_vfs::populateVfsList( const KURL& origin, bool showHidden ) {
// Open the directory marked by origin // Open the directory marked by origin
krConfig->setGroup( "Look&Feel" ); krConfig->setGroup( "Look&Feel" );
//vfs_origin.adjustPath(+1); //vfs_origin.adjustPath(+1);
KIO::Job *job = KIO::listDir( vfs_origin, false, showHidden ); TDEIO::Job *job = TDEIO::listDir( vfs_origin, false, showHidden );
connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
this, TQT_SLOT( slotAddFiles( KIO::Job*, const KIO::UDSEntryList& ) ) ); this, TQT_SLOT( slotAddFiles( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
connect( job, TQT_SIGNAL( redirection( KIO::Job*, const KURL& ) ), connect( job, TQT_SIGNAL( redirection( TDEIO::Job*, const KURL& ) ),
this, TQT_SLOT( slotRedirection( KIO::Job*, const KURL& ) ) ); this, TQT_SLOT( slotRedirection( TDEIO::Job*, const KURL& ) ) );
connect( job, TQT_SIGNAL( permanentRedirection( KIO::Job*, const KURL&, const KURL& ) ), connect( job, TQT_SIGNAL( permanentRedirection( TDEIO::Job*, const KURL&, const KURL& ) ),
this, TQT_SLOT( slotPermanentRedirection( KIO::Job*, const KURL&, const KURL& ) ) ); this, TQT_SLOT( slotPermanentRedirection( TDEIO::Job*, const KURL&, const KURL& ) ) );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
this, TQT_SLOT( slotListResult( KIO::Job* ) ) ); this, TQT_SLOT( slotListResult( TDEIO::Job* ) ) );
job->setWindow( krApp ); job->setWindow( krApp );
@ -211,7 +211,7 @@ bool ftp_vfs::populateVfsList( const KURL& origin, bool showHidden ) {
// copy a file to the vfs (physical) // copy a file to the vfs (physical)
void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode mode, TQObject* toNotify, TQString dir, PreserveMode /*pmode*/ ) { void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, TDEIO::CopyJob::CopyMode mode, TQObject* toNotify, TQString dir, PreserveMode /*pmode*/ ) {
KURL destUrl = vfs_origin; KURL destUrl = vfs_origin;
if ( dir != "" ) { if ( dir != "" ) {
@ -224,10 +224,10 @@ void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode mode, T
} }
} }
KIO::Job* job = new KIO::CopyJob( *fileUrls, destUrl, mode, false, true ); TDEIO::Job* job = new TDEIO::CopyJob( *fileUrls, destUrl, mode, false, true );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
if ( mode == KIO::CopyJob::Move ) // notify the other panel if ( mode == TDEIO::CopyJob::Move ) // notify the other panel
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), toNotify, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), toNotify, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
// remove a file from the vfs (physical) // remove a file from the vfs (physical)
@ -242,8 +242,8 @@ void ftp_vfs::vfs_delFiles( TQStringList *fileNames ) {
url.addPath( filename ); url.addPath( filename );
filesUrls.append( url ); filesUrls.append( url );
} }
KIO::Job *job = new KIO::DeleteJob( filesUrls, false, true ); TDEIO::Job *job = new TDEIO::DeleteJob( filesUrls, false, true );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
@ -272,8 +272,8 @@ void ftp_vfs::vfs_mkdir( const TQString& name ) {
KURL url = vfs_origin; KURL url = vfs_origin;
url.addPath( name ); url.addPath( name );
KIO::SimpleJob* job = KIO::mkdir( url ); TDEIO::SimpleJob* job = TDEIO::mkdir( url );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
void ftp_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) { void ftp_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) {
@ -286,8 +286,8 @@ void ftp_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) {
KURL newUrl = vfs_origin; KURL newUrl = vfs_origin;
newUrl.addPath( newName ); newUrl.addPath( newName );
KIO::Job *job = new KIO::CopyJob( fileUrls, newUrl, KIO::CopyJob::Move, true, true ); TDEIO::Job *job = new TDEIO::CopyJob( fileUrls, newUrl, TDEIO::CopyJob::Move, true, true );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
TQString ftp_vfs::vfs_workingDir() { TQString ftp_vfs::vfs_workingDir() {

@ -46,7 +46,7 @@ public:
~ftp_vfs(); ~ftp_vfs();
/// Copy a file to the vfs (physical). /// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT ); virtual void vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical) /// Remove a file from the vfs (physical)
virtual void vfs_delFiles(TQStringList *fileNames); virtual void vfs_delFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files /// Return a list of URLs for multiple files
@ -62,12 +62,12 @@ public:
public slots: public slots:
/// Handles new files from the dir lister /// Handles new files from the dir lister
void slotAddFiles(KIO::Job * job, const KIO::UDSEntryList& entries); void slotAddFiles(TDEIO::Job * job, const TDEIO::UDSEntryList& entries);
/// Redirection signal handlers /// Redirection signal handlers
void slotRedirection(KIO::Job *, const KURL &url); void slotRedirection(TDEIO::Job *, const KURL &url);
void slotPermanentRedirection(KIO::Job*,const KURL&,const KURL& newUrl); void slotPermanentRedirection(TDEIO::Job*,const KURL&,const KURL& newUrl);
/// Called when the dir listing job is finished (for better or worst) /// Called when the dir listing job is finished (for better or worst)
void slotListResult(KIO::Job *job); void slotListResult(TDEIO::Job *job);
/// Active the dir listing job /// Active the dir listing job
bool populateVfsList(const KURL& origin, bool showHidden); bool populateVfsList(const KURL& origin, bool showHidden);

@ -442,7 +442,7 @@ bool KRarcHandler::pack( TQStringList fileNames, TQString type, TQString dest, l
if( extraProps.count( "VolumeSize" ) > 0 ) { if( extraProps.count( "VolumeSize" ) > 0 ) {
TQString sizeStr = extraProps[ "VolumeSize" ]; TQString sizeStr = extraProps[ "VolumeSize" ];
KIO::filesize_t size = sizeStr.toLongLong(); TDEIO::filesize_t size = sizeStr.toLongLong();
if( size >= 10000 ) { if( size >= 10000 ) {
if( type == "-arj" || type == "-rar" ) if( type == "-arj" || type == "-rar" )
@ -545,10 +545,10 @@ TQString KRarcHandler::getPassword( TQString path ) {
bool keep = true; bool keep = true;
TQString user = "archive"; TQString user = "archive";
KIO::PasswordDialog passDlg( i18n("This archive is encrypted, please supply the password:"), TDEIO::PasswordDialog passDlg( i18n("This archive is encrypted, please supply the password:"),
user, true ); user, true );
passDlg.setPassword( password ); passDlg.setPassword( password );
if (passDlg.exec() == KIO::PasswordDialog::Accepted) { if (passDlg.exec() == TDEIO::PasswordDialog::Accepted) {
password = passDlg.password(); password = passDlg.password();
if ( keep ) { if ( keep ) {
if( !KWallet::Wallet::isOpen( KWallet::Wallet::NetworkWallet() ) && wallet != 0 ) { if( !KWallet::Wallet::isOpen( KWallet::Wallet::NetworkWallet() ) && wallet != 0 ) {

@ -279,7 +279,7 @@ bool KRpermHandler::fileExist( TQString path, TQString name ) {
return false; return false;
} }
TQString KRpermHandler::parseSize( KIO::filesize_t val ) { TQString KRpermHandler::parseSize( TDEIO::filesize_t val ) {
#if (TDE_VERSION_MAJOR >= 3) && (TDE_VERSION_MINOR >= 5) #if (TDE_VERSION_MAJOR >= 3) && (TDE_VERSION_MINOR >= 5)
return TDEGlobal::locale()->formatNumber(TQString::number(val), false, 0); return TDEGlobal::locale()->formatNumber(TQString::number(val), false, 0);
#else #else

@ -73,7 +73,7 @@ public:
static bool fileExist(TQString Path, TQString name); static bool fileExist(TQString Path, TQString name);
static TQString mode2TQString(mode_t m); static TQString mode2TQString(mode_t m);
static TQString parseSize(KIO::filesize_t val); static TQString parseSize(TDEIO::filesize_t val);
static TQString date2qstring(TQString date); static TQString date2qstring(TQString date);
static time_t TQString2time(TQString date); static time_t TQString2time(TQString date);

@ -189,7 +189,7 @@ bool KRQuery::match( vfile *vf ) const
// checking the mime // checking the mime
if( !type.isEmpty() && !checkType( vf->vfile_getMime( true ) ) ) return false; if( !type.isEmpty() && !checkType( vf->vfile_getMime( true ) ) ) return false;
// check that the size fit // check that the size fit
KIO::filesize_t size = vf->vfile_getSize(); TDEIO::filesize_t size = vf->vfile_getSize();
if ( minSize && size < minSize ) return false; if ( minSize && size < minSize ) return false;
if ( maxSize && size > maxSize ) return false; if ( maxSize && size > maxSize ) return false;
// check the time frame // check the time frame
@ -237,7 +237,7 @@ bool KRQuery::match( KFileItem *kfi ) const {
if ( kfi->isDir() ) if ( kfi->isDir() )
perm[ 0 ] = 'd'; perm[ 0 ] = 'd';
vfile temp( kfi->text(), kfi->size(), perm, kfi->time( KIO::UDS_MODIFICATION_TIME ), vfile temp( kfi->text(), kfi->size(), perm, kfi->time( TDEIO::UDS_MODIFICATION_TIME ),
kfi->isLink(), kfi->user(), kfi->group(), kfi->user(), kfi->isLink(), kfi->user(), kfi->group(), kfi->user(),
kfi->mimetype(), kfi->linkDest(), mode ); kfi->mimetype(), kfi->linkDest(), mode );
@ -409,11 +409,11 @@ bool KRQuery::containsContent( TQString file ) const
bool KRQuery::containsContent( KURL url ) const bool KRQuery::containsContent( KURL url ) const
{ {
KIO::TransferJob *contentReader = KIO::get( url, false, false ); TDEIO::TransferJob *contentReader = TDEIO::get( url, false, false );
connect(contentReader, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), connect(contentReader, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(containsContentData(KIO::Job *, const TQByteArray &))); this, TQT_SLOT(containsContentData(TDEIO::Job *, const TQByteArray &)));
connect(contentReader, TQT_SIGNAL( result( KIO::Job* ) ), connect(contentReader, TQT_SIGNAL( result( TDEIO::Job* ) ),
this, TQT_SLOT(containsContentFinished( KIO::Job* ) ) ); this, TQT_SLOT(containsContentFinished( TDEIO::Job* ) ) );
busy = true; busy = true;
containsContentResult = false; containsContentResult = false;
@ -432,7 +432,7 @@ bool KRQuery::containsContent( KURL url ) const
return containsContentResult; return containsContentResult;
} }
void KRQuery::containsContentData(KIO::Job *job, const TQByteArray &array) { void KRQuery::containsContentData(TDEIO::Job *job, const TQByteArray &array) {
receivedBytes += array.size(); receivedBytes += array.size();
if( checkBuffer( array.data(), array.size() ) ) { if( checkBuffer( array.data(), array.size() ) ) {
containsContentResult = true; containsContentResult = true;
@ -443,7 +443,7 @@ void KRQuery::containsContentData(KIO::Job *job, const TQByteArray &array) {
checkTimer(); checkTimer();
} }
void KRQuery::containsContentFinished( KIO::Job * ) { void KRQuery::containsContentFinished( TDEIO::Job * ) {
busy = false; busy = false;
} }
@ -571,13 +571,13 @@ void KRQuery::setContent( const TQString &content, bool cs, bool wholeWord, bool
containOnRemote = remoteSearch; containOnRemote = remoteSearch;
} }
void KRQuery::setMinimumFileSize( KIO::filesize_t minimumSize ) void KRQuery::setMinimumFileSize( TDEIO::filesize_t minimumSize )
{ {
bNull = false; bNull = false;
minSize = minimumSize; minSize = minimumSize;
} }
void KRQuery::setMaximumFileSize( KIO::filesize_t maximumSize ) void KRQuery::setMaximumFileSize( TDEIO::filesize_t maximumSize )
{ {
bNull = false; bNull = false;
maxSize = maximumSize; maxSize = maximumSize;

@ -78,9 +78,9 @@ public:
void setContent( const TQString &content, bool cs=true, bool wholeWord=false, bool remoteSearch=false ); void setContent( const TQString &content, bool cs=true, bool wholeWord=false, bool remoteSearch=false );
// sets the minimum file size limit // sets the minimum file size limit
void setMinimumFileSize( KIO::filesize_t ); void setMinimumFileSize( TDEIO::filesize_t );
// sets the maximum file size limit // sets the maximum file size limit
void setMaximumFileSize( KIO::filesize_t ); void setMaximumFileSize( TDEIO::filesize_t );
// sets the time the file newer than // sets the time the file newer than
void setNewerThan( time_t time ); void setNewerThan( time_t time );
@ -153,8 +153,8 @@ protected:
bool containWholeWord; bool containWholeWord;
bool containOnRemote; bool containOnRemote;
KIO::filesize_t minSize; TDEIO::filesize_t minSize;
KIO::filesize_t maxSize; TDEIO::filesize_t maxSize;
time_t newerThen; time_t newerThen;
time_t olderThen; time_t olderThen;
@ -189,8 +189,8 @@ private:
TQStringList split( TQString ); TQStringList split( TQString );
private slots: private slots:
void containsContentData(KIO::Job *, const TQByteArray &); void containsContentData(TDEIO::Job *, const TQByteArray &);
void containsContentFinished(KIO::Job*); void containsContentFinished(TDEIO::Job*);
private: private:
TQString origFilter; TQString origFilter;
@ -200,8 +200,8 @@ private:
mutable int receivedBufferLen; mutable int receivedBufferLen;
mutable TQString lastSuccessfulGrep; mutable TQString lastSuccessfulGrep;
mutable TQString fileName; mutable TQString fileName;
mutable KIO::filesize_t receivedBytes; mutable TDEIO::filesize_t receivedBytes;
mutable KIO::filesize_t totalBytes; mutable TDEIO::filesize_t totalBytes;
mutable int processEventsConnected; mutable int processEventsConnected;
mutable TQTime timer; mutable TQTime timer;
}; };

@ -142,7 +142,7 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
} }
// copy a file to the vfs (physical) // copy a file to the vfs (physical)
void normal_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode pmode ){ void normal_vfs::vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode pmode ){
//if( watcher ) watcher->stopScan(); // we will refresh manually this time... //if( watcher ) watcher->stopScan(); // we will refresh manually this time...
if( watcher ) { if( watcher ) {
delete watcher; // stopScan is buggy, leaves reference on the directory, that's why we delete the watcher delete watcher; // stopScan is buggy, leaves reference on the directory, that's why we delete the watcher
@ -152,10 +152,10 @@ void normal_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,T
KURL dest; KURL dest;
dest.setPath(vfs_workingDir()+"/"+dir); dest.setPath(vfs_workingDir()+"/"+dir);
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls,dest,mode,false,true ); TDEIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls,dest,mode,false,true );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh()) ); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh()) );
if(mode == KIO::CopyJob::Move) // notify the other panel if(mode == TDEIO::CopyJob::Move) // notify the other panel
connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) ); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
else else
job->setAutoErrorHandlingEnabled( true ); job->setAutoErrorHandlingEnabled( true );
} }
@ -180,22 +180,22 @@ void normal_vfs::vfs_delFiles(TQStringList *fileNames){
url.setPath( vfs_workingDir()+"/"+filename); url.setPath( vfs_workingDir()+"/"+filename);
filesUrls.append(url); filesUrls.append(url);
} }
KIO::Job *job; TDEIO::Job *job;
// delete of move to trash ? // delete of move to trash ?
krConfig->setGroup("General"); krConfig->setGroup("General");
if( krConfig->readBoolEntry("Move To Trash",_MoveToTrash) ){ if( krConfig->readBoolEntry("Move To Trash",_MoveToTrash) ){
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
job = KIO::trash(filesUrls, true ); job = TDEIO::trash(filesUrls, true );
#else #else
job = new KIO::CopyJob(filesUrls,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true ); job = new TDEIO::CopyJob(filesUrls,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
#endif #endif
connect(job,TQT_SIGNAL(result(KIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon())); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon()));
} }
else else
job = new KIO::DeleteJob(filesUrls, false, true); job = new TDEIO::DeleteJob(filesUrls, false, true);
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)));
} }
// return a path to the file // return a path to the file
@ -235,8 +235,8 @@ void normal_vfs::vfs_rename(const TQString& fileName,const TQString& newName){
fileUrls.append(url); fileUrls.append(url);
dest.setPath(vfs_workingDir()+"/"+newName); dest.setPath(vfs_workingDir()+"/"+newName);
KIO::Job *job = new KIO::CopyJob(fileUrls,dest,KIO::CopyJob::Move,true,false ); TDEIO::Job *job = new TDEIO::CopyJob(fileUrls,dest,TDEIO::CopyJob::Move,true,false );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*))); connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)));
} }
vfile* normal_vfs::vfileFromName(const TQString& name){ vfile* normal_vfs::vfileFromName(const TQString& name){
@ -245,7 +245,7 @@ vfile* normal_vfs::vfileFromName(const TQString& name){
KDE_struct_stat stat_p; KDE_struct_stat stat_p;
KDE_lstat(fileName.data(),&stat_p); KDE_lstat(fileName.data(),&stat_p);
KIO::filesize_t size = stat_p.st_size; TDEIO::filesize_t size = stat_p.st_size;
TQString perm = KRpermHandler::mode2TQString(stat_p.st_mode); TQString perm = KRpermHandler::mode2TQString(stat_p.st_mode);
bool symLink= S_ISLNK(stat_p.st_mode); bool symLink= S_ISLNK(stat_p.st_mode);
if( S_ISDIR(stat_p.st_mode) ) perm[0] = 'd'; if( S_ISDIR(stat_p.st_mode) ) perm[0] = 'd';

@ -53,7 +53,7 @@ public:
~normal_vfs(){if( watcher ) delete watcher;} ~normal_vfs(){if( watcher ) delete watcher;}
/// Copy a file to the vfs (physical). /// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT ); virtual void vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical) /// Remove a file from the vfs (physical)
virtual void vfs_delFiles(TQStringList *fileNames); virtual void vfs_delFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files /// Return a list of URLs for multiple files

@ -78,22 +78,22 @@ Attributes::Attributes( time_t tIn, TQString user, TQString group, mode_t modeIn
} }
PreservingCopyJob::PreservingCopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, PreservingCopyJob::PreservingCopyJob( const KURL::List& src, const KURL& dest, CopyMode mode,
bool asMethod, bool showProgressInfo ) : KIO::CopyJob( src, dest, mode, asMethod, showProgressInfo ) bool asMethod, bool showProgressInfo ) : TDEIO::CopyJob( src, dest, mode, asMethod, showProgressInfo )
{ {
if( dest.isLocalFile() ) if( dest.isLocalFile() )
{ {
connect( this, TQT_SIGNAL( aboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ), connect( this, TQT_SIGNAL( aboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &) ),
this, TQT_SLOT( slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ) ); this, TQT_SLOT( slotAboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &) ) );
connect( this, TQT_SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ), connect( this, TQT_SIGNAL( copyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool) ),
this, TQT_SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ) ); this, TQT_SLOT( slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool) ) );
connect( this, TQT_SIGNAL( result( KIO::Job * ) ), connect( this, TQT_SIGNAL( result( TDEIO::Job * ) ),
this, TQT_SLOT( slotFinished() ) ); this, TQT_SLOT( slotFinished() ) );
} }
} }
void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const TQValueList< KIO::CopyInfo > &files ) void PreservingCopyJob::slotAboutToCreate( TDEIO::Job */*job*/, const TQValueList< TDEIO::CopyInfo > &files )
{ {
for ( TQValueList< KIO::CopyInfo >::ConstIterator it = files.begin(); it != files.end(); ++it ) { for ( TQValueList< TDEIO::CopyInfo >::ConstIterator it = files.begin(); it != files.end(); ++it ) {
if( (*it).uSource.isLocalFile() ) { if( (*it).uSource.isLocalFile() ) {
KDE_struct_stat stat_p; KDE_struct_stat stat_p;
@ -155,16 +155,16 @@ void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const TQValueList<
void PreservingCopyJob::slotResult( Job *job ) { void PreservingCopyJob::slotResult( Job *job ) {
if( !job->error() ) { if( !job->error() ) {
if( job->inherits( "KIO::StatJob" ) ) { /* Unfortunately KIO forgets to set times when the file is in the */ if( job->inherits( "TDEIO::StatJob" ) ) { /* Unfortunately KIO forgets to set times when the file is in the */
KURL url = ((KIO::SimpleJob *)job)->url(); /* base directory. That's why we capture every StatJob and set the */ KURL url = ((TDEIO::SimpleJob *)job)->url(); /* base directory. That's why we capture every StatJob and set the */
/* time manually. */ /* time manually. */
KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult(); TDEIO::UDSEntry entry = static_cast<TDEIO::StatJob*>(job)->statResult();
KFileItem kfi(entry, url ); KFileItem kfi(entry, url );
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL ) #if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
fileAttributes[ url ] = Attributes( kfi.time( KIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), kfi.ACL().asString() ); fileAttributes[ url ] = Attributes( kfi.time( TDEIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), kfi.ACL().asString() );
#else #else
fileAttributes[ url ] = Attributes( kfi.time( KIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), TQString() ); fileAttributes[ url ] = Attributes( kfi.time( TDEIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), TQString() );
#endif #endif
} }
} }
@ -172,49 +172,49 @@ void PreservingCopyJob::slotResult( Job *job ) {
CopyJob::slotResult( job ); CopyJob::slotResult( job );
for( unsigned j=0; j != subjobs.count(); j++ ) { for( unsigned j=0; j != subjobs.count(); j++ ) {
if( subjobs.at( j )->inherits( "KIO::ListJob" ) ) { if( subjobs.at( j )->inherits( "TDEIO::ListJob" ) ) {
disconnect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ), disconnect( subjobs.at( j ), TQT_SIGNAL( entries (TDEIO::Job *, const TDEIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) ); this, TQT_SLOT( slotListEntries (TDEIO::Job *, const TDEIO::UDSEntryList &) ) );
connect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ), connect( subjobs.at( j ), TQT_SIGNAL( entries (TDEIO::Job *, const TDEIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) ); this, TQT_SLOT( slotListEntries (TDEIO::Job *, const TDEIO::UDSEntryList &) ) );
} }
} }
} }
void PreservingCopyJob::slotListEntries(KIO::Job *job, const KIO::UDSEntryList &list) { void PreservingCopyJob::slotListEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list) {
KIO::UDSEntryListConstIterator it = list.begin(); TDEIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end(); TDEIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) { for (; it != end; ++it) {
KURL url = ((KIO::SimpleJob *)job)->url(); KURL url = ((TDEIO::SimpleJob *)job)->url();
TQString relName, user, group; TQString relName, user, group;
time_t mtime = (time_t)-1; time_t mtime = (time_t)-1;
mode_t mode = 0755; mode_t mode = 0755;
TQString acl; TQString acl;
KIO::UDSEntry::ConstIterator it2 = (*it).begin(); TDEIO::UDSEntry::ConstIterator it2 = (*it).begin();
for( ; it2 != (*it).end(); it2++ ) { for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) { switch ((*it2).m_uds) {
case KIO::UDS_NAME: case TDEIO::UDS_NAME:
if( relName.isEmpty() ) if( relName.isEmpty() )
relName = (*it2).m_str; relName = (*it2).m_str;
break; break;
case KIO::UDS_URL: case TDEIO::UDS_URL:
relName = KURL((*it2).m_str).fileName(); relName = KURL((*it2).m_str).fileName();
break; break;
case KIO::UDS_MODIFICATION_TIME: case TDEIO::UDS_MODIFICATION_TIME:
mtime = (time_t)((*it2).m_long); mtime = (time_t)((*it2).m_long);
break; break;
case KIO::UDS_USER: case TDEIO::UDS_USER:
user = (*it2).m_str; user = (*it2).m_str;
break; break;
case KIO::UDS_GROUP: case TDEIO::UDS_GROUP:
group = (*it2).m_str; group = (*it2).m_str;
break; break;
case KIO::UDS_ACCESS: case TDEIO::UDS_ACCESS:
mode = (*it2).m_long; mode = (*it2).m_long;
break; break;
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL ) #if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
case KIO::UDS_ACL_STRING: case TDEIO::UDS_ACL_STRING:
acl = (*it2).m_str; acl = (*it2).m_str;
break; break;
#endif #endif
@ -226,7 +226,7 @@ void PreservingCopyJob::slotListEntries(KIO::Job *job, const KIO::UDSEntryList &
} }
} }
void PreservingCopyJob::slotCopyingDone( KIO::Job *, const KURL &from, const KURL &to, bool postpone, bool) void PreservingCopyJob::slotCopyingDone( TDEIO::Job *, const KURL &from, const KURL &to, bool postpone, bool)
{ {
if( postpone ) { // the directories are stamped at the last step, so if it's a directory, we postpone if( postpone ) { // the directories are stamped at the last step, so if it's a directory, we postpone
unsigned i=0; unsigned i=0;
@ -288,11 +288,11 @@ void PreservingCopyJob::slotFinished() {
} }
} }
KIO::CopyJob * PreservingCopyJob::createCopyJob( PreserveMode pmode, const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo ) TDEIO::CopyJob * PreservingCopyJob::createCopyJob( PreserveMode pmode, const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo )
{ {
if( ! dest.isLocalFile() ) if( ! dest.isLocalFile() )
pmode = PM_NONE; pmode = PM_NONE;
if( mode == KIO::CopyJob::Link ) if( mode == TDEIO::CopyJob::Link )
pmode = PM_NONE; pmode = PM_NONE;
switch( pmode ) switch( pmode )
@ -308,11 +308,11 @@ KIO::CopyJob * PreservingCopyJob::createCopyJob( PreserveMode pmode, const KURL:
if( preserve ) if( preserve )
return new PreservingCopyJob( src, dest, mode, asMethod, showProgressInfo ); return new PreservingCopyJob( src, dest, mode, asMethod, showProgressInfo );
else else
return new KIO::CopyJob( src, dest, mode, asMethod, showProgressInfo ); return new TDEIO::CopyJob( src, dest, mode, asMethod, showProgressInfo );
} }
case PM_NONE: case PM_NONE:
default: default:
return new KIO::CopyJob( src, dest, mode, asMethod, showProgressInfo ); return new TDEIO::CopyJob( src, dest, mode, asMethod, showProgressInfo );
} }
} }

@ -57,7 +57,7 @@ public:
TQString acl; TQString acl;
}; };
class PreservingCopyJob : public KIO::CopyJob class PreservingCopyJob : public TDEIO::CopyJob
{ {
Q_OBJECT Q_OBJECT
@ -66,18 +66,18 @@ public:
PreservingCopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo ); PreservingCopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo );
static KIO::CopyJob *createCopyJob( PreserveMode pmode, const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo ); static TDEIO::CopyJob *createCopyJob( PreserveMode pmode, const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo );
public slots: public slots:
void slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &); void slotAboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &);
void slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool); void slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool);
void slotFinished(); void slotFinished();
virtual void slotResult( Job *job ); virtual void slotResult( Job *job );
void slotListEntries(KIO::Job *job, const KIO::UDSEntryList &list); void slotListEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list);
private: private:
TQMap<KURL, Attributes> fileAttributes; TQMap<KURL, Attributes> fileAttributes;
TQMap<KIO::Job *, KURL> pendingJobs; TQMap<TDEIO::Job *, KURL> pendingJobs;
TQValueList<KURL> directoriesToStamp; TQValueList<KURL> directoriesToStamp;
TQValueList<KURL> originalDirectories; TQValueList<KURL> originalDirectories;
}; };

@ -46,7 +46,7 @@
#include <kdebug.h> #include <kdebug.h>
vfile::vfile(const TQString& name, // useful construtor vfile::vfile(const TQString& name, // useful construtor
const KIO::filesize_t size, const TDEIO::filesize_t size,
const TQString& perm, const TQString& perm,
const time_t mtime, const time_t mtime,
const bool symLink, const bool symLink,
@ -78,7 +78,7 @@ vfile::vfile(const TQString& name, // useful construtor
} }
vfile::vfile(const TQString& name, // useful construtor vfile::vfile(const TQString& name, // useful construtor
const KIO::filesize_t size, const TDEIO::filesize_t size,
const TQString& perm, const TQString& perm,
const time_t mtime, const time_t mtime,
const bool symLink, const bool symLink,
@ -188,48 +188,48 @@ void vfile::vfile_loadACL()
vfile_acl_loaded = true; vfile_acl_loaded = true;
} }
const KIO::UDSEntry vfile::vfile_getEntry() { const TDEIO::UDSEntry vfile::vfile_getEntry() {
KIO::UDSEntry entry; TDEIO::UDSEntry entry;
KIO::UDSAtom atom; TDEIO::UDSAtom atom;
atom.m_uds = KIO::UDS_NAME; atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = vfile_getName(); atom.m_str = vfile_getName();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_SIZE; atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = vfile_getSize(); atom.m_long = vfile_getSize();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_MODIFICATION_TIME; atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = vfile_getTime_t(); atom.m_long = vfile_getTime_t();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_USER; atom.m_uds = TDEIO::UDS_USER;
atom.m_str = vfile_getOwner(); atom.m_str = vfile_getOwner();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_GROUP; atom.m_uds = TDEIO::UDS_GROUP;
atom.m_str = vfile_getGroup(); atom.m_str = vfile_getGroup();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_MIME_TYPE; atom.m_uds = TDEIO::UDS_MIME_TYPE;
atom.m_str = vfile_getMime(); atom.m_str = vfile_getMime();
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_FILE_TYPE; atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = vfile_getMode() & S_IFMT; atom.m_long = vfile_getMode() & S_IFMT;
entry.append(atom); entry.append(atom);
atom.m_uds = KIO::UDS_ACCESS; atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = vfile_getMode() & 07777; // keep permissions only atom.m_long = vfile_getMode() & 07777; // keep permissions only
entry.append( atom ); entry.append( atom );
atom.m_uds = KIO::UDS_MIME_TYPE; atom.m_uds = TDEIO::UDS_MIME_TYPE;
atom.m_str = vfile_getMime(); atom.m_str = vfile_getMime();
entry.append(atom); entry.append(atom);
if( vfile_isSymLink() ){ if( vfile_isSymLink() ){
atom.m_uds = KIO::UDS_LINK_DEST; atom.m_uds = TDEIO::UDS_LINK_DEST;
atom.m_str = vfile_getSymDest(); atom.m_str = vfile_getSymDest();
entry.append(atom); entry.append(atom);
} }
@ -238,20 +238,20 @@ const KIO::UDSEntry vfile::vfile_getEntry() {
if( !vfile_acl_loaded ) if( !vfile_acl_loaded )
vfile_loadACL(); vfile_loadACL();
if( vfile_has_acl ) { if( vfile_has_acl ) {
atom.m_uds = KIO::UDS_EXTENDED_ACL; atom.m_uds = TDEIO::UDS_EXTENDED_ACL;
atom.m_long = 1; atom.m_long = 1;
entry.append( atom ); entry.append( atom );
if( !vfile_acl.isNull() ) if( !vfile_acl.isNull() )
{ {
atom.m_uds = KIO::UDS_ACL_STRING; atom.m_uds = TDEIO::UDS_ACL_STRING;
atom.m_str = vfile_acl; atom.m_str = vfile_acl;
entry.append(atom); entry.append(atom);
} }
if( !vfile_def_acl.isNull() ) if( !vfile_def_acl.isNull() )
{ {
atom.m_uds = KIO::UDS_DEFAULT_ACL_STRING; atom.m_uds = TDEIO::UDS_DEFAULT_ACL_STRING;
atom.m_str = vfile_acl; atom.m_str = vfile_acl;
entry.append(atom); entry.append(atom);
} }

@ -58,7 +58,7 @@ public:
* file name, file size, file permissions,is the file a link,owner uid & group uid. * file name, file size, file permissions,is the file a link,owner uid & group uid.
*/ */
vfile(const TQString& name, vfile(const TQString& name,
const KIO::filesize_t size, const TDEIO::filesize_t size,
const TQString& perm, const TQString& perm,
const time_t mtime, const time_t mtime,
const bool symLink, const bool symLink,
@ -70,7 +70,7 @@ public:
const int rwx = -1 ); const int rwx = -1 );
vfile(const TQString& name, vfile(const TQString& name,
const KIO::filesize_t size, const TDEIO::filesize_t size,
const TQString& perm, const TQString& perm,
const time_t mtime, const time_t mtime,
const bool symLink, const bool symLink,
@ -90,7 +90,7 @@ public:
// following functions give-out file details // following functions give-out file details
inline const TQString& vfile_getName() const { return vfile_name; } inline const TQString& vfile_getName() const { return vfile_name; }
inline KIO::filesize_t vfile_getSize() const { return vfile_size; } inline TDEIO::filesize_t vfile_getSize() const { return vfile_size; }
inline const TQString& vfile_getPerm() const { return vfile_perm; } inline const TQString& vfile_getPerm() const { return vfile_perm; }
inline bool vfile_isDir() const { return vfile_isdir; } inline bool vfile_isDir() const { return vfile_isdir; }
inline bool vfile_isSymLink() const { return vfile_symLink; } inline bool vfile_isSymLink() const { return vfile_symLink; }
@ -106,7 +106,7 @@ public:
const TQString& vfile_getGroup(); const TQString& vfile_getGroup();
const TQString& vfile_getACL(); const TQString& vfile_getACL();
const TQString& vfile_getDefaultACL(); const TQString& vfile_getDefaultACL();
const KIO::UDSEntry vfile_getEntry(); //< return the UDSEntry from the vfile const TDEIO::UDSEntry vfile_getEntry(); //< return the UDSEntry from the vfile
char vfile_isReadable() const; char vfile_isReadable() const;
char vfile_isWriteable() const; char vfile_isWriteable() const;
char vfile_isExecutable() const; char vfile_isExecutable() const;
@ -115,7 +115,7 @@ public:
* used ONLY when calculating a directory's space, needs to change the * used ONLY when calculating a directory's space, needs to change the
* displayed size of the viewitem and thus the vfile. For INTERNAL USE ! * displayed size of the viewitem and thus the vfile. For INTERNAL USE !
*/ */
inline void vfile_setSize(KIO::filesize_t size) {vfile_size = size;} inline void vfile_setSize(TDEIO::filesize_t size) {vfile_size = size;}
inline void vfile_setUrl(const KURL& url) {vfile_url = url; } inline void vfile_setUrl(const KURL& url) {vfile_url = url; }
inline void vfile_setIcon(const TQString& icn) {vfile_icon = icn; } inline void vfile_setIcon(const TQString& icn) {vfile_icon = icn; }
@ -129,7 +129,7 @@ private:
protected: protected:
// the file information list // the file information list
TQString vfile_name; //< file name TQString vfile_name; //< file name
KIO::filesize_t vfile_size; //< file size TDEIO::filesize_t vfile_size; //< file size
mode_t vfile_mode; //< file mode mode_t vfile_mode; //< file mode
uid_t vfile_ownerId; //< file owner id uid_t vfile_ownerId; //< file owner id
gid_t vfile_groupId; //< file group id gid_t vfile_groupId; //< file group id

@ -62,8 +62,8 @@ vfs::~vfs() {
delete vfs_filesP; delete vfs_filesP;
} }
KIO::filesize_t vfs::vfs_totalSize(){ TDEIO::filesize_t vfs::vfs_totalSize(){
KIO::filesize_t temp=0; TDEIO::filesize_t temp=0;
class vfile* vf=vfs_getFirstFile(); class vfile* vf=vfs_getFirstFile();
while (vf!=0){ while (vf!=0){
@ -75,7 +75,7 @@ KIO::filesize_t vfs::vfs_totalSize(){
return temp; return temp;
} }
bool vfs::vfs_refresh(KIO::Job* job){ bool vfs::vfs_refresh(TDEIO::Job* job){
if(job && job->error()){ if(job && job->error()){
job->showErrorDialog(krApp); job->showErrorDialog(krApp);
} }
@ -289,7 +289,7 @@ void vfs::vfs_requestDelete() {
/// to be implemented /// to be implemented
#if KDE_IS_VERSION(3,3,0) #if KDE_IS_VERSION(3,3,0)
#include <kdirsize.h> #include <kdirsize.h>
void vfs::slotKdsResult( KIO::Job* job){ void vfs::slotKdsResult( TDEIO::Job* job){
if( job && !job->error() ){ if( job && !job->error() ){
KDirSize* kds = static_cast<KDirSize*>(job); KDirSize* kds = static_cast<KDirSize*>(job);
*kds_totalSize += kds->totalSize(); *kds_totalSize += kds->totalSize();
@ -299,11 +299,11 @@ void vfs::slotKdsResult( KIO::Job* job){
*kds_busy = true; *kds_busy = true;
} }
void vfs::vfs_calcSpace( TQString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) { void vfs::vfs_calcSpace( TQString name , TDEIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
calculateURLSize( vfs_getFile( name ), totalSize, totalFiles, totalDirs, stop ); calculateURLSize( vfs_getFile( name ), totalSize, totalFiles, totalDirs, stop );
} }
void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) { void vfs::calculateURLSize( KURL url, TDEIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
if ( stop && *stop ) return ; if ( stop && *stop ) return ;
kds_busy = stop; kds_busy = stop;
kds_totalSize = totalSize ; kds_totalSize = totalSize ;
@ -315,8 +315,8 @@ void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long
return; return;
} else { } else {
stat_busy = true; stat_busy = true;
KIO::StatJob* statJob = KIO::stat( url, false ); TDEIO::StatJob* statJob = TDEIO::stat( url, false );
connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResultArrived( KIO::Job* ) ) ); connect( statJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResultArrived( TDEIO::Job* ) ) );
while ( !(*stop) && stat_busy ) {usleep(1000);} while ( !(*stop) && stat_busy ) {usleep(1000);}
if( entry.isEmpty() ) return; // statJob failed if( entry.isEmpty() ) return; // statJob failed
KFileItem kfi(entry, url, true ); KFileItem kfi(entry, url, true );
@ -328,14 +328,14 @@ void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long
} }
KDirSize* kds = KDirSize::dirSizeJob( url ); KDirSize* kds = KDirSize::dirSizeJob( url );
connect( kds, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotKdsResult( KIO::Job* ) ) ); connect( kds, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotKdsResult( TDEIO::Job* ) ) );
while ( !(*stop) ){ while ( !(*stop) ){
// we are in a sepetate thread - so sleeping is OK // we are in a sepetate thread - so sleeping is OK
usleep(1000); usleep(1000);
} }
} }
void vfs::vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){ void vfs::vfs_calcSpaceLocal(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){
if ( *stop ) return; if ( *stop ) return;
if (!name.contains("/")) name = vfs_workingDir()+"/"+name; if (!name.contains("/")) name = vfs_workingDir()+"/"+name;
if (name == "/proc") return; if (name == "/proc") return;
@ -371,15 +371,15 @@ void vfs::vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned
} }
void vfs::slotStatResultArrived( KIO::Job* job ) { void vfs::slotStatResultArrived( TDEIO::Job* job ) {
if( !job || job->error() ) entry = KIO::UDSEntry(); if( !job || job->error() ) entry = TDEIO::UDSEntry();
else entry = static_cast<KIO::StatJob*>(job)->statResult(); else entry = static_cast<TDEIO::StatJob*>(job)->statResult();
stat_busy = false; stat_busy = false;
} }
#else #else
void vfs::slotKdsResult(KIO::Job *job){/* empty */} void vfs::slotKdsResult(TDEIO::Job *job){/* empty */}
void vfs::vfs_calcSpace( TQString /*name*/ , KIO::filesize_t* /*totalSize*/, unsigned long* /*totalFiles*/, unsigned long* /*totalDirs*/, bool* /*stop*/ ) {/* empty*/} void vfs::vfs_calcSpace( TQString /*name*/ , TDEIO::filesize_t* /*totalSize*/, unsigned long* /*totalFiles*/, unsigned long* /*totalDirs*/, bool* /*stop*/ ) {/* empty*/}
#endif #endif
TQValueList<vfile*> vfs::vfs_search(const KRQuery& filter) { TQValueList<vfile*> vfs::vfs_search(const KRQuery& filter) {

@ -64,7 +64,7 @@ public:
virtual ~vfs(); virtual ~vfs();
/// Copy a file to the vfs (physical). /// Copy a file to the vfs (physical).
virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT)=0; virtual void vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT)=0;
/// Remove a file from the vfs (physical) /// Remove a file from the vfs (physical)
virtual void vfs_delFiles(TQStringList *fileNames)=0; virtual void vfs_delFiles(TQStringList *fileNames)=0;
/// Return a list of URLs for multiple files /// Return a list of URLs for multiple files
@ -76,9 +76,9 @@ public:
/// Rename file /// Rename file
virtual void vfs_rename(const TQString& fileName,const TQString& newName)=0; virtual void vfs_rename(const TQString& fileName,const TQString& newName)=0;
/// Calculate the amount of space occupied by a file or directory (recursive). /// Calculate the amount of space occupied by a file or directory (recursive).
virtual void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop); virtual void vfs_calcSpace(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Calculate the amount of space occupied by a local file or directory (recursive). /// Calculate the amount of space occupied by a local file or directory (recursive).
virtual void vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop); virtual void vfs_calcSpaceLocal(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Return the VFS working dir /// Return the VFS working dir
virtual TQString vfs_workingDir()=0; virtual TQString vfs_workingDir()=0;
@ -89,7 +89,7 @@ public:
/// Return an empty vfile* list if not found /// Return an empty vfile* list if not found
TQValueList<vfile*> vfs_search(const KRQuery& filter); TQValueList<vfile*> vfs_search(const KRQuery& filter);
/// The total size of all the files in the VFS, /// The total size of all the files in the VFS,
KIO::filesize_t vfs_totalSize(); TDEIO::filesize_t vfs_totalSize();
/// The number of files in the VFS /// The number of files in the VFS
inline unsigned long vfs_noOfFiles() { return vfs_filesP->count(); } inline unsigned long vfs_noOfFiles() { return vfs_filesP->count(); }
/// Returns the VFS url. /// Returns the VFS url.
@ -120,7 +120,7 @@ public slots:
bool vfs_refresh(const KURL& origin); bool vfs_refresh(const KURL& origin);
/// Used to refresh the VFS when a job finishs. it calls the refresh() slot /// Used to refresh the VFS when a job finishs. it calls the refresh() slot
/// or display a error message if the job fails /// or display a error message if the job fails
bool vfs_refresh(KIO::Job* job); bool vfs_refresh(TDEIO::Job* job);
bool vfs_refresh(); bool vfs_refresh();
void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; } void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; }
void vfs_enableRefresh(bool enable); void vfs_enableRefresh(bool enable);
@ -128,7 +128,7 @@ public slots:
signals: signals:
void startUpdate(); //< emitted when the VFS starts to refresh its list of vfiles. void startUpdate(); //< emitted when the VFS starts to refresh its list of vfiles.
void startJob(KIO::Job* job); void startJob(TDEIO::Job* job);
void incrementalRefreshFinished( const KURL& ); //< emitted when the incremental refresh was finished void incrementalRefreshFinished( const KURL& ); //< emitted when the incremental refresh was finished
void addedVfile(vfile* vf); void addedVfile(vfile* vf);
void deletedVfile(const TQString& name); void deletedVfile(const TQString& name);
@ -151,7 +151,7 @@ protected:
inline void removeFromList(TQString name){ vfs_filesP->remove(name); } inline void removeFromList(TQString name){ vfs_filesP->remove(name); }
/// Deletes a vfile from the list. /// Deletes a vfile from the list.
void calculateURLSize(KURL url,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop); void calculateURLSize(KURL url,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
VFS_TYPE vfs_type; //< the vfs type. VFS_TYPE vfs_type; //< the vfs type.
KURL vfs_origin; //< the path or file the VFS originates from. KURL vfs_origin; //< the path or file the VFS originates from.
@ -165,8 +165,8 @@ protected:
protected slots: protected slots:
/// The slot for the KDirSize job /// The slot for the KDirSize job
void slotKdsResult(KIO::Job *job); void slotKdsResult(TDEIO::Job *job);
void slotStatResultArrived(KIO::Job *job); void slotStatResultArrived(TDEIO::Job *job);
private: private:
vfileDict* vfs_filesP; //< Point to a lists of virtual files (vfile). vfileDict* vfs_filesP; //< Point to a lists of virtual files (vfile).
@ -178,8 +178,8 @@ private:
bool stat_busy; bool stat_busy;
bool deletePossible; bool deletePossible;
bool deleteRequested; bool deleteRequested;
KIO::UDSEntry entry; TDEIO::UDSEntry entry;
KIO::filesize_t* kds_totalSize; TDEIO::filesize_t* kds_totalSize;
unsigned long* kds_totalFiles; unsigned long* kds_totalFiles;
unsigned long* kds_totalDirs; unsigned long* kds_totalDirs;
}; };

@ -34,7 +34,7 @@
#define VIRT_VFS_DB "virt_vfs.db" #define VIRT_VFS_DB "virt_vfs.db"
TQDict<KURL::List> virt_vfs::virtVfsDict; TQDict<KURL::List> virt_vfs::virtVfsDict;
KConfig* virt_vfs::virt_vfs_db=0; TDEConfig* virt_vfs::virt_vfs_db=0;
virt_vfs::virt_vfs( TQObject* panel, bool quiet ) : vfs( panel, quiet ) { virt_vfs::virt_vfs( TQObject* panel, bool quiet ) : vfs( panel, quiet ) {
// set the writable attribute // set the writable attribute
@ -81,7 +81,7 @@ bool virt_vfs::populateVfsList( const KURL& origin, bool /*showHidden*/ ) {
return true; return true;
} }
void virt_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode /*mode*/, TQObject* /*toNotify*/, TQString /*dir*/, PreserveMode /*pmode*/ ) { void virt_vfs::vfs_addFiles( KURL::List *fileUrls, TDEIO::CopyJob::CopyMode /*mode*/, TQObject* /*toNotify*/, TQString /*dir*/, PreserveMode /*pmode*/ ) {
if ( path == "/" ) { if ( path == "/" ) {
if ( !quietMode ) if ( !quietMode )
KMessageBox::error( krApp, i18n( "You can't copy files directly to the 'virt:/' directory.\nYou can create a sub directory and copy your files into it." ), i18n( "Error" ) ); KMessageBox::error( krApp, i18n( "You can't copy files directly to the 'virt:/' directory.\nYou can create a sub directory and copy your files into it." ), i18n( "Error" ) );
@ -116,22 +116,22 @@ void virt_vfs::vfs_delFiles( TQStringList *fileNames ) {
TQString filename = ( *fileNames ) [ i ]; TQString filename = ( *fileNames ) [ i ];
filesUrls.append( vfs_getFile( filename ) ); filesUrls.append( vfs_getFile( filename ) );
} }
KIO::Job *job; TDEIO::Job *job;
// delete of move to trash ? // delete of move to trash ?
krConfig->setGroup( "General" ); krConfig->setGroup( "General" );
if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) ) { if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) ) {
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
job = KIO::trash( filesUrls, true ); job = TDEIO::trash( filesUrls, true );
#else #else
job = new KIO::CopyJob( filesUrls, TDEGlobalSettings::trashPath(), KIO::CopyJob::Move, false, true ); job = new TDEIO::CopyJob( filesUrls, TDEGlobalSettings::trashPath(), TDEIO::CopyJob::Move, false, true );
#endif #endif
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) );
} else } else
job = new KIO::DeleteJob( filesUrls, false, true ); job = new TDEIO::DeleteJob( filesUrls, false, true );
// refresh will remove the deleted files... // refresh will remove the deleted files...
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
void virt_vfs::vfs_removeFiles( TQStringList *fileNames ) { void virt_vfs::vfs_removeFiles( TQStringList *fileNames ) {
@ -204,13 +204,13 @@ void virt_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) {
// so we don't have to worry if the job was successful // so we don't have to worry if the job was successful
virtVfsDict[ path ] ->append( dest ); virtVfsDict[ path ] ->append( dest );
KIO::Job *job = new KIO::CopyJob( fileUrls, dest, KIO::CopyJob::Move, true, false ); TDEIO::Job *job = new TDEIO::CopyJob( fileUrls, dest, TDEIO::CopyJob::Move, true, false );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
} }
void virt_vfs::slotStatResult( KIO::Job* job ) { void virt_vfs::slotStatResult( TDEIO::Job* job ) {
if( !job || job->error() ) entry = KIO::UDSEntry(); if( !job || job->error() ) entry = TDEIO::UDSEntry();
else entry = static_cast<KIO::StatJob*>(job)->statResult(); else entry = static_cast<TDEIO::StatJob*>(job)->statResult();
busy = false; busy = false;
} }
@ -228,15 +228,15 @@ vfile* virt_vfs::stat( const KURL& url ) {
} }
else { else {
busy = true; busy = true;
KIO::StatJob* statJob = KIO::stat( url, false ); TDEIO::StatJob* statJob = TDEIO::stat( url, false );
connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) ); connect( statJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
while ( busy && vfs_processEvents() ); while ( busy && vfs_processEvents() );
if( entry.isEmpty() ) return 0; // statJob failed if( entry.isEmpty() ) return 0; // statJob failed
kfi = new KFileItem(entry, url, true ); kfi = new KFileItem(entry, url, true );
} }
if ( !kfi->time( KIO::UDS_MODIFICATION_TIME ) ){ if ( !kfi->time( TDEIO::UDS_MODIFICATION_TIME ) ){
delete kfi; delete kfi;
return 0; // file not found return 0; // file not found
} }
@ -250,8 +250,8 @@ vfile* virt_vfs::stat( const KURL& url ) {
else else
name = url.prettyURL(); name = url.prettyURL();
KIO::filesize_t size = kfi->size(); TDEIO::filesize_t size = kfi->size();
time_t mtime = kfi->time( KIO::UDS_MODIFICATION_TIME ); time_t mtime = kfi->time( TDEIO::UDS_MODIFICATION_TIME );
bool symLink = kfi->isLink(); bool symLink = kfi->isLink();
mode_t mode = kfi->mode() | kfi->permissions(); mode_t mode = kfi->mode() | kfi->permissions();
TQString perm = KRpermHandler::mode2TQString( mode ); TQString perm = KRpermHandler::mode2TQString( mode );
@ -280,15 +280,15 @@ vfile* virt_vfs::stat( const KURL& url ) {
return temp; return temp;
} }
KConfig* virt_vfs::getVirtDB(){ TDEConfig* virt_vfs::getVirtDB(){
if( !virt_vfs_db ){ if( !virt_vfs_db ){
virt_vfs_db = new KConfig(VIRT_VFS_DB,false,"data"); virt_vfs_db = new TDEConfig(VIRT_VFS_DB,false,"data");
} }
return virt_vfs_db; return virt_vfs_db;
} }
bool virt_vfs::save(){ bool virt_vfs::save(){
KConfig* db = getVirtDB(); TDEConfig* db = getVirtDB();
db->setGroup("virt_db"); db->setGroup("virt_db");
TQDictIterator<KURL::List> it( virtVfsDict ); // See TQDictIterator TQDictIterator<KURL::List> it( virtVfsDict ); // See TQDictIterator
@ -307,7 +307,7 @@ bool virt_vfs::save(){
} }
bool virt_vfs::restore(){ bool virt_vfs::restore(){
KConfig* db = getVirtDB(); TDEConfig* db = getVirtDB();
db->setGroup("virt_db"); db->setGroup("virt_db");
TQMap<TQString, TQString> map = db->entryMap("virt_db"); TQMap<TQString, TQString> map = db->entryMap("virt_db");
@ -326,7 +326,7 @@ bool virt_vfs::restore(){
return true; return true;
} }
void virt_vfs::vfs_calcSpace( TQString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) { void virt_vfs::vfs_calcSpace( TQString name , TDEIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
if ( stop && *stop ) return ; if ( stop && *stop ) return ;
if( path == "/" ) { if( path == "/" ) {
KURL::List* urlList = virtVfsDict[ name ]; KURL::List* urlList = virtVfsDict[ name ];

@ -34,7 +34,7 @@ public:
~virt_vfs(); ~virt_vfs();
/// Copy a file to the vfs (physical). /// Copy a file to the vfs (physical).
void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT ); void vfs_addFiles(KURL::List *fileUrls,TDEIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical) /// Remove a file from the vfs (physical)
void vfs_delFiles(TQStringList *fileNames); void vfs_delFiles(TQStringList *fileNames);
/// Remove a file from the collection (only its link, not the file) /// Remove a file from the collection (only its link, not the file)
@ -48,13 +48,13 @@ public:
/// Rename file /// Rename file
void vfs_rename(const TQString& fileName,const TQString& newName); void vfs_rename(const TQString& fileName,const TQString& newName);
/// Calculate the amount of space occupied by a file or directory (recursive). /// Calculate the amount of space occupied by a file or directory (recursive).
virtual void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop); virtual void vfs_calcSpace(TQString name ,TDEIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Return the VFS working dir /// Return the VFS working dir
TQString vfs_workingDir(){ return TQString(); } TQString vfs_workingDir(){ return TQString(); }
protected slots: protected slots:
void slotStatResult(KIO::Job *job); void slotStatResult(TDEIO::Job *job);
protected: protected:
/// Save the dictionary to file /// Save the dictionary to file
@ -62,16 +62,16 @@ protected:
/// Restore the dictionary from file /// Restore the dictionary from file
bool restore(); bool restore();
/// return the URLs DB /// return the URLs DB
KConfig* getVirtDB(); TDEConfig* getVirtDB();
bool populateVfsList(const KURL& origin, bool showHidden); bool populateVfsList(const KURL& origin, bool showHidden);
vfile* stat(const KURL& url); vfile* stat(const KURL& url);
static TQDict<KURL::List> virtVfsDict; static TQDict<KURL::List> virtVfsDict;
static KConfig* virt_vfs_db; static TDEConfig* virt_vfs_db;
bool busy; bool busy;
TQString path; TQString path;
KIO::UDSEntry entry; TDEIO::UDSEntry entry;
}; };
#endif #endif

@ -40,8 +40,8 @@
#define REPORT_TIMEOUT 200 #define REPORT_TIMEOUT 200
VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL, VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
PreserveMode pmode, KIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ) : PreserveMode pmode, TDEIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ) :
KIO::Job( showProgressInfo ), m_totalSize( 0 ), m_totalFiles( 0 ), m_totalSubdirs( 0 ), TDEIO::Job( showProgressInfo ), m_totalSize( 0 ), m_totalFiles( 0 ), m_totalSubdirs( 0 ),
m_processedSize( 0 ), m_processedFiles( 0 ), m_processedSubdirs( 0 ), m_tempSize( 0 ), m_tempFiles( 0 ), m_processedSize( 0 ), m_processedFiles( 0 ), m_processedSubdirs( 0 ), m_tempSize( 0 ), m_tempFiles( 0 ),
m_tempSubdirs( 0 ), m_dirsToGetSize(), m_filesToCopy(), m_size(), m_filenum(), m_subdirs(), m_baseURL( baseURL ), m_tempSubdirs( 0 ), m_dirsToGetSize(), m_filesToCopy(), m_size(), m_filenum(), m_subdirs(), m_baseURL( baseURL ),
m_dest( dest ), m_pmode( pmode ), m_mode( mode ), m_asMethod( asMethod ), m_showProgressInfo( showProgressInfo ), m_dest( dest ), m_pmode( pmode ), m_mode( mode ), m_asMethod( asMethod ), m_showProgressInfo( showProgressInfo ),
@ -83,16 +83,16 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
} }
if ( showProgressInfo ) { if ( showProgressInfo ) {
connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ), connect( this, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) ); Observer::self(), TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ), connect( this, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) ); Observer::self(), TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ), connect( this, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) ); Observer::self(), TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ), connect( this, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) ); Observer::self(), TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ), connect( this, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) ); Observer::self(), TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) );
} }
TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) );
@ -100,7 +100,7 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
void VirtualCopyJob::slotStart() { void VirtualCopyJob::slotStart() {
if( m_showProgressInfo ) { if( m_showProgressInfo ) {
if( m_mode == KIO::CopyJob::Move ) if( m_mode == TDEIO::CopyJob::Move )
Observer::self()->slotMoving( this, m_baseURL, m_dest ); Observer::self()->slotMoving( this, m_baseURL, m_dest );
else else
Observer::self()->slotCopying( this, m_baseURL, m_dest ); Observer::self()->slotCopying( this, m_baseURL, m_dest );
@ -158,10 +158,10 @@ void VirtualCopyJob::statNextDir() {
m_currentDir = KURL::relativeURL( m_baseURL, dirToCheck.upURL() ); m_currentDir = KURL::relativeURL( m_baseURL, dirToCheck.upURL() );
KDirSize* kds = KDirSize::dirSizeJob( dirToCheck ); KDirSize* kds = KDirSize::dirSizeJob( dirToCheck );
connect( kds, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotKdsResult( KIO::Job* ) ) ); connect( kds, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotKdsResult( TDEIO::Job* ) ) );
} }
void VirtualCopyJob::slotKdsResult( KIO::Job * job ) { void VirtualCopyJob::slotKdsResult( TDEIO::Job * job ) {
KDirSize* kds = static_cast<KDirSize*>(job); KDirSize* kds = static_cast<KDirSize*>(job);
m_totalSize += kds->totalSize(); m_totalSize += kds->totalSize();
m_totalFiles += kds->totalFiles(); m_totalFiles += kds->totalFiles();
@ -188,18 +188,18 @@ void VirtualCopyJob::createNextDir() {
if( m_currentDir != "./" && !m_currentDir.isEmpty() ) if( m_currentDir != "./" && !m_currentDir.isEmpty() )
m_current.addPath( m_currentDir ); m_current.addPath( m_currentDir );
KIO::Job *job = KIO::stat( m_current ); TDEIO::Job *job = TDEIO::stat( m_current );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
} }
void VirtualCopyJob::slotStatResult( KIO::Job *job ) { void VirtualCopyJob::slotStatResult( TDEIO::Job *job ) {
KURL url = (static_cast<KIO::SimpleJob*>(job) )->url(); KURL url = (static_cast<TDEIO::SimpleJob*>(job) )->url();
if ( job && job->error() ) { if ( job && job->error() ) {
if( job->error() == KIO::ERR_DOES_NOT_EXIST && !url.equals( url.upURL(),true ) ) { if( job->error() == TDEIO::ERR_DOES_NOT_EXIST && !url.equals( url.upURL(),true ) ) {
m_dirStack.push_back( url.fileName() ); m_dirStack.push_back( url.fileName() );
KIO::Job *job = KIO::stat( url.upURL() ); TDEIO::Job *job = TDEIO::stat( url.upURL() );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) ); connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
return; return;
} }
job->showErrorDialog( krApp ); job->showErrorDialog( krApp );
@ -213,15 +213,15 @@ void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
url.addPath( m_dirStack.last() ); url.addPath( m_dirStack.last() );
m_dirStack.pop_back(); m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url ); TDEIO::Job *mkdir_job = TDEIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) ); connect( mkdir_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( TDEIO::Job* ) ) );
} }
else else
copyCurrentDir(); copyCurrentDir();
} }
void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) { void VirtualCopyJob::slotMkdirResult( TDEIO::Job *job ) {
KURL url = (static_cast<KIO::SimpleJob*>(job) )->url(); KURL url = (static_cast<TDEIO::SimpleJob*>(job) )->url();
if ( job && job->error() ) { if ( job && job->error() ) {
job->showErrorDialog( krApp ); job->showErrorDialog( krApp );
@ -235,8 +235,8 @@ void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
url.addPath( m_dirStack.last() ); url.addPath( m_dirStack.last() );
m_dirStack.pop_back(); m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url ); TDEIO::Job *mkdir_job = TDEIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) ); connect( mkdir_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( TDEIO::Job* ) ) );
} }
else else
copyCurrentDir(); copyCurrentDir();
@ -245,25 +245,25 @@ void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
void VirtualCopyJob::copyCurrentDir() { void VirtualCopyJob::copyCurrentDir() {
m_state = ST_COPYING; m_state = ST_COPYING;
KIO::CopyJob * copy_job = PreservingCopyJob::createCopyJob( m_pmode, *m_filesToCopy[ m_currentDir ], m_current, TDEIO::CopyJob * copy_job = PreservingCopyJob::createCopyJob( m_pmode, *m_filesToCopy[ m_currentDir ], m_current,
m_mode, m_asMethod, false ); m_mode, m_asMethod, false );
connect( copy_job, TQT_SIGNAL( copying(KIO::Job *, const KURL &, const KURL &) ), connect( copy_job, TQT_SIGNAL( copying(TDEIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotCopying(KIO::Job *, const KURL &, const KURL &) ) ); this, TQT_SLOT( slotCopying(TDEIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( moving(KIO::Job *, const KURL &, const KURL &) ), connect( copy_job, TQT_SIGNAL( moving(TDEIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotMoving(KIO::Job *, const KURL &, const KURL &) ) ); this, TQT_SLOT( slotMoving(TDEIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( creatingDir(KIO::Job *, const KURL &) ), connect( copy_job, TQT_SIGNAL( creatingDir(TDEIO::Job *, const KURL &) ),
this, TQT_SLOT( slotCreatingDir(KIO::Job *, const KURL &) ) ); this, TQT_SLOT( slotCreatingDir(TDEIO::Job *, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( processedFiles (KIO::Job *, unsigned long) ), connect( copy_job, TQT_SIGNAL( processedFiles (TDEIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedFiles (KIO::Job *, unsigned long) ) ); this, TQT_SLOT( slotProcessedFiles (TDEIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedDirs (KIO::Job *, unsigned long) ), connect( copy_job, TQT_SIGNAL( processedDirs (TDEIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedDirs (KIO::Job *, unsigned long) ) ); this, TQT_SLOT( slotProcessedDirs (TDEIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedSize (KIO::Job *, KIO::filesize_t) ), connect( copy_job, TQT_SIGNAL( processedSize (TDEIO::Job *, TDEIO::filesize_t) ),
this, TQT_SLOT( slotProcessedSize (KIO::Job *, KIO::filesize_t) ) ); this, TQT_SLOT( slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t) ) );
connect( copy_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCopyResult( KIO::Job* ) ) ); connect( copy_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotCopyResult( TDEIO::Job* ) ) );
} }
void VirtualCopyJob::slotCopyResult( KIO::Job *job ) { void VirtualCopyJob::slotCopyResult( TDEIO::Job *job ) {
if ( job && job->error() ) { if ( job && job->error() ) {
job->showErrorDialog( krApp ); job->showErrorDialog( krApp );
} }
@ -286,30 +286,30 @@ void VirtualCopyJob::directoryFinished( const TQString &name ) {
m_subdirs.remove( name ); m_subdirs.remove( name );
} }
void VirtualCopyJob::slotCopying(KIO::Job *, const KURL &from, const KURL &to) { void VirtualCopyJob::slotCopying(TDEIO::Job *, const KURL &from, const KURL &to) {
if( m_showProgressInfo ) if( m_showProgressInfo )
Observer::self()->slotCopying( this, from, to ); Observer::self()->slotCopying( this, from, to );
} }
void VirtualCopyJob::slotMoving(KIO::Job *, const KURL &from, const KURL &to) { void VirtualCopyJob::slotMoving(TDEIO::Job *, const KURL &from, const KURL &to) {
if( m_showProgressInfo ) if( m_showProgressInfo )
Observer::self()->slotMoving( this, from, to ); Observer::self()->slotMoving( this, from, to );
} }
void VirtualCopyJob::slotCreatingDir(KIO::Job *, const KURL &to) { void VirtualCopyJob::slotCreatingDir(TDEIO::Job *, const KURL &to) {
if( m_showProgressInfo ) if( m_showProgressInfo )
Observer::self()->slotCreatingDir( this, to ); Observer::self()->slotCreatingDir( this, to );
} }
void VirtualCopyJob::slotProcessedFiles (KIO::Job *, unsigned long filenum) { void VirtualCopyJob::slotProcessedFiles (TDEIO::Job *, unsigned long filenum) {
m_tempFiles = filenum; m_tempFiles = filenum;
} }
void VirtualCopyJob::slotProcessedDirs (KIO::Job *, unsigned long subdirs) { void VirtualCopyJob::slotProcessedDirs (TDEIO::Job *, unsigned long subdirs) {
m_tempSubdirs = subdirs; m_tempSubdirs = subdirs;
} }
void VirtualCopyJob::slotProcessedSize (KIO::Job *, KIO::filesize_t size) { void VirtualCopyJob::slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t size) {
m_tempSize = size; m_tempSize = size;
} }

@ -47,14 +47,14 @@ typedef enum {
ST_COPYING = 3 ST_COPYING = 3
} State; } State;
class VirtualCopyJob : public KIO::Job class VirtualCopyJob : public TDEIO::Job
{ {
Q_OBJECT Q_OBJECT
public: public:
VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL, VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
PreserveMode pmode, KIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ); PreserveMode pmode, TDEIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo );
protected: protected:
void statNextDir(); void statNextDir();
@ -66,35 +66,35 @@ protected slots:
void slotStart(); void slotStart();
void slotReport(); void slotReport();
void slotKdsResult( KIO::Job * ); void slotKdsResult( TDEIO::Job * );
void slotStatResult( KIO::Job * ); void slotStatResult( TDEIO::Job * );
void slotMkdirResult( KIO::Job * ); void slotMkdirResult( TDEIO::Job * );
void slotCopyResult( KIO::Job * ); void slotCopyResult( TDEIO::Job * );
void slotCopying(KIO::Job *, const KURL &, const KURL &); void slotCopying(TDEIO::Job *, const KURL &, const KURL &);
void slotMoving(KIO::Job *, const KURL &, const KURL &); void slotMoving(TDEIO::Job *, const KURL &, const KURL &);
void slotCreatingDir(KIO::Job *, const KURL &); void slotCreatingDir(TDEIO::Job *, const KURL &);
void slotProcessedFiles (KIO::Job *, unsigned long); void slotProcessedFiles (TDEIO::Job *, unsigned long);
void slotProcessedDirs (KIO::Job *, unsigned long); void slotProcessedDirs (TDEIO::Job *, unsigned long);
void slotProcessedSize (KIO::Job *, KIO::filesize_t); void slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t);
signals: signals:
void totalFiles( KIO::Job *job, unsigned long files ); void totalFiles( TDEIO::Job *job, unsigned long files );
void totalDirs( KIO::Job *job, unsigned long dirs ); void totalDirs( TDEIO::Job *job, unsigned long dirs );
void processedFiles( KIO::Job *job, unsigned long files ); void processedFiles( TDEIO::Job *job, unsigned long files );
void processedDirs( KIO::Job *job, unsigned long dirs ); void processedDirs( TDEIO::Job *job, unsigned long dirs );
private: private:
KIO::filesize_t m_totalSize; TDEIO::filesize_t m_totalSize;
unsigned long m_totalFiles; unsigned long m_totalFiles;
unsigned long m_totalSubdirs; unsigned long m_totalSubdirs;
KIO::filesize_t m_processedSize; TDEIO::filesize_t m_processedSize;
unsigned long m_processedFiles; unsigned long m_processedFiles;
unsigned long m_processedSubdirs; unsigned long m_processedSubdirs;
KIO::filesize_t m_tempSize; TDEIO::filesize_t m_tempSize;
unsigned long m_tempFiles; unsigned long m_tempFiles;
unsigned long m_tempSubdirs; unsigned long m_tempSubdirs;
@ -109,7 +109,7 @@ private:
KURL m_baseURL; KURL m_baseURL;
KURL m_dest; KURL m_dest;
PreserveMode m_pmode; PreserveMode m_pmode;
KIO::CopyJob::CopyMode m_mode; TDEIO::CopyJob::CopyMode m_mode;
bool m_asMethod; bool m_asMethod;
bool m_showProgressInfo; bool m_showProgressInfo;

@ -170,9 +170,9 @@ public:
virtual void processHasExited (int ) virtual void processHasExited (int )
{ {
if( !tmp1.isEmpty() ) if( !tmp1.isEmpty() )
KIO::NetAccess::removeTempFile( tmp1 ); TDEIO::NetAccess::removeTempFile( tmp1 );
if( !tmp2.isEmpty() ) if( !tmp2.isEmpty() )
KIO::NetAccess::removeTempFile( tmp2 ); TDEIO::NetAccess::removeTempFile( tmp2 );
delete this; delete this;
} }
}; };
@ -190,16 +190,16 @@ void KRslots::compareContent( KURL url1, KURL url2 )
TQString tmp1 = TQString(), tmp2 = TQString(); TQString tmp1 = TQString(), tmp2 = TQString();
if (!url1.isLocalFile()) { if (!url1.isLocalFile()) {
if( !KIO::NetAccess::download( url1, tmp1, 0 ) ){ if( !TDEIO::NetAccess::download( url1, tmp1, 0 ) ){
KMessageBox::sorry(krApp,i18n("Krusader is unable to download: ")+url1.fileName()); KMessageBox::sorry(krApp,i18n("Krusader is unable to download: ")+url1.fileName());
return; return;
} }
} else tmp1 = url1.path(); } else tmp1 = url1.path();
if (!url2.isLocalFile()) { if (!url2.isLocalFile()) {
if( !KIO::NetAccess::download( url2, tmp2, 0 ) ){ if( !TDEIO::NetAccess::download( url2, tmp2, 0 ) ){
KMessageBox::sorry(krApp,i18n("Krusader is unable to download: ")+url2.fileName()); KMessageBox::sorry(krApp,i18n("Krusader is unable to download: ")+url2.fileName());
if( tmp1 != url1.path() ) if( tmp1 != url1.path() )
KIO::NetAccess::removeTempFile( tmp1 ); TDEIO::NetAccess::removeTempFile( tmp1 );
return; return;
} }
} else tmp2 = url2.path(); } else tmp2 = url2.path();
@ -883,7 +883,7 @@ void KRslots::execTypeSetup()
// if commands are to be executed in the TE, it must be loaded // if commands are to be executed in the TE, it must be loaded
MAIN_VIEW->createTE(); MAIN_VIEW->createTE();
} }
KConfigGroup grp(krConfig, "Private" ); TDEConfigGroup grp(krConfig, "Private" );
grp.writeEntry( "Command Execution Mode", i ); grp.writeEntry( "Command Execution Mode", i );
break; break;
} }

@ -222,13 +222,13 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
TQString message; TQString message;
switch ( config->getConfigState() ) { switch ( config->getConfigState() ) {
case KConfigBase::NoAccess : case TDEConfigBase::NoAccess :
message = "Krusader's configuration file can't be found. Default values will be used."; message = "Krusader's configuration file can't be found. Default values will be used.";
break; break;
case KConfigBase::ReadOnly : case TDEConfigBase::ReadOnly :
message = "Krusader's configuration file is in READ ONLY mode (why is that!?) Changed values will not be saved"; message = "Krusader's configuration file is in READ ONLY mode (why is that!?) Changed values will not be saved";
break; break;
case KConfigBase::ReadWrite : case TDEConfigBase::ReadWrite :
message = ""; message = "";
break; break;
} }
@ -1091,7 +1091,7 @@ void Krusader::updateGUI( bool enforce ) {
} }
if ( config->readBoolEntry( "Show Terminal Emulator", _ShowTerminalEmulator ) ) { if ( config->readBoolEntry( "Show Terminal Emulator", _ShowTerminalEmulator ) ) {
mainView->slotTerminalEmulator( true ); // create konsole_part mainView->slotTerminalEmulator( true ); // create konsole_part
KConfigGroup grp(krConfig, "Private" ); TDEConfigGroup grp(krConfig, "Private" );
TQValueList<int> lst; TQValueList<int> lst;
lst.append( grp.readNumEntry( "Panel Size", _PanelSize ) ); lst.append( grp.readNumEntry( "Panel Size", _PanelSize ) );
lst.append( grp.readNumEntry( "Terminal Size", _TerminalSize ) ); lst.append( grp.readNumEntry( "Terminal Size", _TerminalSize ) );

@ -118,7 +118,7 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
static Krusader *App; // a kApp style pointer static Krusader *App; // a kApp style pointer
KMountMan *mountMan; // krusader's Mount Manager KMountMan *mountMan; // krusader's Mount Manager
KrusaderView *mainView; // The GUI KrusaderView *mainView; // The GUI
KConfig *config; // allow everyone to access the config TDEConfig *config; // allow everyone to access the config
KIconLoader *iconLoader; // the app's icon loader KIconLoader *iconLoader; // the app's icon loader
PopularUrls *popularUrls; // holds a sorted list of the most popular urls visited PopularUrls *popularUrls; // holds a sorted list of the most popular urls visited
QueueManager *queueManager; QueueManager *queueManager;

@ -139,7 +139,7 @@ void KrusaderView::start( TQStringList leftTabs, TQStringList leftTypes, TQValue
void KrusaderView::slotCurrentChanged( TQString p ) { void KrusaderView::slotCurrentChanged( TQString p ) {
cmdLine->setCurrent( p ); cmdLine->setCurrent( p );
if ( konsole_part != 0L && konsole_part->widget() != 0L ) { if ( konsole_part != 0L && konsole_part->widget() != 0L ) {
KConfigGroupSaver grp(krConfig, "General"); TDEConfigGroupSaver grp(krConfig, "General");
if (krConfig->readBoolEntry("Send CDs", _SendCDs)) // hopefully, this is cached in kconfig if (krConfig->readBoolEntry("Send CDs", _SendCDs)) // hopefully, this is cached in kconfig
if( !konsole_part->url().equals( KURL( p ), true ) ) if( !konsole_part->url().equals( KURL( p ), true ) )
konsole_part->openURL( KURL( p ) ); konsole_part->openURL( KURL( p ) );
@ -189,7 +189,7 @@ void KrusaderView::panelSwitch() { activePanel->otherPanel->slotFocusOnMe(); }
void KrusaderView::slotSetActivePanel( ListPanel *p ) { activePanel = p; } void KrusaderView::slotSetActivePanel( ListPanel *p ) { activePanel = p; }
void KrusaderView::slotTerminalEmulator( bool show ) { void KrusaderView::slotTerminalEmulator( bool show ) {
KConfigGroupSaver grp(krConfig, "Look&Feel"); TDEConfigGroupSaver grp(krConfig, "Look&Feel");
bool fullscreen = krConfig->readBoolEntry("Fullscreen Terminal Emulator", false); bool fullscreen = krConfig->readBoolEntry("Fullscreen Terminal Emulator", false);
static bool fnKeysShown=true; // first time init. should be overridden static bool fnKeysShown=true; // first time init. should be overridden
static bool cmdLineShown=true; static bool cmdLineShown=true;
@ -279,7 +279,7 @@ void KrusaderView::focusTerminalEmulator()
void KrusaderView::switchFullScreenTE() void KrusaderView::switchFullScreenTE()
{ {
if( terminal_dock->isVisible() && konsole_part && konsole_part->widget() && konsole_part->widget()->isVisible() ) { if( terminal_dock->isVisible() && konsole_part && konsole_part->widget() && konsole_part->widget()->isVisible() ) {
KConfigGroup grp(krConfig, "Look&Feel"); TDEConfigGroup grp(krConfig, "Look&Feel");
bool fullscreen=grp.readBoolEntry("Fullscreen Terminal Emulator", false); bool fullscreen=grp.readBoolEntry("Fullscreen Terminal Emulator", false);
slotTerminalEmulator( false ); slotTerminalEmulator( false );
grp.writeEntry("Fullscreen Terminal Emulator", !fullscreen); grp.writeEntry("Fullscreen Terminal Emulator", !fullscreen);

@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
KrusaderApp app; KrusaderApp app;
{ {
KConfigGroupSaver saver(app.config(), "Look&Feel"); TDEConfigGroupSaver saver(app.config(), "Look&Feel");
bool singleInstanceMode = app.config()->readBoolEntry( "Single Instance Mode", _SingleInstanceMode ); bool singleInstanceMode = app.config()->readBoolEntry( "Single Instance Mode", _SingleInstanceMode );
// register with the dcop server // register with the dcop server
@ -212,7 +212,7 @@ int main(int argc, char *argv[]) {
// splash screen - if the user wants one // splash screen - if the user wants one
KSplashScreen *splash = 0; KSplashScreen *splash = 0;
{ // don't remove bracket { // don't remove bracket
KConfigGroupSaver saver(app.config(), "Look&Feel"); TDEConfigGroupSaver saver(app.config(), "Look&Feel");
if (app.config()->readBoolEntry( "Show splashscreen", _ShowSplashScreen )) { if (app.config()->readBoolEntry( "Show splashscreen", _ShowSplashScreen )) {
TQString splashFilename = locate( "data", "krusader/splash.png" ); TQString splashFilename = locate( "data", "krusader/splash.png" );
TQPixmap pixmap( splashFilename ); TQPixmap pixmap( splashFilename );

@ -93,7 +93,7 @@ void PanelManager::startPanel( ListPanel *panel, const KURL& path ) {
panel->start( path ); panel->start( path );
} }
void PanelManager::saveSettings( KConfig *config, const TQString& key, bool localOnly ) { void PanelManager::saveSettings( TDEConfig *config, const TQString& key, bool localOnly ) {
TQStringList l; TQStringList l;
TQStringList types; TQStringList types;
TQValueList<int> props; TQValueList<int> props;
@ -113,7 +113,7 @@ void PanelManager::saveSettings( KConfig *config, const TQString& key, bool loca
config->writeEntry( key + " Props", props ); config->writeEntry( key + " Props", props );
} }
void PanelManager::loadSettings( KConfig *config, const TQString& key ) { void PanelManager::loadSettings( TDEConfig *config, const TQString& key ) {
TQStringList l = config->readPathListEntry( key ); TQStringList l = config->readPathListEntry( key );
TQStringList types = config->readListEntry( key + " Types" ); TQStringList types = config->readListEntry( key + " Types" );
TQValueList<int> props = config->readIntListEntry( key + " Props" ); TQValueList<int> props = config->readIntListEntry( key + " Props" );
@ -123,7 +123,7 @@ void PanelManager::loadSettings( KConfig *config, const TQString& key ) {
while( types.count() < l.count() ) while( types.count() < l.count() )
{ {
KConfigGroupSaver saver( config, "Look&Feel"); TDEConfigGroupSaver saver( config, "Look&Feel");
types << krConfig->readEntry( "Default Panel Type", _DefaultPanelType ); types << krConfig->readEntry( "Default Panel Type", _DefaultPanelType );
} }
while( props.count() < l.count() ) while( props.count() < l.count() )

@ -5,7 +5,7 @@
#include <tqlayout.h> #include <tqlayout.h>
#include "paneltabbar.h" #include "paneltabbar.h"
class KConfig; class TDEConfig;
class ListPanel; class ListPanel;
class TQWidgetStack; class TQWidgetStack;
class TQToolButton; class TQToolButton;
@ -39,8 +39,8 @@ class PanelManager: public TQWidget {
*/ */
void swapPanels(); void swapPanels();
void saveSettings(KConfig *config, const TQString& key, bool localOnly = true ); void saveSettings(TDEConfig *config, const TQString& key, bool localOnly = true );
void loadSettings(KConfig *config, const TQString& key); void loadSettings(TDEConfig *config, const TQString& key);
int activeTab(); int activeTab();
void setActiveTab( int ); void setActiveTab( int );
void setCurrentTab( int ); void setCurrentTab( int );

@ -21,7 +21,7 @@
#include "tar.h" #include "tar.h"
using namespace KIO; using namespace TDEIO;
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
extern "C" { int KDE_EXPORT kdemain( int argc, char **argv ); } extern "C" { int KDE_EXPORT kdemain( int argc, char **argv ); }
@ -230,7 +230,7 @@ void ArchiveProtocol::listDir( const KURL & url ) {
kdDebug( 7109 ) << "Checking (stat) on " << _path << endl; kdDebug( 7109 ) << "Checking (stat) on " << _path << endl;
struct stat buff; struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ; return ;
} }
// It's a real dir -> redirect // It's a real dir -> redirect
@ -262,11 +262,11 @@ void ArchiveProtocol::listDir( const KURL & url ) {
kdDebug( 7109 ) << TQString( "Looking for entry %1" ).arg( path ) << endl; kdDebug( 7109 ) << TQString( "Looking for entry %1" ).arg( path ) << endl;
const KArchiveEntry* e = root->entry( path ); const KArchiveEntry* e = root->entry( path );
if ( !e ) { if ( !e ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ; return ;
} }
if ( ! e->isDirectory() ) { if ( ! e->isDirectory() ) {
error( KIO::ERR_IS_FILE, url.prettyURL() ); error( TDEIO::ERR_IS_FILE, url.prettyURL() );
return ; return ;
} }
dir = ( KArchiveDirectory* ) e; dir = ( KArchiveDirectory* ) e;
@ -306,17 +306,17 @@ void ArchiveProtocol::stat( const KURL & url ) {
struct stat buff; struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) { if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
kdDebug( 7109 ) << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror( errno ) << endl; kdDebug( 7109 ) << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror( errno ) << endl;
error( KIO::ERR_DOES_NOT_EXIST, url.path() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return ; return ;
} }
// Real directory. Return just enough information for KRun to work // Real directory. Return just enough information for KRun to work
UDSAtom atom; UDSAtom atom;
atom.m_uds = KIO::UDS_NAME; atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName(); atom.m_str = url.fileName();
entry.append( atom ); entry.append( atom );
kdDebug( 7109 ) << "ArchiveProtocol::stat returning name=" << url.fileName() << endl; kdDebug( 7109 ) << "ArchiveProtocol::stat returning name=" << url.fileName() << endl;
atom.m_uds = KIO::UDS_FILE_TYPE; atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = buff.st_mode & S_IFMT; atom.m_long = buff.st_mode & S_IFMT;
entry.append( atom ); entry.append( atom );
@ -339,7 +339,7 @@ void ArchiveProtocol::stat( const KURL & url ) {
archiveEntry = root->entry( path ); archiveEntry = root->entry( path );
} }
if ( !archiveEntry ) { if ( !archiveEntry ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ; return ;
} }
@ -354,7 +354,7 @@ void ArchiveProtocol::get( const KURL & url ) {
TQString path; TQString path;
if ( !checkNewFile( url, path ) ) { if ( !checkNewFile( url, path ) ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ; return ;
} }
@ -362,11 +362,11 @@ void ArchiveProtocol::get( const KURL & url ) {
const KArchiveEntry* archiveEntry = root->entry( path ); const KArchiveEntry* archiveEntry = root->entry( path );
if ( !archiveEntry ) { if ( !archiveEntry ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() ); error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ; return ;
} }
if ( archiveEntry->isDirectory() ) { if ( archiveEntry->isDirectory() ) {
error( KIO::ERR_IS_DIRECTORY, url.prettyURL() ); error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL() );
return ; return ;
} }
const KArchiveFile* archiveFileEntry = static_cast<const KArchiveFile *>( archiveEntry ); const KArchiveFile* archiveFileEntry = static_cast<const KArchiveFile *>( archiveEntry );

@ -23,7 +23,7 @@
#include <kio/slavebase.h> #include <kio/slavebase.h>
#include <sys/types.h> #include <sys/types.h>
class ArchiveProtocol : public KIO::SlaveBase { class ArchiveProtocol : public TDEIO::SlaveBase {
public: public:
ArchiveProtocol( const TQCString &pool, const TQCString &app ); ArchiveProtocol( const TQCString &pool, const TQCString &app );
virtual ~ArchiveProtocol(); virtual ~ArchiveProtocol();
@ -35,7 +35,7 @@ public:
virtual void mkdir(const KURL& url,int permissions); virtual void mkdir(const KURL& url,int permissions);
protected: protected:
void createUDSEntry( const KArchiveEntry * tarEntry, KIO::UDSEntry & entry ); void createUDSEntry( const KArchiveEntry * tarEntry, TDEIO::UDSEntry & entry );
bool checkNewFile( const KURL & url, TQString & path ); bool checkNewFile( const KURL & url, TQString & path );
KArchive * m_archiveFile; KArchive * m_archiveFile;

@ -30,7 +30,7 @@
#include "virt.h" #include "virt.h"
using namespace KIO; using namespace TDEIO;
#define VIRT_VFS_DB "virt_vfs.db" #define VIRT_VFS_DB "virt_vfs.db"
#define VIRT_PROTOCOL "virt" #define VIRT_PROTOCOL "virt"
@ -48,7 +48,7 @@ extern "C" { int kdemain( int argc, char **argv ); }
} }
TQDict<KURL::List> VirtProtocol::kioVirtDict; TQDict<KURL::List> VirtProtocol::kioVirtDict;
KConfig* VirtProtocol::kio_virt_db; TDEConfig* VirtProtocol::kio_virt_db;
int kdemain( int argc, char **argv ) { int kdemain( int argc, char **argv ) {
TDEInstance instance( "kio_virt" ); TDEInstance instance( "kio_virt" );
@ -65,7 +65,7 @@ int kdemain( int argc, char **argv ) {
} }
VirtProtocol::VirtProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "virt", pool, app ) { VirtProtocol::VirtProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "virt", pool, app ) {
kio_virt_db = new KConfig(VIRT_VFS_DB,false,"data"); kio_virt_db = new TDEConfig(VIRT_VFS_DB,false,"data");
} }
VirtProtocol::~VirtProtocol() { VirtProtocol::~VirtProtocol() {
@ -75,7 +75,7 @@ VirtProtocol::~VirtProtocol() {
void VirtProtocol::del(KURL const & /*url */, bool /* isFile */ ){ void VirtProtocol::del(KURL const & /*url */, bool /* isFile */ ){
// KRDEBUG(url.path()); // KRDEBUG(url.path());
messageBox(KIO::SlaveBase::QuestionYesNo, messageBox(TDEIO::SlaveBase::QuestionYesNo,
i18n(""), i18n(""),
i18n("Virtulal delete"), i18n("Virtulal delete"),
i18n("remove from virtual space"), i18n("remove from virtual space"),
@ -132,7 +132,7 @@ void VirtProtocol::mkdir(const KURL& url,int){
if ( path.isEmpty() ) path = "/"; if ( path.isEmpty() ) path = "/";
if( kioVirtDict[ path ] ){ if( kioVirtDict[ path ] ){
error( KIO::ERR_DIR_ALREADY_EXIST, url.path() ); error( TDEIO::ERR_DIR_ALREADY_EXIST, url.path() );
return; return;
} }
@ -222,7 +222,7 @@ bool VirtProtocol::rewriteURL(const KURL& /* src */, KURL&){
bool VirtProtocol::save(){ bool VirtProtocol::save(){
lock(); lock();
KConfig* db = new KConfig(VIRT_VFS_DB,false,"data");; TDEConfig* db = new TDEConfig(VIRT_VFS_DB,false,"data");;
db->setGroup("virt_db"); db->setGroup("virt_db");
TQDictIterator<KURL::List> it( kioVirtDict ); // See TQDictIterator TQDictIterator<KURL::List> it( kioVirtDict ); // See TQDictIterator
@ -246,7 +246,7 @@ bool VirtProtocol::save(){
bool VirtProtocol::load(){ bool VirtProtocol::load(){
lock(); lock();
KConfig* db = new KConfig(VIRT_VFS_DB,false,"data"); TDEConfig* db = new TDEConfig(VIRT_VFS_DB,false,"data");
db->setGroup("virt_db"); db->setGroup("virt_db");
TQMap<TQString, TQString> map = db->entryMap("virt_db"); TQMap<TQString, TQString> map = db->entryMap("virt_db");

@ -23,7 +23,7 @@
#include <kconfig.h> #include <kconfig.h>
#include <kio/slavebase.h> #include <kio/slavebase.h>
class VirtProtocol : public KIO::SlaveBase { class VirtProtocol : public TDEIO::SlaveBase {
public: public:
VirtProtocol( const TQCString &pool, const TQCString &app ); VirtProtocol( const TQCString &pool, const TQCString &app );
virtual ~VirtProtocol(); virtual ~VirtProtocol();
@ -41,12 +41,12 @@ protected:
bool save(); bool save();
bool load(); bool load();
void local_entry(const KURL& url,KIO::UDSEntry& entry); void local_entry(const KURL& url,TDEIO::UDSEntry& entry);
bool addDir(TQString& path); bool addDir(TQString& path);
static TQDict<KURL::List> kioVirtDict; static TQDict<KURL::List> kioVirtDict;
static KConfig* kio_virt_db; static TDEConfig* kio_virt_db;
bool rewriteURL(const KURL&, KURL&); bool rewriteURL(const KURL&, KURL&);

Loading…
Cancel
Save