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
group
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 !)
FIXED: [ 962598 ] viewer didn't display XML files
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
};
using namespace KIO;
using namespace TDEIO;
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;
struct stat buff;
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;
}
// It's a real dir -> redirect
@ -278,12 +278,12 @@ void kio_isoProtocol::listDir( const KURL & url )
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
error( KIO::ERR_DOES_NOT_EXIST, path );
error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
if ( ! e->isDirectory() )
{
error( KIO::ERR_IS_FILE, path );
error( TDEIO::ERR_IS_FILE, path );
return;
}
dir = (KArchiveDirectory*)e;
@ -328,17 +328,17 @@ void kio_isoProtocol::stat( const KURL & url )
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
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;
}
// Real directory. Return just enough information for KRun to work
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName();
entry.append( atom );
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;
entry.append( atom );
@ -363,7 +363,7 @@ void kio_isoProtocol::stat( const KURL & url )
}
if ( !isoEntry )
{
error( KIO::ERR_DOES_NOT_EXIST, path );
error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
createUDSEntry( isoEntry, entry );
@ -412,7 +412,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
pptr = pointer_block.data();
} else {
error(KIO::ERR_COULD_NOT_READ, path);
error(TDEIO::ERR_COULD_NOT_READ, path);
return;
}
} else {
@ -474,7 +474,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
}
if (pos!=size) {
error(KIO::ERR_COULD_NOT_READ, path);
error(TDEIO::ERR_COULD_NOT_READ, path);
return;
}
@ -492,7 +492,7 @@ void kio_isoProtocol::get( const KURL & url )
TQString path;
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;
}
@ -501,12 +501,12 @@ void kio_isoProtocol::get( const KURL & url )
if ( !isoEntry )
{
error( KIO::ERR_DOES_NOT_EXIST, path );
error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
if ( isoEntry->isDirectory() )
{
error( KIO::ERR_IS_DIRECTORY, path );
error( TDEIO::ERR_IS_DIRECTORY, path );
return;
}

@ -28,7 +28,7 @@
class KIso;
class kio_isoProtocol : public KIO::SlaveBase
class kio_isoProtocol : public TDEIO::SlaveBase
{
public:
kio_isoProtocol( const TQCString &pool, const TQCString &app );
@ -40,7 +40,7 @@ public:
protected:
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 );
KIso * m_isoFile;

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

@ -57,7 +57,7 @@
#define KRDEBUG(X...)
#endif
using namespace KIO;
using namespace TDEIO;
extern "C" {
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),
password(TQString()) {
krConfig = new KConfig( "krusaderrc" );
krConfig = new TDEConfig( "krusaderrc" );
krConfig->setGroup( "Dependencies" );
dirDict.setAutoDelete(true);
@ -264,14 +264,14 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
}
UDSEntry* entry = findFileEntry(url);
if( !entry ){
error(KIO::ERR_DOES_NOT_EXIST,url.path());
error(TDEIO::ERR_DOES_NOT_EXIST,url.path());
return;
}
if(KFileItem(*entry,url).isDir()){
error(KIO::ERR_IS_DIRECTORY,url.path());
error(TDEIO::ERR_IS_DIRECTORY,url.path());
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
if( !extArcReady && arcType == "rpm"){
KrShellProcess cpio;
@ -329,7 +329,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
get( url, tries - 1 );
return;
}
error( KIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() );
error( TDEIO::ERR_ACCESS_DENIED, url.path() + "\n\n" + proc.getErrorMsg() );
return;
}
}
@ -342,31 +342,31 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
get( url, tries - 1 );
return;
}
error( KIO::ERR_ACCESS_DENIED, url.path() );
error( TDEIO::ERR_ACCESS_DENIED, url.path() );
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 $
TQCString _path( TQFile::encodeName(arcTempDir+file) );
KDE_struct_stat buff;
if( KDE_lstat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
error( KIO::ERR_ACCESS_DENIED, url.path() );
error( TDEIO::ERR_ACCESS_DENIED, url.path() );
else
error( KIO::ERR_DOES_NOT_EXIST, url.path() );
error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
if ( S_ISDIR( buff.st_mode ) ) {
error( KIO::ERR_IS_DIRECTORY, url.path() );
error( TDEIO::ERR_IS_DIRECTORY, url.path() );
return;
}
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;
}
int fd = KDE_open( _path.data(), O_RDONLY );
if ( fd < 0 ) {
error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
return;
}
// 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 */ );
emit mimeType( mt->name() );
KIO::filesize_t processed_size = 0;
TDEIO::filesize_t processed_size = 0;
TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() ){
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 (KDE_lseek(fd, offset, SEEK_SET) == offset){
canResume ();
@ -397,7 +397,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
if (n == -1){
if (errno == EINTR)
continue;
error( KIO::ERR_COULD_NOT_READ, url.path());
error( TDEIO::ERR_COULD_NOT_READ, url.path());
close(fd);
return;
}
@ -444,7 +444,7 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){
}
if( !findFileEntry(url) ){
if( ( arcType != "arj" && arcType != "lha" ) || isFile ) {
error(KIO::ERR_DOES_NOT_EXIST,url.path());
error(TDEIO::ERR_DOES_NOT_EXIST,url.path());
return;
}
}
@ -503,7 +503,7 @@ void kio_krarcProtocol::stat( const KURL & url ){
if( entry ){
statEntry( *entry );
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) {
@ -554,11 +554,11 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
proc.start(TDEProcess::Block, TDEProcess::AllOutput);
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;
}
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;
}
@ -1367,7 +1367,7 @@ bool kio_krarcProtocol::initArcParameters() {
}
if( KStandardDirs::findExe(cmd).isEmpty() ){
error( KIO::ERR_CANNOT_LAUNCH_PROCESS,
error( TDEIO::ERR_CANNOT_LAUNCH_PROCESS,
cmd+
i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd));
KRDEBUG("Failed to find cmd: " << cmd);
@ -1580,7 +1580,7 @@ void kio_krarcProtocol::invalidatePassword() {
if( !encrypted )
return;
KIO::AuthInfo authInfo;
TDEIO::AuthInfo authInfo;
authInfo.caption= i18n( "Krarc Password Dialog" );
authInfo.username= "archive";
authInfo.readOnly = true;
@ -1604,7 +1604,7 @@ TQString kio_krarcProtocol::getPassword() {
if( !encrypted )
return (password = "" );
KIO::AuthInfo authInfo;
TDEIO::AuthInfo authInfo;
authInfo.caption= i18n( "Krarc Password Dialog" );
authInfo.username= "archive";
authInfo.readOnly = true;

@ -32,7 +32,7 @@ class TDEProcess;
class KFileItem;
class TQCString;
class kio_krarcProtocol : public TQObject, public KIO::SlaveBase {
class kio_krarcProtocol : public TQObject, public TDEIO::SlaveBase {
Q_OBJECT
public:
@ -78,27 +78,27 @@ private:
/** return the name of the directory inside the archive. */
TQString findArcDirectory(const KURL& url);
/** 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). */
KIO::UDSEntryList* addNewDir(TQString path);
TDEIO::UDSEntryList* addNewDir(TQString path);
TQString fullPathName( TQString name );
TQString convertFileName( TQString name );
static TQString convertName( 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 archiveChanged; //< true if the archive was changed.
bool archiveChanging; //< true if the archive is currently changing.
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.
TQString arcPath; //< the archive location
TQString arcTempDir; //< the currently used temp directory.
TQString arcType; //< the archive type.
bool extArcReady; //< Used for RPM & DEB files.
TQString password; //< Password for the archives
KConfig *krConfig; //< The configuration file for krusader
TDEConfig *krConfig; //< The configuration file for krusader
TQString lastData;
TQString encryptedArchPath;

@ -65,7 +65,7 @@ void KrKeyDialog::slotImportShortcuts() {
if ( filename.isEmpty() )
return;
KConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ );
TDEConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ );
if ( ! conf.hasGroup("Shortcuts") ) {
int answer = KMessageBox::warningContinueCancel( this, //parent
i18n("This file does not seem to be a valid keymap.\n"
@ -136,7 +136,7 @@ void KrKeyDialog::slotExportShortcuts() {
!= KMessageBox::Continue)
return;
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
f.close();
else {
@ -144,7 +144,7 @@ void KrKeyDialog::slotExportShortcuts() {
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.
//krApp->actionCollection()->writeShortcutSettings( "Shortcuts", &conf );

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

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

@ -36,7 +36,7 @@
#include "krprogress.h"
#include "../krusader.h"
KrProgress::KrProgress( KIO::Job* job )
KrProgress::KrProgress( TDEIO::Job* job )
: ProgressBase( krApp ),
m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0),
m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0){
@ -115,16 +115,16 @@ KrProgress::KrProgress( KIO::Job* job )
setOnlyClean(false);
setStopOnClose(true);
// Connect global progress info signals
connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) );
connect( job, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString & ) ),
TQT_SLOT( slotInfoMessage( TDEIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( totalSize( TDEIO::Job*, TDEIO::filesize_t ) ),
TQT_SLOT( slotTotalSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( processedSize( TDEIO::Job*, TDEIO::filesize_t ) ),
TQT_SLOT( slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t ) ) );
connect( job, TQT_SIGNAL( speed( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( slotSpeed( TDEIO::Job*, unsigned long ) ) );
// change to modal & move to Krusader's center
TQPoint center((krApp->width()-width())/2,(krApp->height()-height())/2);
@ -137,18 +137,18 @@ KrProgress::KrProgress( KIO::Job* job )
KrProgress::~KrProgress(){}
void KrProgress::slotTotalSize( KIO::Job*, KIO::filesize_t bytes ){
void KrProgress::slotTotalSize( TDEIO::Job*, TDEIO::filesize_t bytes ){
m_iTotalSize = bytes;
}
void KrProgress::slotTotalFiles( KIO::Job*, unsigned long files ){
void KrProgress::slotTotalFiles( TDEIO::Job*, unsigned long files ){
m_iTotalFiles = files;
showTotals();
}
void KrProgress::slotTotalDirs( KIO::Job*, unsigned long dirs ){
void KrProgress::slotTotalDirs( TDEIO::Job*, unsigned long dirs ){
m_iTotalDirs = dirs;
showTotals();
}
@ -168,8 +168,8 @@ void KrProgress::showTotals(){
}
}
void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){
TQString tmp(i18n( "%1% of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize)));
void KrProgress::slotPercent( TDEIO::Job*, unsigned long percent ){
TQString tmp(i18n( "%1% of %2 ").arg( percent ).arg( TDEIO::convertSize(m_iTotalSize)));
m_pProgressBar->setValue( percent );
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->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;
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 );
}
void KrProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs )
void KrProgress::slotProcessedDirs( TDEIO::Job*, unsigned long 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;
@ -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 ) {
speedLabel->setText( i18n( "Working") );
} else {
#if KDE_IS_VERSION(3,4,0)
unsigned int seconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second );
TQString remaining = KIO::convertSeconds(seconds);
unsigned int seconds = TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second );
TQString remaining = TDEIO::convertSeconds(seconds);
#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
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>
class KrProgress : public KIO::ProgressBase {
class KrProgress : public TDEIO::ProgressBase {
Q_OBJECT
public:
KrProgress(KIO::Job* job);
KrProgress(TDEIO::Job* job);
virtual ~KrProgress();
public slots:
virtual void slotTotalSize( KIO::Job*, KIO::filesize_t bytes );
virtual void slotTotalFiles( KIO::Job*, unsigned long files );
virtual void slotTotalDirs( KIO::Job*, unsigned long dirs );
virtual void slotTotalSize( TDEIO::Job*, TDEIO::filesize_t bytes );
virtual void slotTotalFiles( TDEIO::Job*, unsigned long files );
virtual void slotTotalDirs( TDEIO::Job*, unsigned long dirs );
virtual void slotProcessedSize( KIO::Job*, KIO::filesize_t bytes );
virtual void slotProcessedFiles( KIO::Job*, unsigned long files );
virtual void slotProcessedDirs( KIO::Job*, unsigned long dirs );
virtual void slotProcessedSize( TDEIO::Job*, TDEIO::filesize_t bytes );
virtual void slotProcessedFiles( TDEIO::Job*, unsigned long files );
virtual void slotProcessedDirs( TDEIO::Job*, unsigned long dirs );
virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second );
virtual void slotPercent( KIO::Job*, unsigned long percent );
virtual void slotInfoMessage( KIO::Job*, const TQString & msg );
virtual void slotSpeed( TDEIO::Job*, unsigned long bytes_per_second );
virtual void slotPercent( TDEIO::Job*, unsigned long percent );
virtual void slotInfoMessage( TDEIO::Job*, const TQString & msg );
virtual void slotStop();
virtual void closeEvent( TQCloseEvent* );
@ -70,11 +70,11 @@ protected:
KProgress* m_pProgressBar;
KIO::filesize_t m_iTotalSize;
TDEIO::filesize_t m_iTotalSize;
unsigned long m_iTotalFiles;
unsigned long m_iTotalDirs;
KIO::filesize_t m_iProcessedSize;
TDEIO::filesize_t m_iProcessedSize;
unsigned long m_iProcessedDirs;
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
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 ),
empty( false ), supermount( false ) {
resize( 150, 200 );
@ -100,7 +100,7 @@ void KRFSDisplay::paintEvent( TQPaintEvent * ) {
paint.drawText( 10, 37, "(" + realName + ")" );
if ( mounted ) { // incase the filesystem is already mounted
// 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)
TQPen systemPen = paint.pen();
paint.setPen( TQt::black );
@ -110,8 +110,8 @@ void KRFSDisplay::paintEvent( TQPaintEvent * ) {
paint.fillRect( 11, 111, 8, 8, TQBrush( TQt::white ) );
// now, the text for the boxes
paint.setPen( systemPen );
paint.drawText( 25, 100, i18n( "Used: " ) + KIO::convertSizeFromKB( totalSpace - freeSpace ) );
paint.drawText( 25, 120, i18n( "Free: " ) + KIO::convertSizeFromKB( freeSpace ) );
paint.drawText( 25, 100, i18n( "Used: " ) + TDEIO::convertSizeFromKB( totalSpace - freeSpace ) );
paint.drawText( 25, 120, i18n( "Free: " ) + TDEIO::convertSizeFromKB( freeSpace ) );
// first, create the empty pie
// bottom...
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.append( new KRPieSlice( 100, TQt::yellow, "DEFAULT" ) );
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 );
slices.removeLast();
slices.append( new KRPieSlice( size * 100 / totalSize, colors[ i ], label ) );

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

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

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

@ -184,7 +184,7 @@ void LoaderWidget::setCurrentURL( KURL url )
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 ) );
directories->setText( TQString("%1").arg( dirNum ) );
@ -475,7 +475,7 @@ int DiskUsage::calculateSizes( Directory *dirEntry, bool emitSig, int depth )
if( dirEntry == 0 )
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 )
{
@ -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 );
if( dirEntry == currentDirectory )
@ -637,20 +637,20 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
emit deleted( file );
deleteNr++;
TQGuardedPtr<KIO::Job> job;
TQGuardedPtr<TDEIO::Job> job;
if( trash )
{
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash( url, true );
job = TDEIO::trash( url, true );
#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
connect(job,TQT_SIGNAL(result(KIO::Job*)),krApp,TQT_SLOT(changeTrashIcon()));
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),krApp,TQT_SLOT(changeTrashIcon()));
}
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

@ -128,7 +128,7 @@ protected:
TQPtrDict<Properties> propertyMap;
Directory* currentDirectory;
KIO::filesize_t currentSize;
TDEIO::filesize_t currentSize;
virtual void keyPressEvent( TQKeyEvent * );
virtual bool event( TQEvent * );
@ -184,7 +184,7 @@ public:
void init();
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; }
public slots:

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

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

@ -4,7 +4,7 @@
#include <tqstringlist.h>
class KConfig;
class TDEConfig;
namespace Filelight
@ -13,7 +13,7 @@ namespace Filelight
class Config
{
static KConfig& kconfig();
static TDEConfig& kconfig();
public:
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 ConstIterator;
@ -214,7 +214,7 @@ public:
inline void setPercent( int p ) {m_percent = p;}
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_size = totalSize;

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

@ -194,9 +194,9 @@ RadialMap::Widget::mousePressEvent( TQMouseEvent *e )
const int userIntention = KMessageBox::warningContinueCancel( this, message, TQString(), KGuiItem( i18n("&Delete"), "editdelete" ) );
if( userIntention == KMessageBox::Continue ) {
KIO::Job *job = KIO::del( url );
TDEIO::Job *job = TDEIO::del( url );
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() );
}
}
@ -231,7 +231,7 @@ RadialMap::Widget::mousePressEvent( TQMouseEvent *e )
}
void
RadialMap::Widget::deleteJobFinished( KIO::Job *job )
RadialMap::Widget::deleteJobFinished( TDEIO::Job *job )
{
TQApplication::restoreOverrideCursor();
if( !job->error() )

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

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

@ -60,7 +60,7 @@ void KrRemoteEncodingMenu::slotAboutToShow()
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())
{
int id = 1;
@ -120,7 +120,7 @@ void KrRemoteEncodingMenu::slotItemSelected(int id)
{
KURL currentURL = ACTIVE_PANEL->virtualPath();
KConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
TDEConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
TQString host = currentURL.host();
if (!popupMenu()->isItemChecked(id))
@ -147,7 +147,7 @@ void KrRemoteEncodingMenu::slotDefault()
// We have no choice but delete all higher domain level
// 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);
if (!partList.isEmpty())
@ -197,7 +197,7 @@ void KrRemoteEncodingMenu::updateKIOSlaves()
TQByteArray data;
TQDataStream stream(data, IO_WriteOnly);
stream << TQString();
client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(TQString)", data);
client->send("*", "TDEIO::Scheduler", "reparseSlaveConfiguration(TQString)", data);
delete client;
// Reload the page with the new charset

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

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

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

@ -43,7 +43,7 @@ m_job( 0L ) {
timer = new TQTimer( this );
connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( showPreview() ) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
setSupportedMimeTypes( TDEIO::PreviewJob::supportedMimeTypes() );
}
KrusaderImageFilePreview::~KrusaderImageFilePreview() {
@ -76,8 +76,8 @@ void KrusaderImageFilePreview::showPreview( const KURL &url, bool force ) {
int h = imageLabel->contentsRect().height() - 4;
m_job = createJob( url, w, h );
connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ),
this, TQT_SLOT( slotResult( KIO::Job * ) ) );
connect( m_job, TQT_SIGNAL( result( TDEIO::Job * ) ),
this, TQT_SLOT( slotResult( TDEIO::Job * ) ) );
connect( m_job, TQT_SIGNAL( 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???
}
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;
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 ) {
@ -114,7 +114,7 @@ void KrusaderImageFilePreview::slotFailed( const KFileItem* item ) {
KIcon::DisabledState ) );
}
void KrusaderImageFilePreview::slotResult( KIO::Job *job ) {
void KrusaderImageFilePreview::slotResult( TDEIO::Job *job ) {
if ( job == m_job )
m_job = 0L;
}

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

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

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

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

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

@ -598,7 +598,7 @@ void LocateDlg::feedToListBox()
}
KURL url = KURL::fromPathOrURL(TQString("virt:/")+ queryName);
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_MNG->slotNewTab(url.prettyURL());
accept();

@ -162,7 +162,7 @@ void KDiskFreeSp::dfDone()
KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
TQString mountPoint = KIO::findPathMountPoint( path );
TQString mountPoint = TDEIO::findPathMountPoint( path );
job->readDF( mountPoint );
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
nonmount_fs << "supermount";
{
KConfigGroupSaver saver(krConfig, "Advanced");
TDEConfigGroupSaver saver(krConfig, "Advanced");
TQStringList nonmount = TQStringList::split(",", krConfig->readEntry("Nonmount Points", _NonMountPoints));
nonmount_fs_mntpoint += nonmount;
// simplify the white space
@ -115,7 +115,7 @@ KMountPoint *KMountMan::findInListByMntPoint(KMountPoint::List &lst, TQString va
return 0;
}
void KMountMan::jobResult(KIO::Job *job) {
void KMountMan::jobResult(TDEIO::Job *job) {
waiting = false;
if ( job->error() )
job->showErrorDialog( 0 );
@ -127,9 +127,9 @@ void KMountMan::mount( TQString mntPoint, bool blocking ) {
if (!m) return;
if (blocking)
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);
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) {
tqApp->processEvents();
usleep( 1000 );
@ -139,9 +139,9 @@ void KMountMan::mount( TQString mntPoint, bool blocking ) {
void KMountMan::unmount( TQString mntPoint, bool blocking ) {
if (blocking)
waiting = true; // prepare to block
KIO::SimpleJob *job = KIO::unmount(mntPoint, false);
TDEIO::SimpleJob *job = TDEIO::unmount(mntPoint, false);
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) {
tqApp->processEvents();
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
// 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;
TQString s;
// Tera-byte

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

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

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

@ -58,7 +58,7 @@ class KrBriefView: public KIconView, public KrView {
Q_OBJECT
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 inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstItem() ); }
virtual inline KrViewItem *getLast() { return dynamic_cast<KrViewItem*>( lastItem() ); }
@ -81,7 +81,7 @@ public:
virtual void prepareForPassive();
virtual void saveSettings() {}
virtual void restoreSettings() {}
virtual TQString nameInKConfig() {return _nameInKConfig;}
virtual TQString nameInTDEConfig() {return _nameInTDEConfig;}
virtual void resizeEvent ( TQResizeEvent * );
signals:

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

@ -144,7 +144,7 @@ void KrCalcSpaceDialog::showResult(){
if (!m_thread) return;
TQString msg;
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)
msg += " (" + KRpermHandler::parseSize( m_thread->getTotalSize() ) + "bytes)";
msg += "\n";

@ -58,7 +58,7 @@ class KrCalcSpaceDialog : public KDialogBase{
needed. Creator must call finished(), if the thread is no longer needed.
*/
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_totalDirs;
const TQStringList m_items;
@ -70,7 +70,7 @@ class KrCalcSpaceDialog : public KDialogBase{
bool m_stop;
void cleanUp(); // Deletes this, if possible
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 getTotalDirs() const {return m_totalDirs;} // the result
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)
void calculationFinished(); // called if the calulation is done
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:
void timer(); // poll timer was fired
void slotCancel(); // cancel was pressed
@ -95,7 +95,7 @@ public:
// autoclose: wait 3 sec. before showing the dialog. Close it, when done
KrCalcSpaceDialog(TQWidget *parent, ListPanel * panel, const TQStringList & items, bool autoclose);
~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 getTotalDirs() const {return m_thread->getTotalDirs();} // the result
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>
//////////////////////////////////////////////////////////////////////////
// The following is KrDetailedView's settings in KConfig:
// The following is KrDetailedView's settings in TDEConfig:
// Group name: KrDetailedView
//
// Ext Column
@ -87,11 +87,11 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
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 ),
pressedItem( 0 ) {
setWidget( this );
_nameInKConfig=TQString( "KrDetailedView" ) + TQString( ( left ? "Left" : "Right" ) ) ;
_nameInTDEConfig=TQString( "KrDetailedView" ) + TQString( ( left ? "Left" : "Right" ) ) ;
krConfig->setGroup("Private");
if (krConfig->readBoolEntry("Enable Input Method", true))
setInputMethodEnabled(true);
@ -112,8 +112,8 @@ void KrDetailedView::setup() {
}
/////////////////////////////// listview ////////////////////////////////////
{ // use the {} so that KConfigGroupSaver will work correctly!
KConfigGroupSaver grpSvr( _config, "Look&Feel" );
{ // use the {} so that TDEConfigGroupSaver will work correctly!
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
setFont( _config->readFontEntry( "Filelist Font", _FilelistFont ) );
// decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
@ -139,7 +139,7 @@ void KrDetailedView::setup() {
}
// add whatever columns are needed to the listview
krConfig->setGroup( nameInKConfig() );
krConfig->setGroup( nameInTDEConfig() );
newColumn( KrDetailedViewProperties::Name ); // we always have a name
setColumnWidthMode( COLUMN(Name), TQListView::Manual );
@ -431,7 +431,7 @@ void KrDetailedView::slotClicked( TQListViewItem *item ) {
if ( !modifierPressed ) {
if ( singleClicked && !renameTimer.isActive() ) {
KConfig * config = TDEGlobal::config();
TDEConfig * config = TDEGlobal::config();
config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
@ -470,7 +470,7 @@ void KrDetailedView::prepareForPassive() {
CANCEL_TWO_CLICK_RENAME;
if ( renameLineEdit() ->isVisible() )
renameLineEdit() ->clearFocus();
KConfigGroupSaver grpSvr( _config, "Look&Feel" );
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) {
if ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) {
@ -627,7 +627,7 @@ void KrDetailedView::contentsMousePressEvent( TQMouseEvent * e ) {
}
// 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 ( MAIN_VIEW ) {
if ( ACTIVE_PANEL ) {
@ -862,7 +862,7 @@ void KrDetailedView::imStartEvent(TQIMEvent* e)
ACTIVE_PANEL->quickSearch->myIMStartEvent( e );
return ;
}else {
KConfigGroupSaver grpSvr( _config, "Look&Feel" );
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) )
KListView::imStartEvent( e );
else {
@ -1092,7 +1092,7 @@ void KrDetailedView::keyPressEvent( TQKeyEvent * e ) {
// there's a folder we can't enter (permissions). in that case, the returned
// size will not be correct.
//
KIO::filesize_t totalSize = 0;
TDEIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0, totalDirs = 0;
TQStringList items;
items.push_back( viewItem->name() );
@ -1135,7 +1135,7 @@ mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
//if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) {
// 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 ) )
KListView::keyPressEvent( e );
else {
@ -1212,7 +1212,7 @@ void KrDetailedView::renameCurrentItem() {
if ( c >= 0 ) {
rename( static_cast<TQListViewItem*>( it ), c );
// 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 (it->hasExtension() && !it->VF->vfile_isDir() )
renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
@ -1272,7 +1272,7 @@ void KrDetailedView::quickSearch( const TQString & str, int direction ) {
KrViewItem * item = getCurrentKrViewItem();
if (!item)
return;
KConfigGroupSaver grpSvr( _config, "Look&Feel" );
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch );
if ( !direction ) {
if ( caseSensitive ? item->name().startsWith( str ) : item->name().lower().startsWith( str.lower() ) )
@ -1396,7 +1396,7 @@ void KrDetailedView::initOperator() {
void KrDetailedView::initProperties() {
_properties = new KrDetailedViewProperties;
KConfigGroupSaver grpSvr( _config, "Look&Feel" );
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" );
for (int i=0; i<KrDetailedViewProperties::MAX_COLUMNS;++i)
PROPS->column[i]=-1;
PROPS->displayIcons = _config->readBoolEntry( "With Icons", _WithIcons );
@ -1473,7 +1473,7 @@ void KrDetailedView::selectColumns()
int result=popup.exec(TQCursor::pos());
krConfig->setGroup( nameInKConfig() );
krConfig->setGroup( nameInTDEConfig() );
switch( result - COLUMN_POPUP_IDS )
{

@ -75,7 +75,7 @@ class KrDetailedView : public KListView, public KrView {
friend class KrDetailedViewItem;
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 int column( KrDetailedViewProperties::ColumnType type );
virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstChild() ); }
@ -96,8 +96,8 @@ public:
virtual void setSortMode( KrViewProperties::SortSpec mode );
virtual void prepareForActive();
virtual void prepareForPassive();
virtual inline void saveSettings() { KListView::saveLayout( _config, nameInKConfig() ); }
virtual inline void restoreSettings() { KListView::restoreLayout( _config, nameInKConfig() ); }
virtual inline void saveSettings() { KListView::saveLayout( _config, nameInTDEConfig() ); }
virtual inline void restoreSettings() { KListView::restoreLayout( _config, nameInTDEConfig() ); }
signals:
void middleButtonClicked( KrViewItem *item );

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

@ -137,7 +137,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *parent) : KPopupMenu(par
insertItem( i18n( "Rename" ), RENAME_ID );
// -------- MOVE TO TRASH
KConfigGroupSaver saver(krConfig, "General");
TDEConfigGroupSaver saver(krConfig, "General");
bool trash = krConfig->readBoolEntry( "Move To Trash", _MoveToTrash );
if( trash )
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() );
TDEProcess proc;
{
KConfigGroupSaver saver(krConfig, "General");
TDEConfigGroupSaver saver(krConfig, "General");
TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term );
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("Preview not available"),0);
KIO::PreviewJob* pjob;
TQStringList plugins = KIO::PreviewJob::availablePlugins();
TDEIO::PreviewJob* pjob;
TQStringList plugins = TDEIO::PreviewJob::availablePlugins();
for( unsigned int i=0; i< urls->count(); ++i){
KFileItem* kfi = new KFileItem(KFileItem::Unknown,KFileItem::Unknown,*(urls->at(i)));
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&)),
this,TQT_SLOT(addPreview(const KFileItem*,const TQPixmap&)));
}

@ -66,8 +66,8 @@ void KrViewOperator::startDrag() {
// ----------------------------- krview
KrView::KrView( KConfig *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()) {
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 ), _nameInTDEConfig(TQString()) {
}
KrView::~KrView() {
@ -79,8 +79,8 @@ KrView::~KrView() {
void KrView::init() {
// sanity checks:
if (_nameInKConfig.isEmpty())
tqFatal("_nameInKConfig must be set during construction of KrView inheritors");
if (_nameInTDEConfig.isEmpty())
tqFatal("_nameInTDEConfig must be set during construction of KrView inheritors");
if (!_widget)
tqFatal("_widget must be set during construction of KrView inheritors");
// ok, continue
@ -163,9 +163,9 @@ TQString KrView::statistics() {
_countSize += it->getVfile()->vfile_getSize();
}
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( KIO::convertSize( _countSize ) ).arg( KRpermHandler::parseSize(_countSize) );
.arg( TDEIO::convertSize( _countSize ) ).arg( KRpermHandler::parseSize(_countSize) );
// notify if we're running a filtered view
if (filter() != KrViewProperties::All)
tmp = ">> [ " + filterMask().nameFilter() + " ] "+tmp;
@ -173,7 +173,7 @@ TQString KrView::statistics() {
}
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;
KrViewItem *temp = getCurrentKrViewItem();
@ -205,7 +205,7 @@ void KrView::changeSelection( const KRQuery& filter, bool select, bool includeDi
}
void KrView::invertSelection() {
KConfigGroupSaver grpSvr( _config, "Look&Feel" /*nameInKConfig()*/ );
TDEConfigGroupSaver grpSvr( _config, "Look&Feel" /*nameInTDEConfig()*/ );
bool markDirs = _config->readBoolEntry( "Mark Dirs", _MarkDirs );
KrViewItem *temp = getCurrentKrViewItem();

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

@ -49,7 +49,7 @@ TQString KrViewItem::description() const {
TQString text = _vf->vfile_getName();
TQString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false);
TQString myLinkDest = _vf->vfile_getSymDest();
KIO::filesize_t mySize = _vf->vfile_getSize();
TDEIO::filesize_t mySize = _vf->vfile_getSize();
TQString text2 = text.copy();
mode_t m_fileMode = _vf->vfile_getMode();
@ -66,7 +66,7 @@ TQString KrViewItem::description() const {
text += tmp;
} else if ( S_ISREG( m_fileMode ) ){
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 += comment;
} else if ( S_ISDIR ( m_fileMode ) ){

@ -62,7 +62,7 @@ public:
protected:
// 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
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) ]" )
.arg( KIO::convertSizeFromKB( kBAvail ) )
.arg( KIO::convertSizeFromKB( kBSize ) ).arg( perc )
.arg( TDEIO::convertSizeFromKB( kBAvail ) )
.arg( TDEIO::convertSizeFromKB( kBSize ) ).arg( perc )
.arg( mountPoint ).arg( fstype );
status->setText( stats );
}
@ -838,7 +838,7 @@ void ListPanel::handleDropOnView( TQDropEvent *e, TQWidget *widget ) {
break;
}
KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy;
TDEIO::CopyJob::CopyMode mode = TDEIO::CopyJob::Copy;
// the KURL::List is finished, let's go
// --> display the COPY/MOVE/LINK menu
@ -854,13 +854,13 @@ void ListPanel::handleDropOnView( TQDropEvent *e, TQWidget *widget ) {
int result = popup.exec( tmp );
switch ( result ) {
case 1 :
mode = KIO::CopyJob::Copy;
mode = TDEIO::CopyJob::Copy;
break;
case 2 :
mode = KIO::CopyJob::Move;
mode = TDEIO::CopyJob::Move;
break;
case 3 :
mode = KIO::CopyJob::Link;
mode = TDEIO::CopyJob::Link;
break;
case - 1 : // user pressed outside the menu
case 4:
@ -1038,7 +1038,7 @@ void ListPanel::panelInactive() {
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
//static_cast<KrDetailedView*>(view)->setEnabled(false);
status->setEnabled(false);
@ -1054,14 +1054,14 @@ void ListPanel::slotJobStarted(KIO::Job* job) {
syncBrowseButton->setEnabled(false);
// connect to the job interface to provide in-panel refresh notification
connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
TQT_SLOT( inlineRefreshInfoMessage( KIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
TQT_SLOT( inlineRefreshPercent( KIO::Job*, unsigned long ) ) );
connect(job,TQT_SIGNAL(result(KIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(KIO::Job*)));
connect(job,TQT_SIGNAL(canceled(KIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(KIO::Job*)));
connect( job, TQT_SIGNAL( infoMessage( TDEIO::Job*, const TQString & ) ),
TQT_SLOT( inlineRefreshInfoMessage( TDEIO::Job*, const TQString & ) ) );
connect( job, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
TQT_SLOT( inlineRefreshPercent( TDEIO::Job*, unsigned long ) ) );
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(TDEIO::Job*)));
connect(job,TQT_SIGNAL(canceled(TDEIO::Job*)),
this,TQT_SLOT(inlineRefreshListResult(TDEIO::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);
totals->setText(msg);
}
void ListPanel::inlineRefreshInfoMessage( KIO::Job*, const TQString &msg ) {
void ListPanel::inlineRefreshInfoMessage( TDEIO::Job*, const TQString &msg ) {
totals->setText(">> " + i18n("Reading: ") + msg);
}
void ListPanel::inlineRefreshListResult(KIO::Job*) {
void ListPanel::inlineRefreshListResult(TDEIO::Job*) {
inlineRefreshJob = 0;
// reenable everything
//static_cast<KrDetailedView*>(view)->setEnabled(true);

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

@ -167,8 +167,8 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
return;
}
}
connect( files(), TQT_SIGNAL(startJob(KIO::Job* )),
panel, TQT_SLOT(slotJobStarted(KIO::Job* )));
connect( files(), TQT_SIGNAL(startJob(TDEIO::Job* )),
panel, TQT_SLOT(slotJobStarted(TDEIO::Job* )));
if ( vfsP->vfs_refresh( u ) ) {
break; // we have a valid refreshed URL now
}
@ -448,23 +448,23 @@ void ListPanelFunc::moveFiles() {
if( !virtualBaseURL.isEmpty() ) {
// keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Move, false, true );
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, TDEIO::CopyJob::Move, false, true );
connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
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 :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
// you can rename only *one* file not a batch,
// so a batch dest must alwayes be a directory
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 );
// 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
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
//check if copy is supported
@ -473,7 +473,7 @@ void ListPanelFunc::moveFiles() {
return ;
}
// 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() ) {
// keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Copy, false, true );
connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, TDEIO::CopyJob::Copy, false, true );
connect( vjob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( refresh() ) );
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 :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
// you can rename only *one* file not a batch,
// so a batch dest must alwayes be a directory
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 );
if ( dest.equals( panel->virtualPath(), true ) ||
dest.upURL().equals( panel->virtualPath(), true ) )
// 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
} else {
//check if copy is supported
@ -620,7 +620,7 @@ void ListPanelFunc::copyFiles() {
return ;
}
// 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:
files() ->vfs_getFiles( &fileNames );
KIO::filesize_t totalSize = 0;
TDEIO::filesize_t totalSize = 0;
unsigned long totalDirs = 0, totalFiles = 0;
if( !calcSpace( fileNames, totalSize, totalFiles, totalDirs ) )
return;
@ -836,7 +836,7 @@ void ListPanelFunc::pack() {
tempDir->setAutoDelete( true );
arcDir = tempDir->name();
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;
}
@ -853,7 +853,7 @@ void ListPanelFunc::pack() {
// copy from the temp file to it's right place
if ( tempDestFile ) {
KIO::NetAccess::file_move( vfs::fromPathOrURL( arcFile ), destURL );
TDEIO::NetAccess::file_move( vfs::fromPathOrURL( arcFile ), destURL );
delete tempDestFile;
}
@ -874,7 +874,7 @@ void ListPanelFunc::testArchive() {
// download the file if it's on a remote filesystem
if ( !arcURL.isLocalFile() ) {
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() );
return ;
}
@ -935,7 +935,7 @@ void ListPanelFunc::unpack() {
TQString url = TQString();
if ( !arcURL.isLocalFile() ) {
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() );
continue;
}
@ -982,7 +982,7 @@ void ListPanelFunc::unpack() {
if ( nameList[ i ] != "." && nameList[ i ] != ".." )
urlList.append( vfs::fromPathOrURL( dest.path( 1 ) + nameList[ i ] ) );
if ( urlList.count() > 0 )
KIO::NetAccess::dircopy( urlList, originalDestURL, 0 );
TDEIO::NetAccess::dircopy( urlList, originalDestURL, 0 );
delete tempDir;
}
}
@ -1044,7 +1044,7 @@ void ListPanelFunc::calcSpace() {
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 );
calc.exec();
totalSize = calc.getTotalSize();
@ -1178,7 +1178,7 @@ void ListPanelFunc::pasteFromClipboard() {
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 );
}
}

@ -85,7 +85,7 @@ public:
// 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
// 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 newFTPconnection();
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() );
int result = popup.exec( TQCursor::pos() );
KIO::CopyJob *job;
TDEIO::CopyJob *job;
switch ( result ) {
case 1 :
job = KIO::copy(lst, dest, true);
job = TDEIO::copy(lst, dest, true);
break;
case 2 :
job = KIO::move(lst, dest, true);
job = TDEIO::move(lst, dest, true);
break;
case 3 :
job = KIO::link(lst, dest, true);
job = TDEIO::link(lst, dest, true);
break;
case - 1 : // user pressed outside the menu
case 4:

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

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

@ -6,7 +6,7 @@
#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
* in krusader relatively unchaged, and allow to create the job as usual and choose if
* to start it, or queue it.
@ -21,13 +21,13 @@ public:
virtual ~Queue();
inline const TQString& name() const { return _name; }
void enqueue(KIO::Job *job);
void enqueue(TDEIO::Job *job);
protected:
void dumpQueue();
TQString _name;
TQPtrList<KIO::Job> _jobs;
TQPtrList<TDEIO::Job> _jobs;
};
#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
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));
@ -405,8 +405,8 @@ void KrSearchDialog::startSearch() {
searcher = new KRSearchMod(query);
connect(searcher, TQT_SIGNAL(searching(const TQString&)),
searchingLabel, TQT_SLOT(setText(const TQString&)));
connect(searcher, TQT_SIGNAL(found(TQString,TQString,KIO::filesize_t,time_t,TQString,TQString)),
this, TQT_SLOT(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,TDEIO::filesize_t,time_t,TQString,TQString)));
connect(searcher, TQT_SIGNAL(finished()), this, TQT_SLOT(stopSearch()));
isSearching = true;
@ -595,7 +595,7 @@ void KrSearchDialog::feedToListBox()
}
KURL url = KURL::fromPathOrURL( TQString("virt:/") + queryName );
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_MNG->slotNewTab(url.prettyURL());
closeDialog();

@ -67,7 +67,7 @@ public slots:
void stopSearch();
void feedToListBox();
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 resultDoubleClicked(TQListViewItem*);
void resultClicked(TQListViewItem*);
@ -129,7 +129,7 @@ private:
class ResultListViewItem : public TQListViewItem
{
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,
KRpermHandler::parseSize(size),
TDEGlobal::locale()->formatDateTime( date ), perm )
@ -146,7 +146,7 @@ public:
{
if( col == 2 ) {
ResultListViewItem *other = (ResultListViewItem *)i;
KIO::filesize_t otherSize = other->getSize();
TDEIO::filesize_t otherSize = other->getSize();
if( fileSize == otherSize )
return 0;
@ -167,7 +167,7 @@ public:
return TQListViewItem::compare( i, col, ascending );
}
KIO::filesize_t getSize() {
TDEIO::filesize_t getSize() {
return fileSize;
}
@ -176,7 +176,7 @@ public:
}
private:
KIO::filesize_t fileSize;
TDEIO::filesize_t fileSize;
TQDateTime fileDate;
TQString _foundText;
};

@ -149,7 +149,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name();
// 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,
mime, "", stat_p.st_mode);
vf->vfile_setUrl( url );
@ -187,7 +187,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
{
// if we got here - we got a winner
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;

@ -65,7 +65,7 @@ private:
signals:
void finished();
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:
void slotProcessEvents( bool & stopped );

@ -85,23 +85,23 @@ void Combiner::combine()
{
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 &)),
this, TQT_SLOT(combineSplitFileDataReceived(KIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(combineSplitFileFinished(KIO::Job *)));
connect(combineReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(combineSplitFileDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineSplitFileFinished(TDEIO::Job *)));
}
exec();
}
void Combiner::combineSplitFileDataReceived(KIO::Job *, const TQByteArray &byteArray)
void Combiner::combineSplitFileDataReceived(TDEIO::Job *, const TQByteArray &byteArray)
{
splitFile += TQString( byteArray );
}
void Combiner::combineSplitFileFinished(KIO::Job *job)
void Combiner::combineSplitFileFinished(TDEIO::Job *job)
{
combineReadJob = 0;
TQString error;
@ -195,19 +195,19 @@ void Combiner::openNextFile()
}
/* 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 &)),
this, TQT_SLOT(combineDataReceived(KIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(combineReceiveFinished(KIO::Job *)));
connect(combineReadJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
this, TQT_SLOT(combineDataReceived(TDEIO::Job *, const TQByteArray &)));
connect(combineReadJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineReceiveFinished(TDEIO::Job *)));
if( hasValidSplitFile )
connect(combineReadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)),
this, TQT_SLOT(combineWritePercent(KIO::Job *, unsigned long)));
connect(combineReadJob, TQT_SIGNAL(percent (TDEIO::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 )
return;
@ -226,12 +226,12 @@ void Combiner::combineDataReceived(KIO::Job *, const TQByteArray &byteArray)
else if( unixNaming )
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 &)),
this, TQT_SLOT(combineDataSend(KIO::Job *, TQByteArray &)));
connect(combineWriteJob, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(combineSendFinished(KIO::Job *)));
connect(combineWriteJob, TQT_SIGNAL(dataReq(TDEIO::Job *, TQByteArray &)),
this, TQT_SLOT(combineDataSend(TDEIO::Job *, TQByteArray &)));
connect(combineWriteJob, TQT_SIGNAL(result(TDEIO::Job*)),
this, TQT_SLOT(combineSendFinished(TDEIO::Job *)));
}
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 */
@ -274,7 +274,7 @@ void Combiner::combineReceiveFinished(KIO::Job *job)
openNextFile();
}
void Combiner::combineDataSend(KIO::Job *, TQByteArray &byteArray)
void Combiner::combineDataSend(TDEIO::Job *, TQByteArray &byteArray)
{
byteArray = transferArray;
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 */
@ -319,7 +319,7 @@ void Combiner::combineAbortJobs()
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 );
setProgress( percent );

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

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

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

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

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

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

@ -46,7 +46,7 @@ class SynchronizeDialog : TQDialog
public:
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();
inline bool wasSyncronizationStarted() { return syncStarted; }
@ -54,7 +54,7 @@ class SynchronizeDialog : TQDialog
public slots:
void startSynchronization();
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 pauseAccepted();
@ -77,11 +77,11 @@ class SynchronizeDialog : TQDialog
Synchronizer *synchronizer;
int leftCopyNr;
KIO::filesize_t leftCopySize;
TDEIO::filesize_t leftCopySize;
int rightCopyNr;
KIO::filesize_t rightCopySize;
TDEIO::filesize_t rightCopySize;
int deleteNr;
KIO::filesize_t deleteSize;
TDEIO::filesize_t deleteSize;
int parallelThreads;

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

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

@ -153,11 +153,11 @@ bool SynchronizerDirList::load( const TQString &urlIn, bool wait ) {
emit finished( result = true );
return true;
} else {
KIO::Job *job = KIO::listDir( url, false, true );
connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
this, TQT_SLOT( slotListResult( KIO::Job* ) ) );
TDEIO::Job *job = TDEIO::listDir( url, false, true );
connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
this, TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
this, TQT_SLOT( slotListResult( TDEIO::Job* ) ) );
busy = true;
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();
KIO::UDSEntryListConstIterator end = entries.end();
TDEIO::UDSEntryListConstIterator it = entries.begin();
TDEIO::UDSEntryListConstIterator end = entries.end();
int rwx = -1;
TQString prot = (( KIO::ListJob *)job )->url().protocol();
TQString prot = (( TDEIO::ListJob *)job )->url().protocol();
if( prot == "krarc" || prot == "tar" || prot == "zip" )
rwx = PERM_ALL;
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();
if( key != "." && key != ".." && (!ignoreHidden || !key.startsWith(".") ) ) {
mode_t mode = kfi.mode() | kfi.permissions();
@ -190,7 +190,7 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
if ( kfi.isDir() )
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.mimetype(), kfi.linkDest(), mode, rwx
#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;
if ( job && job->error() ) {
job->showErrorDialog( parentWidget );

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

@ -71,8 +71,8 @@ class SynchronizerFileItem
bool m_marked; // flag, indicates to show the file
bool m_existsLeft; // flag, the file exists in the left directory
bool m_existsRight; // flag, the file exists in the right directory
KIO::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_leftSize; // the file size at the left 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_rightDate; // the file date at the left directory
TQString m_leftLink; // the left file's symbolic link destination
@ -96,8 +96,8 @@ class SynchronizerFileItem
public:
SynchronizerFileItem(const TQString &leftNam, const TQString &rightNam, const TQString &leftDir,
const TQString &rightDir, bool mark, bool exL, bool exR, KIO::filesize_t leftSize,
KIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
const TQString &rightDir, bool mark, bool exL, bool exR, TDEIO::filesize_t leftSize,
TDEIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
const TQString &leftLink, const TQString &rightLink, const TQString &leftOwner,
const TQString &rightOwner, const TQString &leftGroup, const TQString &rightGroup,
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 existsInRight() {return m_existsRight;}
inline bool overWrite() {return m_overWrite;}
inline KIO::filesize_t leftSize() {return m_leftSize;}
inline KIO::filesize_t rightSize() {return m_rightSize;}
inline TDEIO::filesize_t leftSize() {return m_leftSize;}
inline TDEIO::filesize_t rightSize() {return m_rightSize;}
inline time_t leftDate() {return m_leftDate;}
inline time_t rightDate() {return m_rightDate;}
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 );
SWAP( m_leftName, m_rightName, 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_leftLink, m_rightLink, TQString );
SWAP( m_leftOwner, m_rightOwner, TQString );

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

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

@ -132,12 +132,12 @@ class CompareContentTask : public SynchronizerTask {
public:
CompareContentTask( Synchronizer *, SynchronizerFileItem *, const KURL &, const KURL &, KIO::filesize_t );
CompareContentTask( Synchronizer *, SynchronizerFileItem *, const KURL &, const KURL &, TDEIO::filesize_t );
virtual ~CompareContentTask();
public slots:
void slotDataReceived(KIO::Job *job, const TQByteArray &data);
void slotFinished(KIO::Job *job);
void slotDataReceived(TDEIO::Job *job, const TQByteArray &data);
void slotFinished(TDEIO::Job *job);
void sendStatusMessage();
protected:
@ -151,11 +151,11 @@ private:
KURL leftURL; // the currently processed URL (left)
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
KIO::TransferJob *leftReadJob; // compare left read job
KIO::TransferJob *rightReadJob; // compare right read job
TDEIO::TransferJob *leftReadJob; // compare left read job
TDEIO::TransferJob *rightReadJob; // compare right read job
TQByteArray compareArray; // the array for comparing
SynchronizerFileItem *item; // the item for content compare
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 *rightFile; // the right side local file
KIO::filesize_t received; // the received size
TDEIO::filesize_t received; // the received size
Synchronizer *sync;
};

@ -676,7 +676,7 @@ TagString exp_Copy::expFunc( const ListPanel*, const TagStringList& parameter, c
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!
}
@ -707,7 +707,7 @@ TagString exp_Move::expFunc( const ListPanel*, const TagStringList& parameter, c
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!
}

@ -264,7 +264,7 @@ bool arc_vfs::getDirs(){
// 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;
// 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;
dest.setPath(tmpDir+path+dir);
KIO::Job* job = new KIO::CopyJob(*fileUrls,dest,mode,false,true);
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) );
if(mode == KIO::CopyJob::Move) // notify the other panel
connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) );
TDEIO::Job* job = new TDEIO::CopyJob(*fileUrls,dest,mode,false,true);
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
if(mode == TDEIO::CopyJob::Move) // notify the other panel
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
changed = true;
KIO::Job *job = new KIO::CopyJob(*filesUrls,TDEGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
TDEIO::Job *job = new TDEIO::CopyJob(*filesUrls,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
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 {
@ -310,7 +310,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
chdir(tmpDir.local8Bit());
TQStringList files;
KIO::filesize_t totalSizeVal = 0;
TDEIO::filesize_t totalSizeVal = 0;
unsigned long totalFilesVal = 0;
// names -> urls
@ -373,7 +373,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
chdir(tmpDir.local8Bit());
// names -> urls
TQStringList files;
KIO::filesize_t totalSize = 0;
TDEIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0;
for(TQStringList::Iterator name = names->begin(); name != names->end(); ++name ){
processName(*name,&files,&totalSize,&totalFiles);
@ -443,8 +443,8 @@ void arc_vfs::vfs_rename(TQString fileName,TQString newName){
KURL dest;
dest.setPath(tmpDir+path+"/"+newName);
KIO::Job* job = new KIO::CopyJob(temp,dest,KIO::CopyJob::Move,false,false);
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) );
TDEIO::Job* job = new TDEIO::CopyJob(temp,dest,TDEIO::CopyJob::Move,false,false);
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
}
bool arc_vfs::vfs_refresh(TQString origin){
@ -678,7 +678,7 @@ TQString arc_vfs::changeDir(TQString name){
}
// 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;
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);
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){
TQString name;
KIO::filesize_t size = 0;
TDEIO::filesize_t size = 0;
TQString perm;
TQFileInfo qfi(arcFile);
time_t mtime = qfi.lastModified().toTime_t();

@ -48,7 +48,7 @@ public:
~arc_vfs();
// 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)
void vfs_delFiles(TQStringList *fileNames);
// return a path to the file
@ -59,7 +59,7 @@ public:
// rename file
void vfs_rename(TQString fileName,TQString newName);
// 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
TQString vfs_workingDir();
@ -75,7 +75,7 @@ protected:
TQList<arc_dir> dirList;
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
vfileDict* findDir(TQString name);
arc_dir* findArcDir(TQString name);

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

@ -46,7 +46,7 @@ public:
~ftp_vfs();
/// 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)
virtual void vfs_delFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files
@ -62,12 +62,12 @@ public:
public slots:
/// 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
void slotRedirection(KIO::Job *, const KURL &url);
void slotPermanentRedirection(KIO::Job*,const KURL&,const KURL& newUrl);
void slotRedirection(TDEIO::Job *, const KURL &url);
void slotPermanentRedirection(TDEIO::Job*,const KURL&,const KURL& newUrl);
/// 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
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 ) {
TQString sizeStr = extraProps[ "VolumeSize" ];
KIO::filesize_t size = sizeStr.toLongLong();
TDEIO::filesize_t size = sizeStr.toLongLong();
if( size >= 10000 ) {
if( type == "-arj" || type == "-rar" )
@ -545,10 +545,10 @@ TQString KRarcHandler::getPassword( TQString path ) {
bool keep = true;
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 );
passDlg.setPassword( password );
if (passDlg.exec() == KIO::PasswordDialog::Accepted) {
if (passDlg.exec() == TDEIO::PasswordDialog::Accepted) {
password = passDlg.password();
if ( keep ) {
if( !KWallet::Wallet::isOpen( KWallet::Wallet::NetworkWallet() ) && wallet != 0 ) {

@ -279,7 +279,7 @@ bool KRpermHandler::fileExist( TQString path, TQString name ) {
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)
return TDEGlobal::locale()->formatNumber(TQString::number(val), false, 0);
#else

@ -73,7 +73,7 @@ public:
static bool fileExist(TQString Path, TQString name);
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 time_t TQString2time(TQString date);

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

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

@ -142,7 +142,7 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
}
// 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 ) {
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;
dest.setPath(vfs_workingDir()+"/"+dir);
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls,dest,mode,false,true );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh()) );
if(mode == KIO::CopyJob::Move) // notify the other panel
connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) );
TDEIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls,dest,mode,false,true );
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh()) );
if(mode == TDEIO::CopyJob::Move) // notify the other panel
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(TDEIO::Job*)) );
else
job->setAutoErrorHandlingEnabled( true );
}
@ -180,22 +180,22 @@ void normal_vfs::vfs_delFiles(TQStringList *fileNames){
url.setPath( vfs_workingDir()+"/"+filename);
filesUrls.append(url);
}
KIO::Job *job;
TDEIO::Job *job;
// delete of move to trash ?
krConfig->setGroup("General");
if( krConfig->readBoolEntry("Move To Trash",_MoveToTrash) ){
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash(filesUrls, true );
job = TDEIO::trash(filesUrls, true );
#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
connect(job,TQT_SIGNAL(result(KIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon()));
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon()));
}
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
@ -235,8 +235,8 @@ void normal_vfs::vfs_rename(const TQString& fileName,const TQString& newName){
fileUrls.append(url);
dest.setPath(vfs_workingDir()+"/"+newName);
KIO::Job *job = new KIO::CopyJob(fileUrls,dest,KIO::CopyJob::Move,true,false );
connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
TDEIO::Job *job = new TDEIO::CopyJob(fileUrls,dest,TDEIO::CopyJob::Move,true,false );
connect(job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(vfs_refresh(TDEIO::Job*)));
}
vfile* normal_vfs::vfileFromName(const TQString& name){
@ -245,7 +245,7 @@ vfile* normal_vfs::vfileFromName(const TQString& name){
KDE_struct_stat 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);
bool symLink= S_ISLNK(stat_p.st_mode);
if( S_ISDIR(stat_p.st_mode) ) perm[0] = 'd';

@ -53,7 +53,7 @@ public:
~normal_vfs(){if( watcher ) delete watcher;}
/// 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)
virtual void vfs_delFiles(TQStringList *fileNames);
/// 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,
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() )
{
connect( this, TQT_SIGNAL( aboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ),
this, TQT_SLOT( slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ) );
connect( this, TQT_SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ),
this, TQT_SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ) );
connect( this, TQT_SIGNAL( result( KIO::Job * ) ),
connect( this, TQT_SIGNAL( aboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &) ),
this, TQT_SLOT( slotAboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &) ) );
connect( this, TQT_SIGNAL( copyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool) ),
this, TQT_SLOT( slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool) ) );
connect( this, TQT_SIGNAL( result( TDEIO::Job * ) ),
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() ) {
KDE_struct_stat stat_p;
@ -155,16 +155,16 @@ void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const TQValueList<
void PreservingCopyJob::slotResult( Job *job ) {
if( !job->error() ) {
if( job->inherits( "KIO::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 */
if( job->inherits( "TDEIO::StatJob" ) ) { /* Unfortunately KIO forgets to set times when the file is in the */
KURL url = ((TDEIO::SimpleJob *)job)->url(); /* base directory. That's why we capture every StatJob and set the */
/* time manually. */
KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
TDEIO::UDSEntry entry = static_cast<TDEIO::StatJob*>(job)->statResult();
KFileItem kfi(entry, url );
#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
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
}
}
@ -172,49 +172,49 @@ void PreservingCopyJob::slotResult( Job *job ) {
CopyJob::slotResult( job );
for( unsigned j=0; j != subjobs.count(); j++ ) {
if( subjobs.at( j )->inherits( "KIO::ListJob" ) ) {
disconnect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
connect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
if( subjobs.at( j )->inherits( "TDEIO::ListJob" ) ) {
disconnect( subjobs.at( j ), TQT_SIGNAL( entries (TDEIO::Job *, const TDEIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (TDEIO::Job *, const TDEIO::UDSEntryList &) ) );
connect( subjobs.at( j ), TQT_SIGNAL( entries (TDEIO::Job *, const TDEIO::UDSEntryList &) ),
this, TQT_SLOT( slotListEntries (TDEIO::Job *, const TDEIO::UDSEntryList &) ) );
}
}
}
void PreservingCopyJob::slotListEntries(KIO::Job *job, const KIO::UDSEntryList &list) {
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
void PreservingCopyJob::slotListEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list) {
TDEIO::UDSEntryListConstIterator it = list.begin();
TDEIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) {
KURL url = ((KIO::SimpleJob *)job)->url();
KURL url = ((TDEIO::SimpleJob *)job)->url();
TQString relName, user, group;
time_t mtime = (time_t)-1;
mode_t mode = 0755;
TQString acl;
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
TDEIO::UDSEntry::ConstIterator it2 = (*it).begin();
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
case KIO::UDS_NAME:
case TDEIO::UDS_NAME:
if( relName.isEmpty() )
relName = (*it2).m_str;
break;
case KIO::UDS_URL:
case TDEIO::UDS_URL:
relName = KURL((*it2).m_str).fileName();
break;
case KIO::UDS_MODIFICATION_TIME:
case TDEIO::UDS_MODIFICATION_TIME:
mtime = (time_t)((*it2).m_long);
break;
case KIO::UDS_USER:
case TDEIO::UDS_USER:
user = (*it2).m_str;
break;
case KIO::UDS_GROUP:
case TDEIO::UDS_GROUP:
group = (*it2).m_str;
break;
case KIO::UDS_ACCESS:
case TDEIO::UDS_ACCESS:
mode = (*it2).m_long;
break;
#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;
break;
#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
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() )
pmode = PM_NONE;
if( mode == KIO::CopyJob::Link )
if( mode == TDEIO::CopyJob::Link )
pmode = PM_NONE;
switch( pmode )
@ -308,11 +308,11 @@ KIO::CopyJob * PreservingCopyJob::createCopyJob( PreserveMode pmode, const KURL:
if( preserve )
return new PreservingCopyJob( src, dest, mode, asMethod, showProgressInfo );
else
return new KIO::CopyJob( src, dest, mode, asMethod, showProgressInfo );
return new TDEIO::CopyJob( src, dest, mode, asMethod, showProgressInfo );
}
case PM_NONE:
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;
};
class PreservingCopyJob : public KIO::CopyJob
class PreservingCopyJob : public TDEIO::CopyJob
{
Q_OBJECT
@ -66,18 +66,18 @@ public:
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:
void slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &);
void slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool);
void slotAboutToCreate (TDEIO::Job *, const TQValueList< TDEIO::CopyInfo > &);
void slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool);
void slotFinished();
virtual void slotResult( Job *job );
void slotListEntries(KIO::Job *job, const KIO::UDSEntryList &list);
void slotListEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list);
private:
TQMap<KURL, Attributes> fileAttributes;
TQMap<KIO::Job *, KURL> pendingJobs;
TQMap<TDEIO::Job *, KURL> pendingJobs;
TQValueList<KURL> directoriesToStamp;
TQValueList<KURL> originalDirectories;
};

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

@ -58,7 +58,7 @@ public:
* file name, file size, file permissions,is the file a link,owner uid & group uid.
*/
vfile(const TQString& name,
const KIO::filesize_t size,
const TDEIO::filesize_t size,
const TQString& perm,
const time_t mtime,
const bool symLink,
@ -70,7 +70,7 @@ public:
const int rwx = -1 );
vfile(const TQString& name,
const KIO::filesize_t size,
const TDEIO::filesize_t size,
const TQString& perm,
const time_t mtime,
const bool symLink,
@ -90,7 +90,7 @@ public:
// following functions give-out file details
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 bool vfile_isDir() const { return vfile_isdir; }
inline bool vfile_isSymLink() const { return vfile_symLink; }
@ -106,7 +106,7 @@ public:
const TQString& vfile_getGroup();
const TQString& vfile_getACL();
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_isWriteable() const;
char vfile_isExecutable() const;
@ -115,7 +115,7 @@ public:
* used ONLY when calculating a directory's space, needs to change the
* 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_setIcon(const TQString& icn) {vfile_icon = icn; }
@ -129,7 +129,7 @@ private:
protected:
// the file information list
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
uid_t vfile_ownerId; //< file owner id
gid_t vfile_groupId; //< file group id

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

@ -64,7 +64,7 @@ public:
virtual ~vfs();
/// 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)
virtual void vfs_delFiles(TQStringList *fileNames)=0;
/// Return a list of URLs for multiple files
@ -76,9 +76,9 @@ public:
/// Rename file
virtual void vfs_rename(const TQString& fileName,const TQString& newName)=0;
/// 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).
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
virtual TQString vfs_workingDir()=0;
@ -89,7 +89,7 @@ public:
/// Return an empty vfile* list if not found
TQValueList<vfile*> vfs_search(const KRQuery& filter);
/// 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
inline unsigned long vfs_noOfFiles() { return vfs_filesP->count(); }
/// Returns the VFS url.
@ -120,7 +120,7 @@ public slots:
bool vfs_refresh(const KURL& origin);
/// Used to refresh the VFS when a job finishs. it calls the refresh() slot
/// or display a error message if the job fails
bool vfs_refresh(KIO::Job* job);
bool vfs_refresh(TDEIO::Job* job);
bool vfs_refresh();
void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; }
void vfs_enableRefresh(bool enable);
@ -128,7 +128,7 @@ public slots:
signals:
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 addedVfile(vfile* vf);
void deletedVfile(const TQString& name);
@ -151,7 +151,7 @@ protected:
inline void removeFromList(TQString name){ vfs_filesP->remove(name); }
/// 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.
KURL vfs_origin; //< the path or file the VFS originates from.
@ -165,8 +165,8 @@ protected:
protected slots:
/// The slot for the KDirSize job
void slotKdsResult(KIO::Job *job);
void slotStatResultArrived(KIO::Job *job);
void slotKdsResult(TDEIO::Job *job);
void slotStatResultArrived(TDEIO::Job *job);
private:
vfileDict* vfs_filesP; //< Point to a lists of virtual files (vfile).
@ -178,8 +178,8 @@ private:
bool stat_busy;
bool deletePossible;
bool deleteRequested;
KIO::UDSEntry entry;
KIO::filesize_t* kds_totalSize;
TDEIO::UDSEntry entry;
TDEIO::filesize_t* kds_totalSize;
unsigned long* kds_totalFiles;
unsigned long* kds_totalDirs;
};

@ -34,7 +34,7 @@
#define VIRT_VFS_DB "virt_vfs.db"
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 ) {
// set the writable attribute
@ -81,7 +81,7 @@ bool virt_vfs::populateVfsList( const KURL& origin, bool /*showHidden*/ ) {
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 ( !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" ) );
@ -116,22 +116,22 @@ void virt_vfs::vfs_delFiles( TQStringList *fileNames ) {
TQString filename = ( *fileNames ) [ i ];
filesUrls.append( vfs_getFile( filename ) );
}
KIO::Job *job;
TDEIO::Job *job;
// delete of move to trash ?
krConfig->setGroup( "General" );
if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) ) {
#if KDE_IS_VERSION(3,4,0)
job = KIO::trash( filesUrls, true );
job = TDEIO::trash( filesUrls, true );
#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
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) );
connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) );
} else
job = new KIO::DeleteJob( filesUrls, false, true );
job = new TDEIO::DeleteJob( filesUrls, false, true );
// 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 ) {
@ -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
virtVfsDict[ path ] ->append( dest );
KIO::Job *job = new KIO::CopyJob( fileUrls, dest, KIO::CopyJob::Move, true, false );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
TDEIO::Job *job = new TDEIO::CopyJob( fileUrls, dest, TDEIO::CopyJob::Move, true, false );
connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( vfs_refresh( TDEIO::Job* ) ) );
}
void virt_vfs::slotStatResult( KIO::Job* job ) {
if( !job || job->error() ) entry = KIO::UDSEntry();
else entry = static_cast<KIO::StatJob*>(job)->statResult();
void virt_vfs::slotStatResult( TDEIO::Job* job ) {
if( !job || job->error() ) entry = TDEIO::UDSEntry();
else entry = static_cast<TDEIO::StatJob*>(job)->statResult();
busy = false;
}
@ -228,15 +228,15 @@ vfile* virt_vfs::stat( const KURL& url ) {
}
else {
busy = true;
KIO::StatJob* statJob = KIO::stat( url, false );
connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
TDEIO::StatJob* statJob = TDEIO::stat( url, false );
connect( statJob, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
while ( busy && vfs_processEvents() );
if( entry.isEmpty() ) return 0; // statJob failed
kfi = new KFileItem(entry, url, true );
}
if ( !kfi->time( KIO::UDS_MODIFICATION_TIME ) ){
if ( !kfi->time( TDEIO::UDS_MODIFICATION_TIME ) ){
delete kfi;
return 0; // file not found
}
@ -250,8 +250,8 @@ vfile* virt_vfs::stat( const KURL& url ) {
else
name = url.prettyURL();
KIO::filesize_t size = kfi->size();
time_t mtime = kfi->time( KIO::UDS_MODIFICATION_TIME );
TDEIO::filesize_t size = kfi->size();
time_t mtime = kfi->time( TDEIO::UDS_MODIFICATION_TIME );
bool symLink = kfi->isLink();
mode_t mode = kfi->mode() | kfi->permissions();
TQString perm = KRpermHandler::mode2TQString( mode );
@ -280,15 +280,15 @@ vfile* virt_vfs::stat( const KURL& url ) {
return temp;
}
KConfig* virt_vfs::getVirtDB(){
TDEConfig* virt_vfs::getVirtDB(){
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;
}
bool virt_vfs::save(){
KConfig* db = getVirtDB();
TDEConfig* db = getVirtDB();
db->setGroup("virt_db");
TQDictIterator<KURL::List> it( virtVfsDict ); // See TQDictIterator
@ -307,7 +307,7 @@ bool virt_vfs::save(){
}
bool virt_vfs::restore(){
KConfig* db = getVirtDB();
TDEConfig* db = getVirtDB();
db->setGroup("virt_db");
TQMap<TQString, TQString> map = db->entryMap("virt_db");
@ -326,7 +326,7 @@ bool virt_vfs::restore(){
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( path == "/" ) {
KURL::List* urlList = virtVfsDict[ name ];

@ -34,7 +34,7 @@ public:
~virt_vfs();
/// 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)
void vfs_delFiles(TQStringList *fileNames);
/// Remove a file from the collection (only its link, not the file)
@ -48,13 +48,13 @@ public:
/// Rename file
void vfs_rename(const TQString& fileName,const TQString& newName);
/// 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
TQString vfs_workingDir(){ return TQString(); }
protected slots:
void slotStatResult(KIO::Job *job);
void slotStatResult(TDEIO::Job *job);
protected:
/// Save the dictionary to file
@ -62,16 +62,16 @@ protected:
/// Restore the dictionary from file
bool restore();
/// return the URLs DB
KConfig* getVirtDB();
TDEConfig* getVirtDB();
bool populateVfsList(const KURL& origin, bool showHidden);
vfile* stat(const KURL& url);
static TQDict<KURL::List> virtVfsDict;
static KConfig* virt_vfs_db;
static TDEConfig* virt_vfs_db;
bool busy;
TQString path;
KIO::UDSEntry entry;
TDEIO::UDSEntry entry;
};
#endif

@ -40,8 +40,8 @@
#define REPORT_TIMEOUT 200
VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
PreserveMode pmode, KIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ) :
KIO::Job( showProgressInfo ), m_totalSize( 0 ), m_totalFiles( 0 ), m_totalSubdirs( 0 ),
PreserveMode pmode, TDEIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ) :
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_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 ),
@ -83,16 +83,16 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
}
if ( showProgressInfo ) {
connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( totalFiles( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalFiles( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( totalDirs( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotTotalDirs( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedFiles( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedFiles( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( processedDirs( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotProcessedDirs( TDEIO::Job*, unsigned long ) ) );
connect( this, TQT_SIGNAL( percent( TDEIO::Job*, unsigned long ) ),
Observer::self(), TQT_SLOT( slotPercent( TDEIO::Job*, unsigned long ) ) );
}
TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) );
@ -100,7 +100,7 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
void VirtualCopyJob::slotStart() {
if( m_showProgressInfo ) {
if( m_mode == KIO::CopyJob::Move )
if( m_mode == TDEIO::CopyJob::Move )
Observer::self()->slotMoving( this, m_baseURL, m_dest );
else
Observer::self()->slotCopying( this, m_baseURL, m_dest );
@ -158,10 +158,10 @@ void VirtualCopyJob::statNextDir() {
m_currentDir = KURL::relativeURL( m_baseURL, dirToCheck.upURL() );
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);
m_totalSize += kds->totalSize();
m_totalFiles += kds->totalFiles();
@ -188,18 +188,18 @@ void VirtualCopyJob::createNextDir() {
if( m_currentDir != "./" && !m_currentDir.isEmpty() )
m_current.addPath( m_currentDir );
KIO::Job *job = KIO::stat( m_current );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
TDEIO::Job *job = TDEIO::stat( m_current );
connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
}
void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
KURL url = (static_cast<KIO::SimpleJob*>(job) )->url();
void VirtualCopyJob::slotStatResult( TDEIO::Job *job ) {
KURL url = (static_cast<TDEIO::SimpleJob*>(job) )->url();
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() );
KIO::Job *job = KIO::stat( url.upURL() );
connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
TDEIO::Job *job = TDEIO::stat( url.upURL() );
connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotStatResult( TDEIO::Job* ) ) );
return;
}
job->showErrorDialog( krApp );
@ -213,15 +213,15 @@ void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
url.addPath( m_dirStack.last() );
m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) );
TDEIO::Job *mkdir_job = TDEIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( TDEIO::Job* ) ) );
}
else
copyCurrentDir();
}
void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
KURL url = (static_cast<KIO::SimpleJob*>(job) )->url();
void VirtualCopyJob::slotMkdirResult( TDEIO::Job *job ) {
KURL url = (static_cast<TDEIO::SimpleJob*>(job) )->url();
if ( job && job->error() ) {
job->showErrorDialog( krApp );
@ -235,8 +235,8 @@ void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
url.addPath( m_dirStack.last() );
m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) );
TDEIO::Job *mkdir_job = TDEIO::mkdir( url );
connect( mkdir_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( TDEIO::Job* ) ) );
}
else
copyCurrentDir();
@ -245,25 +245,25 @@ void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
void VirtualCopyJob::copyCurrentDir() {
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 );
connect( copy_job, TQT_SIGNAL( copying(KIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotCopying(KIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( moving(KIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotMoving(KIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( creatingDir(KIO::Job *, const KURL &) ),
this, TQT_SLOT( slotCreatingDir(KIO::Job *, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( processedFiles (KIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedFiles (KIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedDirs (KIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedDirs (KIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedSize (KIO::Job *, KIO::filesize_t) ),
this, TQT_SLOT( slotProcessedSize (KIO::Job *, KIO::filesize_t) ) );
connect( copy_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCopyResult( KIO::Job* ) ) );
}
void VirtualCopyJob::slotCopyResult( KIO::Job *job ) {
connect( copy_job, TQT_SIGNAL( copying(TDEIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotCopying(TDEIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( moving(TDEIO::Job *, const KURL &, const KURL &) ),
this, TQT_SLOT( slotMoving(TDEIO::Job *, const KURL &, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( creatingDir(TDEIO::Job *, const KURL &) ),
this, TQT_SLOT( slotCreatingDir(TDEIO::Job *, const KURL &) ) );
connect( copy_job, TQT_SIGNAL( processedFiles (TDEIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedFiles (TDEIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedDirs (TDEIO::Job *, unsigned long) ),
this, TQT_SLOT( slotProcessedDirs (TDEIO::Job *, unsigned long) ) );
connect( copy_job, TQT_SIGNAL( processedSize (TDEIO::Job *, TDEIO::filesize_t) ),
this, TQT_SLOT( slotProcessedSize (TDEIO::Job *, TDEIO::filesize_t) ) );
connect( copy_job, TQT_SIGNAL( result( TDEIO::Job* ) ), this, TQT_SLOT( slotCopyResult( TDEIO::Job* ) ) );
}
void VirtualCopyJob::slotCopyResult( TDEIO::Job *job ) {
if ( job && job->error() ) {
job->showErrorDialog( krApp );
}
@ -286,30 +286,30 @@ void VirtualCopyJob::directoryFinished( const TQString &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 )
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 )
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 )
Observer::self()->slotCreatingDir( this, to );
}
void VirtualCopyJob::slotProcessedFiles (KIO::Job *, unsigned long filenum) {
void VirtualCopyJob::slotProcessedFiles (TDEIO::Job *, unsigned long filenum) {
m_tempFiles = filenum;
}
void VirtualCopyJob::slotProcessedDirs (KIO::Job *, unsigned long subdirs) {
void VirtualCopyJob::slotProcessedDirs (TDEIO::Job *, unsigned long 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;
}

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

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

@ -222,13 +222,13 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
TQString message;
switch ( config->getConfigState() ) {
case KConfigBase::NoAccess :
case TDEConfigBase::NoAccess :
message = "Krusader's configuration file can't be found. Default values will be used.";
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";
break;
case KConfigBase::ReadWrite :
case TDEConfigBase::ReadWrite :
message = "";
break;
}
@ -1091,7 +1091,7 @@ void Krusader::updateGUI( bool enforce ) {
}
if ( config->readBoolEntry( "Show Terminal Emulator", _ShowTerminalEmulator ) ) {
mainView->slotTerminalEmulator( true ); // create konsole_part
KConfigGroup grp(krConfig, "Private" );
TDEConfigGroup grp(krConfig, "Private" );
TQValueList<int> lst;
lst.append( grp.readNumEntry( "Panel Size", _PanelSize ) );
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
KMountMan *mountMan; // krusader's Mount Manager
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
PopularUrls *popularUrls; // holds a sorted list of the most popular urls visited
QueueManager *queueManager;

@ -139,7 +139,7 @@ void KrusaderView::start( TQStringList leftTabs, TQStringList leftTypes, TQValue
void KrusaderView::slotCurrentChanged( TQString p ) {
cmdLine->setCurrent( p );
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( !konsole_part->url().equals( KURL( p ), true ) )
konsole_part->openURL( KURL( p ) );
@ -189,7 +189,7 @@ void KrusaderView::panelSwitch() { activePanel->otherPanel->slotFocusOnMe(); }
void KrusaderView::slotSetActivePanel( ListPanel *p ) { activePanel = p; }
void KrusaderView::slotTerminalEmulator( bool show ) {
KConfigGroupSaver grp(krConfig, "Look&Feel");
TDEConfigGroupSaver grp(krConfig, "Look&Feel");
bool fullscreen = krConfig->readBoolEntry("Fullscreen Terminal Emulator", false);
static bool fnKeysShown=true; // first time init. should be overridden
static bool cmdLineShown=true;
@ -279,7 +279,7 @@ void KrusaderView::focusTerminalEmulator()
void KrusaderView::switchFullScreenTE()
{
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);
slotTerminalEmulator( false );
grp.writeEntry("Fullscreen Terminal Emulator", !fullscreen);

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

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

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

@ -21,7 +21,7 @@
#include "tar.h"
using namespace KIO;
using namespace TDEIO;
#if KDE_IS_VERSION(3,4,0)
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;
struct stat buff;
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 ;
}
// 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;
const KArchiveEntry* e = root->entry( path );
if ( !e ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ;
}
if ( ! e->isDirectory() ) {
error( KIO::ERR_IS_FILE, url.prettyURL() );
error( TDEIO::ERR_IS_FILE, url.prettyURL() );
return ;
}
dir = ( KArchiveDirectory* ) e;
@ -306,17 +306,17 @@ void ArchiveProtocol::stat( const KURL & url ) {
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
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 ;
}
// Real directory. Return just enough information for KRun to work
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName();
entry.append( atom );
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;
entry.append( atom );
@ -339,7 +339,7 @@ void ArchiveProtocol::stat( const KURL & url ) {
archiveEntry = root->entry( path );
}
if ( !archiveEntry ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ;
}
@ -354,7 +354,7 @@ void ArchiveProtocol::get( const KURL & url ) {
TQString path;
if ( !checkNewFile( url, path ) ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ;
}
@ -362,11 +362,11 @@ void ArchiveProtocol::get( const KURL & url ) {
const KArchiveEntry* archiveEntry = root->entry( path );
if ( !archiveEntry ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ;
}
if ( archiveEntry->isDirectory() ) {
error( KIO::ERR_IS_DIRECTORY, url.prettyURL() );
error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL() );
return ;
}
const KArchiveFile* archiveFileEntry = static_cast<const KArchiveFile *>( archiveEntry );

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

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

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

Loading…
Cancel
Save