summaryrefslogtreecommitdiffstats
path: root/kioslave
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave')
-rw-r--r--kioslave/DESIGN2
-rw-r--r--kioslave/about/kio_about.cpp2
-rw-r--r--kioslave/about/kio_about.h2
-rw-r--r--kioslave/cgi/cgi.cpp8
-rw-r--r--kioslave/cgi/cgi.h2
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.cpp6
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.h6
-rw-r--r--kioslave/filter/filter.cc10
-rw-r--r--kioslave/filter/filter.h2
-rw-r--r--kioslave/finger/kio_finger.cpp2
-rw-r--r--kioslave/finger/kio_finger.h2
-rw-r--r--kioslave/fish/fish.cpp14
-rw-r--r--kioslave/fish/fish.h34
-rw-r--r--kioslave/floppy/kio_floppy.cpp50
-rw-r--r--kioslave/floppy/kio_floppy.h4
-rw-r--r--kioslave/home/homeimpl.cpp72
-rw-r--r--kioslave/home/homeimpl.h14
-rw-r--r--kioslave/home/kio_home.cpp24
-rw-r--r--kioslave/home/kio_home.h2
-rw-r--r--kioslave/info/info.cc6
-rw-r--r--kioslave/info/info.h2
-rw-r--r--kioslave/ldap/kio_ldap.cpp2
-rw-r--r--kioslave/ldap/kio_ldap.h6
-rw-r--r--kioslave/mac/kio_mac.cpp38
-rw-r--r--kioslave/mac/kio_mac.h8
-rw-r--r--kioslave/man/kio_man.cpp8
-rw-r--r--kioslave/man/kio_man.h2
-rw-r--r--kioslave/man/kmanpart.cpp10
-rw-r--r--kioslave/man/kmanpart.h6
-rw-r--r--kioslave/media/kcmodule/main.cpp2
-rw-r--r--kioslave/media/kcmodule/main.h6
-rw-r--r--kioslave/media/kcmodule/managermodule.cpp12
-rw-r--r--kioslave/media/kcmodule/managermodule.h2
-rw-r--r--kioslave/media/kcmodule/notifiermodule.cpp2
-rw-r--r--kioslave/media/kcmodule/notifiermodule.h2
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.cpp4
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.h6
-rw-r--r--kioslave/media/kio_media.cpp26
-rw-r--r--kioslave/media/kio_media.h2
-rw-r--r--kioslave/media/libmediacommon/medium.cpp4
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.cpp2
-rw-r--r--kioslave/media/mediaimpl.cpp118
-rw-r--r--kioslave/media/mediaimpl.h20
-rw-r--r--kioslave/media/mediamanager/fstabbackend.cpp8
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp20
-rw-r--r--kioslave/media/mediamanager/halbackend.h8
-rw-r--r--kioslave/media/mediamanager/tdehardwarebackend.cpp12
-rw-r--r--kioslave/media/mediamanager/tdehardwarebackend.h6
-rw-r--r--kioslave/media/medianotifier/medianotifier.cpp12
-rw-r--r--kioslave/media/medianotifier/medianotifier.h4
-rw-r--r--kioslave/media/medianotifier/notificationdialog.cpp2
-rw-r--r--kioslave/nfs/kio_nfs.cpp84
-rw-r--r--kioslave/nfs/kio_nfs.h10
-rw-r--r--kioslave/nntp/nntp.cpp6
-rw-r--r--kioslave/nntp/nntp.h4
-rw-r--r--kioslave/pop3/pop3.cc12
-rw-r--r--kioslave/pop3/pop3.h10
-rw-r--r--kioslave/remote/kio_remote.cpp28
-rw-r--r--kioslave/remote/kio_remote.h2
-rw-r--r--kioslave/remote/remoteimpl.cpp54
-rw-r--r--kioslave/remote/remoteimpl.h10
-rw-r--r--kioslave/settings/kio_settings.cc54
-rw-r--r--kioslave/sftp/kio_sftp.cpp28
-rw-r--r--kioslave/sftp/kio_sftp.h10
-rw-r--r--kioslave/sftp/sftpfileattr.cpp2
-rw-r--r--kioslave/sftp/sftpfileattr.h2
-rw-r--r--kioslave/smb/kio_smb.h4
-rw-r--r--kioslave/smb/kio_smb_auth.cpp4
-rw-r--r--kioslave/smb/kio_smb_browse.cpp36
-rw-r--r--kioslave/smb/kio_smb_config.cpp2
-rw-r--r--kioslave/smb/kio_smb_dir.cpp58
-rw-r--r--kioslave/smb/kio_smb_file.cpp26
-rw-r--r--kioslave/smb/kio_smb_mount.cpp12
-rw-r--r--kioslave/smtp/command.cc22
-rw-r--r--kioslave/smtp/command.h4
-rw-r--r--kioslave/smtp/response.cc16
-rw-r--r--kioslave/smtp/smtp.cc24
-rw-r--r--kioslave/smtp/smtp.h2
-rw-r--r--kioslave/smtp/test_commands.cc10
-rw-r--r--kioslave/smtp/transactionstate.cc6
-rw-r--r--kioslave/system/kio_system.cpp20
-rw-r--r--kioslave/system/kio_system.h2
-rw-r--r--kioslave/system/systemimpl.cpp56
-rw-r--r--kioslave/system/systemimpl.h12
-rw-r--r--kioslave/tar/tar.cc58
-rw-r--r--kioslave/tar/tar.h6
-rw-r--r--kioslave/thumbnail/exrcreator.cpp4
-rw-r--r--kioslave/thumbnail/thumbnail.cpp30
-rw-r--r--kioslave/thumbnail/thumbnail.h2
-rw-r--r--kioslave/trash/kio_trash.cpp116
-rw-r--r--kioslave/trash/kio_trash.h14
-rw-r--r--kioslave/trash/ktrash.cpp14
-rw-r--r--kioslave/trash/testtrash.cpp154
-rw-r--r--kioslave/trash/testtrash.h2
-rw-r--r--kioslave/trash/trashimpl.cpp68
-rw-r--r--kioslave/trash/trashimpl.h2
96 files changed, 864 insertions, 864 deletions
diff --git a/kioslave/DESIGN b/kioslave/DESIGN
index 92a03b212..d1b21fd3a 100644
--- a/kioslave/DESIGN
+++ b/kioslave/DESIGN
@@ -23,7 +23,7 @@ Any time you'd like to use non blocking IO over a high level protocol
That's nice, but how do I use it?
-Basically, you create "jobs" by calling a public KIO::blah method
+Basically, you create "jobs" by calling a public TDEIO::blah method
(the correct prototypes, etc, are in kio/job.h). Once this is done, you
connect to the result() signal, and wait for the result. There are
other signals emitted by jobs, see kio/jobclasses.h. Once again,
diff --git a/kioslave/about/kio_about.cpp b/kioslave/about/kio_about.cpp
index 5ef52196d..29fba8e4a 100644
--- a/kioslave/about/kio_about.cpp
+++ b/kioslave/about/kio_about.cpp
@@ -25,7 +25,7 @@
#include <kinstance.h>
#include <kurl.h>
-using namespace KIO;
+using namespace TDEIO;
AboutProtocol::AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("about", pool_socket, app_socket)
diff --git a/kioslave/about/kio_about.h b/kioslave/about/kio_about.h
index a5bff2a8f..db1302f04 100644
--- a/kioslave/about/kio_about.h
+++ b/kioslave/about/kio_about.h
@@ -26,7 +26,7 @@
#include <kio/slavebase.h>
-class AboutProtocol : public KIO::SlaveBase
+class AboutProtocol : public TDEIO::SlaveBase
{
public:
AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket);
diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp
index e527c2db4..9f8906f17 100644
--- a/kioslave/cgi/cgi.cpp
+++ b/kioslave/cgi/cgi.cpp
@@ -31,14 +31,14 @@
#include "cgi.h"
-using namespace KIO;
+using namespace TDEIO;
CgiProtocol::CgiProtocol( const TQCString &pool, const TQCString &app )
: SlaveBase( "cgi", pool, app )
{
kdDebug(7124) << "CgiProtocol::CgiProtocol" << endl;
- KConfig cfg( "kcmcgirc" );
+ TDEConfig cfg( "kcmcgirc" );
cfg.setGroup( "General" );
mCgiPaths = cfg.readListEntry( "Paths" );
}
@@ -150,7 +150,7 @@ void CgiProtocol::get( const KURL& url )
if ( !fd ) {
kdDebug(7124) << "Error opening '" << filepath << "'" << endl;
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, filepath );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, filepath );
return;
}
} else {
@@ -160,7 +160,7 @@ void CgiProtocol::get( const KURL& url )
if ( !fd ) {
kdDebug(7124) << "Error running '" << cmd << "'" << endl;
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, cmd );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, cmd );
return;
}
}
diff --git a/kioslave/cgi/cgi.h b/kioslave/cgi/cgi.h
index 908b6bc99..8f9dc88c8 100644
--- a/kioslave/cgi/cgi.h
+++ b/kioslave/cgi/cgi.h
@@ -28,7 +28,7 @@ class TDEProcess;
This class implements an ioslave for viewing CGI script output without the
need to run a web server.
*/
-class CgiProtocol : public KIO::SlaveBase
+class CgiProtocol : public TDEIO::SlaveBase
{
public:
CgiProtocol( const TQCString &pool, const TQCString &app );
diff --git a/kioslave/cgi/kcmcgi/kcmcgi.cpp b/kioslave/cgi/kcmcgi/kcmcgi.cpp
index a5c0181c5..828f50f69 100644
--- a/kioslave/cgi/kcmcgi/kcmcgi.cpp
+++ b/kioslave/cgi/kcmcgi/kcmcgi.cpp
@@ -33,7 +33,7 @@
extern "C"
{
- KDE_EXPORT KCModule *create_cgi( TQWidget *parent, const char * )
+ KDE_EXPORT TDECModule *create_cgi( TQWidget *parent, const char * )
{
TDEGlobal::locale()->insertCatalogue("kcmcgi");
return new KCMCgi( parent, "kcmcgi" );
@@ -42,7 +42,7 @@ extern "C"
KCMCgi::KCMCgi(TQWidget *parent, const char *name)
- : KCModule(parent, name)
+ : TDECModule(parent, name)
{
setButtons(Default|Apply);
@@ -63,7 +63,7 @@ KCMCgi::KCMCgi(TQWidget *parent, const char *name)
connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removePath() ) );
connect( mListBox, TQT_SIGNAL( clicked ( TQListBoxItem * )),this, TQT_SLOT( slotItemSelected( TQListBoxItem *)));
- mConfig = new KConfig("kcmcgirc");
+ mConfig = new TDEConfig("kcmcgirc");
load();
updateButton();
diff --git a/kioslave/cgi/kcmcgi/kcmcgi.h b/kioslave/cgi/kcmcgi/kcmcgi.h
index d68d3fe23..f6ad715b3 100644
--- a/kioslave/cgi/kcmcgi/kcmcgi.h
+++ b/kioslave/cgi/kcmcgi/kcmcgi.h
@@ -23,9 +23,9 @@
class TQListBox;
class TQPushButton;
-class KConfig;
+class TDEConfig;
-class KCMCgi : public KCModule
+class KCMCgi : public TDECModule
{
Q_OBJECT
public:
@@ -49,7 +49,7 @@ class KCMCgi : public KCModule
TQPushButton *mAddButton;
TQPushButton *mRemoveButton;
- KConfig *mConfig;
+ TDEConfig *mConfig;
};
#endif
diff --git a/kioslave/filter/filter.cc b/kioslave/filter/filter.cc
index 7db846d17..793921c6c 100644
--- a/kioslave/filter/filter.cc
+++ b/kioslave/filter/filter.cc
@@ -54,7 +54,7 @@ int kdemain( int argc, char ** argv)
}
FilterProtocol::FilterProtocol( const TQCString & protocol, const TQCString &pool, const TQCString &app )
- : KIO::SlaveBase( protocol, pool, app )
+ : TDEIO::SlaveBase( protocol, pool, app )
{
TQString mimetype = TQString::fromLatin1("application/x-") + TQString::fromLatin1(protocol);
filter = KFilterBase::findFilterByMimeType( mimetype );
@@ -65,12 +65,12 @@ void FilterProtocol::get( const KURL & )
{
if (subURL.isEmpty())
{
- error( KIO::ERR_NO_SOURCE_PROTOCOL, mProtocol );
+ error( TDEIO::ERR_NO_SOURCE_PROTOCOL, mProtocol );
return;
}
if (!filter)
{
- error( KIO::ERR_INTERNAL, mProtocol );
+ error( TDEIO::ERR_INTERNAL, mProtocol );
return;
}
needSubURLData();
@@ -146,7 +146,7 @@ void FilterProtocol::get( const KURL & )
if (bError)
{
- error(KIO::ERR_COULD_NOT_READ, subURL.url());
+ error(TDEIO::ERR_COULD_NOT_READ, subURL.url());
subURL = KURL(); // Clear subURL
return;
}
@@ -157,7 +157,7 @@ void FilterProtocol::get( const KURL & )
void FilterProtocol::put( const KURL &/*url*/, int, bool /*_overwrite*/, bool /*_resume*/ )
{
- error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("put"));
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("put"));
}
void FilterProtocol::setSubURL(const KURL &url)
diff --git a/kioslave/filter/filter.h b/kioslave/filter/filter.h
index 4f81af3c7..54a91322a 100644
--- a/kioslave/filter/filter.h
+++ b/kioslave/filter/filter.h
@@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kio/global.h>
#include <kio/slavebase.h>
-class FilterProtocol : public TQObject, public KIO::SlaveBase
+class FilterProtocol : public TQObject, public TDEIO::SlaveBase
{
public:
FilterProtocol( const TQCString & protocol, const TQCString &pool, const TQCString &app );
diff --git a/kioslave/finger/kio_finger.cpp b/kioslave/finger/kio_finger.cpp
index efa4d7cb8..8f330b95e 100644
--- a/kioslave/finger/kio_finger.cpp
+++ b/kioslave/finger/kio_finger.cpp
@@ -37,7 +37,7 @@
#include "kio_finger.h"
-using namespace KIO;
+using namespace TDEIO;
static const TQString defaultRefreshRate = "60";
diff --git a/kioslave/finger/kio_finger.h b/kioslave/finger/kio_finger.h
index 97c68f8c3..e9044f26d 100644
--- a/kioslave/finger/kio_finger.h
+++ b/kioslave/finger/kio_finger.h
@@ -28,7 +28,7 @@
#include <kio/global.h>
#include <kio/slavebase.h>
-class FingerProtocol : public TQObject, public KIO::SlaveBase
+class FingerProtocol : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
diff --git a/kioslave/fish/fish.cpp b/kioslave/fish/fish.cpp
index ac8556291..3a527e39e 100644
--- a/kioslave/fish/fish.cpp
+++ b/kioslave/fish/fish.cpp
@@ -114,7 +114,7 @@ static int isNXFish = 0;
#define E(x) ((const char*)remoteEncoding()->encode(x).data())
-using namespace KIO;
+using namespace TDEIO;
extern "C" {
static void ripper(int)
@@ -310,7 +310,7 @@ void fishProtocol::openConnection() {
if (connectionHost.isEmpty() && !isNXFish)
{
- error( KIO::ERR_UNKNOWN_HOST, TQString::null );
+ error( TDEIO::ERR_UNKNOWN_HOST, TQString::null );
return;
}
@@ -532,7 +532,7 @@ bool fishProtocol::connectionStart() {
/**
writes one chunk of data to stdin of child process
*/
-void fishProtocol::writeChild(const char *buf, KIO::fileoffset_t len) {
+void fishProtocol::writeChild(const char *buf, TDEIO::fileoffset_t len) {
if (outBufPos >= 0 && outBuf) {
#if 0
TQString debug;
@@ -549,7 +549,7 @@ void fishProtocol::writeChild(const char *buf, KIO::fileoffset_t len) {
/**
manages initial communication setup including password queries
*/
-int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) {
+int fishProtocol::establishConnection(char *buffer, TDEIO::fileoffset_t len) {
TQString buf;
buf.setLatin1(buffer,len);
int pos;
@@ -812,7 +812,7 @@ void fishProtocol::manageConnection(const TQString &l) {
int rc = handleResponse(line);
UDSAtom atom;
TQDateTime dt;
- KIO::filesize_t fsize;
+ TDEIO::filesize_t fsize;
int pos, pos2, pos3;
bool isOk = false;
if (!rc) {
@@ -1158,7 +1158,7 @@ void fishProtocol::manageConnection(const TQString &l) {
} else if (fishCommand == FISH_STAT) {
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName();
udsStatEntry.append( atom );
statEntry(udsStatEntry);
@@ -1225,7 +1225,7 @@ void fishProtocol::sent()
}
}
-int fishProtocol::received(const char *buffer, KIO::fileoffset_t buflen)
+int fishProtocol::received(const char *buffer, TDEIO::fileoffset_t buflen)
{
int pos = 0;
do {
diff --git a/kioslave/fish/fish.h b/kioslave/fish/fish.h
index 6508d39ba..8a85a9bd2 100644
--- a/kioslave/fish/fish.h
+++ b/kioslave/fish/fish.h
@@ -29,7 +29,7 @@
#define FISH_EXEC_CMD 'X'
-class fishProtocol : public KIO::SlaveBase
+class fishProtocol : public TDEIO::SlaveBase
{
public:
fishProtocol(const TQCString &pool_socket, const TQCString &app_socket);
@@ -90,9 +90,9 @@ private: // Private attributes
/** buffer for data to be written */
const char *outBuf;
/** current write position in buffer */
- KIO::fileoffset_t outBufPos;
+ TDEIO::fileoffset_t outBufPos;
/** length of buffer */
- KIO::fileoffset_t outBufLen;
+ TDEIO::fileoffset_t outBufLen;
/** use su if true else use ssh */
bool local;
/** // FIXME: just a workaround for konq deficiencies */
@@ -102,13 +102,13 @@ private: // Private attributes
protected: // Protected attributes
/** for LIST/STAT */
- KIO::UDSEntry udsEntry;
+ TDEIO::UDSEntry udsEntry;
/** for LIST/STAT */
- KIO::UDSEntry udsStatEntry;
+ TDEIO::UDSEntry udsStatEntry;
/** for LIST/STAT */
- KIO::UDSAtom typeAtom;
+ TDEIO::UDSAtom typeAtom;
/** for LIST/STAT */
- KIO::UDSAtom mimeAtom;
+ TDEIO::UDSAtom mimeAtom;
/** for LIST/STAT */
TQString thisFn;
/** for STAT */
@@ -127,7 +127,7 @@ protected: // Protected attributes
/** password of current connection */
TQString connectionPassword;
/** AuthInfo object used for logging in */
- KIO::AuthInfo connectionAuth;
+ TDEIO::AuthInfo connectionAuth;
/** number of lines received, == 0 -> everything went ok */
int errorCount;
/** queue for lines to be sent */
@@ -137,13 +137,13 @@ protected: // Protected attributes
/** queue for commands to be sent */
TQValueList<int> commandCodes;
/** bytes still to be read in raw mode */
- KIO::fileoffset_t rawRead;
+ TDEIO::fileoffset_t rawRead;
/** bytes still to be written in raw mode */
- KIO::fileoffset_t rawWrite;
+ TDEIO::fileoffset_t rawWrite;
/** data bytes to read in next read command */
- KIO::fileoffset_t recvLen;
+ TDEIO::fileoffset_t recvLen;
/** data bytes to write in next write command */
- KIO::fileoffset_t sendLen;
+ TDEIO::fileoffset_t sendLen;
/** true if the last write operation was finished */
bool writeReady;
/** true if a command stack is currently executing */
@@ -157,7 +157,7 @@ protected: // Protected attributes
/** true if file may be overwritten */
bool checkOverwrite;
/** current position of write */
- KIO::fileoffset_t putPos;
+ TDEIO::fileoffset_t putPos;
/** true if file already existed */
bool checkExist;
/** true if this is the first login attempt (== use cached password) */
@@ -169,7 +169,7 @@ protected: // Protected attributes
/** whther the mimetype has been sent already */
bool mimeTypeSent;
/** number of bytes read so far */
- KIO::fileoffset_t dataRead;
+ TDEIO::fileoffset_t dataRead;
/** details about each fishCommand */
static const struct fish_info {
const char *command;
@@ -186,8 +186,8 @@ protected: // Protected attributes
int fishCodeLen;
protected: // Protected methods
/** manages initial communication setup including password queries */
- int establishConnection(char *buffer, KIO::fileoffset_t buflen);
- int received(const char *buffer, KIO::fileoffset_t buflen);
+ int establishConnection(char *buffer, TDEIO::fileoffset_t buflen);
+ int received(const char *buffer, TDEIO::fileoffset_t buflen);
void sent();
/** builds each FISH request and sets the error counter */
bool sendCommand(fish_command_type cmd, ...);
@@ -200,7 +200,7 @@ protected: // Protected methods
/** creates the subprocess */
bool connectionStart();
/** writes one chunk of data to stdin of child process */
- void writeChild(const char *buf, KIO::fileoffset_t len);
+ void writeChild(const char *buf, TDEIO::fileoffset_t len);
/** parses response from server and acts accordingly */
void manageConnection(const TQString &line);
/** writes to process */
diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp
index c9f8daa80..8b80e8d54 100644
--- a/kioslave/floppy/kio_floppy.cpp
+++ b/kioslave/floppy/kio_floppy.cpp
@@ -47,7 +47,7 @@
#include <kio/global.h>
#include <klocale.h>
-using namespace KIO;
+using namespace TDEIO;
extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
@@ -197,56 +197,56 @@ bool FloppyProtocol::stopAfterError(const KURL& url, const TQString& drive)
kdDebug(7101)<<"line: -"<<line<<"-"<<endl;
if (line.find("resource busy") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access drive %1.\nThe drive is still busy.\nWait until it is inactive and then try again.").arg(drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access drive %1.\nThe drive is still busy.\nWait until it is inactive and then try again.").arg(drive));
}
else if ((line.find("Disk full") > -1) || (line.find("No free cluster") > -1))
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive));
}
//file not found
else if (line.find("not found") > -1)
{
- error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
//no disk
else if (line.find("not configured") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2").arg(url.prettyURL(),drive));
}
else if (line.find("No such device") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2 or you do not have enough permissions to access the drive.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2 or you do not have enough permissions to access the drive.").arg(url.prettyURL(),drive));
}
else if (line.find("not supported") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe drive %2 is not supported.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe drive %2 is not supported.").arg(url.prettyURL(),drive));
}
//not supported or no such drive
else if (line.find("Permission denied") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nMake sure the floppy in drive %2 is a DOS-formatted floppy disk \nand that the permissions of the device file (e.g. /dev/fd0) are set correctly (e.g. rwxrwxrwx).").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nMake sure the floppy in drive %2 is a DOS-formatted floppy disk \nand that the permissions of the device file (e.g. /dev/fd0) are set correctly (e.g. rwxrwxrwx).").arg(url.prettyURL(),drive));
}
else if (line.find("non DOS media") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe disk in drive %2 is probably not a DOS-formatted floppy disk.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe disk in drive %2 is probably not a DOS-formatted floppy disk.").arg(url.prettyURL(),drive));
}
else if (line.find("Read-only") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Access denied.\nCould not write to %1.\nThe disk in drive %2 is probably write-protected.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Access denied.\nCould not write to %1.\nThe disk in drive %2 is probably write-protected.").arg(url.prettyURL(),drive));
}
else if ((outputString.find("already exists") > -1) || (outputString.find("Skipping ") > -1))
{
- error( KIO::ERR_FILE_ALREADY_EXIST,url.prettyURL());
+ error( TDEIO::ERR_FILE_ALREADY_EXIST,url.prettyURL());
//return false;
}
else if (outputString.find("could not read boot sector") > -1)
{
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not read boot sector for %1.\nThere is probably not any disk in drive %2.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not read boot sector for %1.\nThere is probably not any disk in drive %2.").arg(url.prettyURL(),drive));
//return false;
}
else
{
- error( KIO::ERR_UNKNOWN, outputString);
+ error( TDEIO::ERR_UNKNOWN, outputString);
}
return true;
}
@@ -365,29 +365,29 @@ void FloppyProtocol::listDir( const KURL& _url)
void FloppyProtocol::errorMissingMToolsProgram(const TQString& name)
{
- error(KIO::ERR_SLAVE_DEFINED,i18n("Could not start program \"%1\".\nEnsure that the mtools package is installed correctly on your system.").arg(name));
+ error(TDEIO::ERR_SLAVE_DEFINED,i18n("Could not start program \"%1\".\nEnsure that the mtools package is installed correctly on your system.").arg(name));
}
void FloppyProtocol::createUDSEntry(const StatInfo& info, UDSEntry& entry)
{
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = info.name;
entry.append( atom );
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = info.size;
entry.append(atom);
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = info.time;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long=info.mode;
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long =(info.isDir?S_IFDIR:S_IFREG);
entry.append( atom );
}
@@ -568,7 +568,7 @@ StatInfo FloppyProtocol::_stat(const KURL& url)
if (m_stdoutSize==0)
{
info.isValid=false;
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL());
return info;
}
@@ -583,11 +583,11 @@ StatInfo FloppyProtocol::_stat(const KURL& url)
continue;
StatInfo info=createStatInfo(line,true,url.fileName());
if (info.isValid==false)
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL());
return info;
}
if (info.isValid==false)
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL());
return info;
}
@@ -657,7 +657,7 @@ int FloppyProtocol::freeSpace(const KURL& url)
if (m_stdoutSize==0)
{
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL());
return -1;
}
@@ -1141,7 +1141,7 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
if (bytesRead>freeSpaceLeft)
{
result=0;
- error( KIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive));
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive));
}
else
{
@@ -1157,7 +1157,7 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
if (result<0)
{
perror("writing to stdin");
- error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
return;
}
diff --git a/kioslave/floppy/kio_floppy.h b/kioslave/floppy/kio_floppy.h
index 3cc58488f..783e496ae 100644
--- a/kioslave/floppy/kio_floppy.h
+++ b/kioslave/floppy/kio_floppy.h
@@ -40,7 +40,7 @@ struct StatInfo
};
-class FloppyProtocol : public KIO::SlaveBase
+class FloppyProtocol : public TDEIO::SlaveBase
{
public:
FloppyProtocol (const TQCString &pool, const TQCString &app );
@@ -60,7 +60,7 @@ class FloppyProtocol : public KIO::SlaveBase
int readStderr();
StatInfo createStatInfo(const TQString line, bool makeStat=false, const TQString& dirName="");
- void createUDSEntry(const StatInfo& info, KIO::UDSEntry& entry);
+ void createUDSEntry(const StatInfo& info, TDEIO::UDSEntry& entry);
StatInfo _stat(const KURL& _url);
int freeSpace(const KURL& url);
diff --git a/kioslave/home/homeimpl.cpp b/kioslave/home/homeimpl.cpp
index 9d6d0d5bd..ea3dad520 100644
--- a/kioslave/home/homeimpl.cpp
+++ b/kioslave/home/homeimpl.cpp
@@ -69,7 +69,7 @@ bool HomeImpl::realURL(const TQString &name, const TQString &path, KURL &url)
}
-bool HomeImpl::listHomes(TQValueList<KIO::UDSEntry> &list)
+bool HomeImpl::listHomes(TQValueList<TDEIO::UDSEntry> &list)
{
kdDebug() << "HomeImpl::listHomes" << endl;
@@ -93,7 +93,7 @@ bool HomeImpl::listHomes(TQValueList<KIO::UDSEntry> &list)
&& !uid_list.contains( (*it).uid() ) )
{
uid_list.append( (*it).uid() );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
createHomeEntry(entry, *it);
list.append(entry);
}
@@ -103,10 +103,10 @@ bool HomeImpl::listHomes(TQValueList<KIO::UDSEntry> &list)
return true;
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -114,19 +114,19 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void HomeImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
+void HomeImpl::createTopLevelEntry(TDEIO::UDSEntry &entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "kfm_home");
- addAtom(entry, KIO::UDS_USER, 0, "root");
- addAtom(entry, KIO::UDS_GROUP, 0, "root");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "kfm_home");
+ addAtom(entry, TDEIO::UDS_USER, 0, "root");
+ addAtom(entry, TDEIO::UDS_GROUP, 0, "root");
}
-void HomeImpl::createHomeEntry(KIO::UDSEntry &entry,
+void HomeImpl::createHomeEntry(TDEIO::UDSEntry &entry,
const KUser &user)
{
kdDebug() << "HomeImpl::createHomeEntry" << endl;
@@ -140,13 +140,13 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry,
full_name = user.fullName()+" ("+user.loginName()+")";
}
- full_name = KIO::encodeFileName( full_name );
+ full_name = TDEIO::encodeFileName( full_name );
- addAtom(entry, KIO::UDS_NAME, 0, full_name);
- addAtom(entry, KIO::UDS_URL, 0, "home:/"+user.loginName());
+ addAtom(entry, TDEIO::UDS_NAME, 0, full_name);
+ addAtom(entry, TDEIO::UDS_URL, 0, "home:/"+user.loginName());
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon_name = "folder_home2";
@@ -155,14 +155,14 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry,
icon_name = "folder_home";
}
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon_name);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon_name);
KURL url;
url.setPath(user.homeDir());
entry += extractUrlInfos(url);
}
-bool HomeImpl::statHome(const TQString &name, KIO::UDSEntry &entry)
+bool HomeImpl::statHome(const TQString &name, TDEIO::UDSEntry &entry)
{
kdDebug() << "HomeImpl::statHome: " << name << endl;
@@ -177,41 +177,41 @@ bool HomeImpl::statHome(const TQString &name, KIO::UDSEntry &entry)
return false;
}
-void HomeImpl::slotStatResult(KIO::Job *job)
+void HomeImpl::slotStatResult(TDEIO::Job *job)
{
if ( job->error() == 0)
{
- KIO::StatJob *stat_job = static_cast<KIO::StatJob *>(job);
+ TDEIO::StatJob *stat_job = static_cast<TDEIO::StatJob *>(job);
m_entryBuffer = stat_job->statResult();
}
tqApp->eventLoop()->exitLoop();
}
-KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url)
+TDEIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url)
{
m_entryBuffer.clear();
- KIO::StatJob *job = KIO::stat(url, false);
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( slotStatResult(KIO::Job *) ) );
+ TDEIO::StatJob *job = TDEIO::stat(url, false);
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( slotStatResult(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
- KIO::UDSEntry::iterator it = m_entryBuffer.begin();
- KIO::UDSEntry::iterator end = m_entryBuffer.end();
+ TDEIO::UDSEntry::iterator it = m_entryBuffer.begin();
+ TDEIO::UDSEntry::iterator end = m_entryBuffer.end();
- KIO::UDSEntry infos;
+ TDEIO::UDSEntry infos;
for(; it!=end; ++it)
{
switch( (*it).m_uds )
{
- case KIO::UDS_ACCESS:
- case KIO::UDS_USER:
- case KIO::UDS_GROUP:
- case KIO::UDS_CREATION_TIME:
- case KIO::UDS_MODIFICATION_TIME:
- case KIO::UDS_ACCESS_TIME:
+ case TDEIO::UDS_ACCESS:
+ case TDEIO::UDS_USER:
+ case TDEIO::UDS_GROUP:
+ case TDEIO::UDS_CREATION_TIME:
+ case TDEIO::UDS_MODIFICATION_TIME:
+ case TDEIO::UDS_ACCESS_TIME:
infos.append(*it);
break;
default:
@@ -219,7 +219,7 @@ KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url)
}
}
- addAtom(infos, KIO::UDS_LOCAL_PATH, 0, url.path());
+ addAtom(infos, TDEIO::UDS_LOCAL_PATH, 0, url.path());
return infos;
}
diff --git a/kioslave/home/homeimpl.h b/kioslave/home/homeimpl.h
index 62c7b3868..786fa598a 100644
--- a/kioslave/home/homeimpl.h
+++ b/kioslave/home/homeimpl.h
@@ -36,19 +36,19 @@ public:
bool parseURL(const KURL &url, TQString &name, TQString &path) const;
bool realURL(const TQString &name, const TQString &path, KURL &url);
- bool statHome(const TQString &name, KIO::UDSEntry &entry);
- bool listHomes(TQValueList<KIO::UDSEntry> &list);
+ bool statHome(const TQString &name, TDEIO::UDSEntry &entry);
+ bool listHomes(TQValueList<TDEIO::UDSEntry> &list);
- void createTopLevelEntry(KIO::UDSEntry &entry) const;
+ void createTopLevelEntry(TDEIO::UDSEntry &entry) const;
private slots:
- void slotStatResult(KIO::Job *job);
+ void slotStatResult(TDEIO::Job *job);
private:
- void createHomeEntry(KIO::UDSEntry& entry, const KUser &user);
+ void createHomeEntry(TDEIO::UDSEntry& entry, const KUser &user);
- KIO::UDSEntry extractUrlInfos(const KURL &url);
- KIO::UDSEntry m_entryBuffer;
+ TDEIO::UDSEntry extractUrlInfos(const KURL &url);
+ TDEIO::UDSEntry m_entryBuffer;
long m_effectiveUid;
diff --git a/kioslave/home/kio_home.cpp b/kioslave/home/kio_home.cpp
index 3f307f6fd..bd55aee0a 100644
--- a/kioslave/home/kio_home.cpp
+++ b/kioslave/home/kio_home.cpp
@@ -72,14 +72,14 @@ bool HomeProtocol::rewriteURL(const KURL &url, KURL &newUrl)
if ( !m_impl.parseURL(url, name, path) )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return false;
}
if ( !m_impl.realURL(name, path, newUrl) )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return false;
}
@@ -102,7 +102,7 @@ void HomeProtocol::listDir(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
@@ -111,14 +111,14 @@ void HomeProtocol::listDir(const KURL &url)
void HomeProtocol::listRoot()
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
- KIO::UDSEntryList home_entries;
+ TDEIO::UDSEntryList home_entries;
bool ok = m_impl.listHomes(home_entries);
if (!ok) // can't happen
{
- error(KIO::ERR_UNKNOWN, "");
+ error(TDEIO::ERR_UNKNOWN, "");
return;
}
@@ -127,8 +127,8 @@ void HomeProtocol::listRoot()
m_impl.createTopLevelEntry(entry);
listEntry(entry, false);
- KIO::UDSEntryListIterator it = home_entries.begin();
- KIO::UDSEntryListIterator end = home_entries.end();
+ TDEIO::UDSEntryListIterator it = home_entries.begin();
+ TDEIO::UDSEntryListIterator end = home_entries.end();
for(; it!=end; ++it)
{
@@ -149,7 +149,7 @@ void HomeProtocol::stat(const KURL &url)
if ( path.isEmpty() || path == "/" )
{
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
m_impl.createTopLevelEntry( entry );
statEntry( entry );
finished();
@@ -161,13 +161,13 @@ void HomeProtocol::stat(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
if( path.isEmpty() )
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if ( m_impl.statHome(name, entry) )
{
@@ -176,7 +176,7 @@ void HomeProtocol::stat(const KURL &url)
}
else
{
- error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
}
else
diff --git a/kioslave/home/kio_home.h b/kioslave/home/kio_home.h
index cf5f3a3cd..25607a5d4 100644
--- a/kioslave/home/kio_home.h
+++ b/kioslave/home/kio_home.h
@@ -23,7 +23,7 @@
#include <kio/forwardingslavebase.h>
#include "homeimpl.h"
-class HomeProtocol : public KIO::ForwardingSlaveBase
+class HomeProtocol : public TDEIO::ForwardingSlaveBase
{
public:
HomeProtocol(const TQCString &protocol, const TQCString &pool,
diff --git a/kioslave/info/info.cc b/kioslave/info/info.cc
index 4af1f4c63..71d2dc863 100644
--- a/kioslave/info/info.cc
+++ b/kioslave/info/info.cc
@@ -16,7 +16,7 @@
#include "info.h"
-using namespace KIO;
+using namespace TDEIO;
InfoProtocol::InfoProtocol( const TQCString &pool, const TQCString &app )
: SlaveBase( "info", pool, app )
@@ -39,7 +39,7 @@ InfoProtocol::InfoProtocol( const TQCString &pool, const TQCString &app )
errorStr = "kde-info2html" + i18n( "\nUnable to locate file %1 which is necessary to run this service. "
"Please check your software installation" ).arg( missing );
}
- error( KIO::ERR_CANNOT_LAUNCH_PROCESS, errorStr );
+ error( TDEIO::ERR_CANNOT_LAUNCH_PROCESS, errorStr );
exit();
}
@@ -230,7 +230,7 @@ void InfoProtocol::stat( const KURL & )
UDSAtom uds_atom;
// Regular file with rwx permission for all
- uds_atom.m_uds = KIO::UDS_FILE_TYPE;
+ uds_atom.m_uds = TDEIO::UDS_FILE_TYPE;
uds_atom.m_long = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
uds_entry.append( uds_atom );
diff --git a/kioslave/info/info.h b/kioslave/info/info.h
index 068546803..639348513 100644
--- a/kioslave/info/info.h
+++ b/kioslave/info/info.h
@@ -7,7 +7,7 @@
class TDEProcess;
-class InfoProtocol : public KIO::SlaveBase
+class InfoProtocol : public TDEIO::SlaveBase
{
public:
diff --git a/kioslave/ldap/kio_ldap.cpp b/kioslave/ldap/kio_ldap.cpp
index fe958c35c..d4a29f1d4 100644
--- a/kioslave/ldap/kio_ldap.cpp
+++ b/kioslave/ldap/kio_ldap.cpp
@@ -24,7 +24,7 @@
#include "kio_ldap.h"
-using namespace KIO;
+using namespace TDEIO;
using namespace KABC;
extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
diff --git a/kioslave/ldap/kio_ldap.h b/kioslave/ldap/kio_ldap.h
index d262b61ea..4ee15ad2b 100644
--- a/kioslave/ldap/kio_ldap.h
+++ b/kioslave/ldap/kio_ldap.h
@@ -12,7 +12,7 @@
#include <ldap.h>
#include <kabc/ldapurl.h>
-class LDAPProtocol : public KIO::SlaveBase
+class LDAPProtocol : public TDEIO::SlaveBase
{
public:
LDAPProtocol( const TQCString &protocol, const TQCString &pool, const TQCString &app );
@@ -51,7 +51,7 @@ class LDAPProtocol : public KIO::SlaveBase
const TQByteArray &value, bool critical );
void addModOp( LDAPMod ***pmods, int mod_type,
const TQString &attr, const TQByteArray &value );
- void LDAPEntry2UDSEntry( const TQString &dn, KIO::UDSEntry &entry,
+ void LDAPEntry2UDSEntry( const TQString &dn, TDEIO::UDSEntry &entry,
const KABC::LDAPUrl &usrc, bool dir=false );
int asyncSearch( KABC::LDAPUrl &usrc );
@@ -59,7 +59,7 @@ class LDAPProtocol : public KIO::SlaveBase
void LDAPErr( const KURL &url, int err = LDAP_SUCCESS );
void changeCheck( KABC::LDAPUrl &url );
- void fillAuthInfo( KIO::AuthInfo &info );
+ void fillAuthInfo( TDEIO::AuthInfo &info );
};
#endif
diff --git a/kioslave/mac/kio_mac.cpp b/kioslave/mac/kio_mac.cpp
index 47b56119c..a7fc4da0f 100644
--- a/kioslave/mac/kio_mac.cpp
+++ b/kioslave/mac/kio_mac.cpp
@@ -32,7 +32,7 @@
#include "kio_mac.moc"
-using namespace KIO;
+using namespace TDEIO;
extern "C" {
int KDE_EXPORT kdemain(int, char **argv) {
@@ -76,10 +76,10 @@ void MacProtocol::get(const KURL& url) {
UDSEntry entry = doStat(url);
UDSEntry::Iterator it;
for(it = entry.begin(); it != entry.end(); ++it) {
- if ((*it).m_uds == KIO::UDS_MIME_TYPE) {
+ if ((*it).m_uds == TDEIO::UDS_MIME_TYPE) {
mime = (*it).m_str;
}
- if ((*it).m_uds == KIO::UDS_SIZE) {
+ if ((*it).m_uds == TDEIO::UDS_SIZE) {
totalSize((*it).m_long);
}
}
@@ -180,7 +180,7 @@ void MacProtocol::stat(const KURL& url) {
//doStat(), does all the work that stat() needs
//it's been separated out so it can be called from get() which
//also need information
-TQValueList<KIO::UDSAtom> MacProtocol::doStat(const KURL& url) {
+TQValueList<TDEIO::UDSAtom> MacProtocol::doStat(const KURL& url) {
TQString filename = prepareHP(url);
if (filename.isNull()) {
@@ -225,7 +225,7 @@ TQValueList<KIO::UDSAtom> MacProtocol::doStat(const KURL& url) {
return entry;
}//if filename == null
- return TQValueList<KIO::UDSAtom>();
+ return TQValueList<TDEIO::UDSAtom>();
}
//prepareHP() called from get() listDir() and stat()
@@ -239,7 +239,7 @@ TQString MacProtocol::prepareHP(const KURL& url) {
//find out if a device has been specified in the query e.g. ?dev=/dev/fd0
//or in the config file (query device entries are saved to config file)
TQString device;
- KConfig* config = new KConfig("macrc");
+ TDEConfig* config = new TDEConfig("macrc");
TQString query = url.query();
int modepos = query.find("dev=");
@@ -333,7 +333,7 @@ TQString MacProtocol::prepareHP(const KURL& url) {
//makeUDS() takes a line of output from hpls -l and converts it into
// one of these UDSEntrys to return
//called from listDir() and stat()
-TQValueList<KIO::UDSAtom> MacProtocol::makeUDS(const TQString& _line) {
+TQValueList<TDEIO::UDSAtom> MacProtocol::makeUDS(const TQString& _line) {
TQString line(_line);
UDSEntry entry;
@@ -342,38 +342,38 @@ TQValueList<KIO::UDSAtom> MacProtocol::makeUDS(const TQString& _line) {
TQRegExp fileRE("^([f|F]). +(....)/(....) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +(.*)");
if (dirRE.exactMatch(line)) {
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = dirRE.cap(6);
entry.append(atom);
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = makeTime(dirRE.cap(4), dirRE.cap(3), dirRE.cap(5));
entry.append(atom);
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append(atom);
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = 0755;
entry.append(atom);
} else if (fileRE.exactMatch(line)) {
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = fileRE.cap(9);
entry.append(atom);
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
TQString theSize(fileRE.cap(4)); //TODO: this is data size, what about resource size?
atom.m_long = theSize.toLong();
entry.append(atom);
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = makeTime(fileRE.cap(7), fileRE.cap(6), fileRE.cap(8));
entry.append(atom);
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
if (TQString(fileRE.cap(1)) == TQString("F")) { //if locked then read only
atom.m_long = 0444;
} else {
@@ -381,7 +381,7 @@ TQValueList<KIO::UDSAtom> MacProtocol::makeUDS(const TQString& _line) {
}
entry.append(atom);
- atom.m_uds = KIO::UDS_MIME_TYPE;
+ atom.m_uds = TDEIO::UDS_MIME_TYPE;
TQString mimetype = getMimetype(fileRE.cap(2),fileRE.cap(3));
atom.m_str = mimetype.local8Bit();
entry.append(atom);
@@ -389,17 +389,17 @@ TQValueList<KIO::UDSAtom> MacProtocol::makeUDS(const TQString& _line) {
// Is it a file or a link/alias, just make aliases link to themselves
if (TQString(fileRE.cap(2)) == TQString("adrp") ||
TQString(fileRE.cap(2)) == TQString("fdrp")) {
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFREG;
entry.append(atom);
- atom.m_uds = KIO::UDS_LINK_DEST;
+ atom.m_uds = TDEIO::UDS_LINK_DEST;
atom.m_str = fileRE.cap(9); //I have a file called "Mozilla alias" the name
// of which displays funny because of this.
// No idea why. Same for other kioslaves. A font thing?
entry.append(atom);
} else {
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFREG;
entry.append(atom);
}
diff --git a/kioslave/mac/kio_mac.h b/kioslave/mac/kio_mac.h
index 1376efe7a..2501791b2 100644
--- a/kioslave/mac/kio_mac.h
+++ b/kioslave/mac/kio_mac.h
@@ -26,7 +26,7 @@
#include <tqfile.h>
#include <tqtextstream.h>
-class MacProtocol : public TQObject, public KIO::SlaveBase
+class MacProtocol : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
public:
@@ -40,12 +40,12 @@ protected slots:
void slotSetDataStdOutput(TDEProcess*, char *s, int len);
protected:
TQString prepareHP(const KURL& _url);
- TQValueList<KIO::UDSAtom> makeUDS(const TQString& _line);
+ TQValueList<TDEIO::UDSAtom> makeUDS(const TQString& _line);
int makeTime(TQString mday, TQString mon, TQString third);
TQString getMimetype(TQString type, TQString app);
- TQValueList<KIO::UDSAtom> doStat(const KURL& url);
+ TQValueList<TDEIO::UDSAtom> doStat(const KURL& url);
- KIO::filesize_t processedBytes;
+ TDEIO::filesize_t processedBytes;
TQString standardOutputStream;
TDEProcess* myTDEProcess;
diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp
index cc7ac770b..1fd81de8d 100644
--- a/kioslave/man/kio_man.cpp
+++ b/kioslave/man/kio_man.cpp
@@ -46,7 +46,7 @@
#include <kfilterbase.h>
#include <kfilterdev.h>
-using namespace KIO;
+using namespace TDEIO;
MANProtocol *MANProtocol::_self = 0;
@@ -649,7 +649,7 @@ void MANProtocol::stat( const KURL& url)
if (!parseUrl(url.path(), title, section))
{
- error(KIO::ERR_MALFORMED_URL, url.url());
+ error(TDEIO::ERR_MALFORMED_URL, url.url());
return;
}
@@ -1485,7 +1485,7 @@ void MANProtocol::listDir(const KURL &url)
TQString section;
if ( !parseUrl(url.path(), title, section) ) {
- error( KIO::ERR_MALFORMED_URL, url.url() );
+ error( TDEIO::ERR_MALFORMED_URL, url.url() );
return;
}
@@ -1495,7 +1495,7 @@ void MANProtocol::listDir(const KURL &url)
UDSEntry uds_entry;
UDSAtom uds_atom;
- uds_atom.m_uds = KIO::UDS_NAME; // we only do names...
+ uds_atom.m_uds = TDEIO::UDS_NAME; // we only do names...
uds_entry.append( uds_atom );
TQStringList::Iterator it = list.begin();
diff --git a/kioslave/man/kio_man.h b/kioslave/man/kio_man.h
index ee987ddd9..caa59ff3b 100644
--- a/kioslave/man/kio_man.h
+++ b/kioslave/man/kio_man.h
@@ -32,7 +32,7 @@
#include <kio/slavebase.h>
-class MANProtocol : public TQObject, public KIO::SlaveBase
+class MANProtocol : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
diff --git a/kioslave/man/kmanpart.cpp b/kioslave/man/kmanpart.cpp
index 06ced93ec..01768e33d 100644
--- a/kioslave/man/kmanpart.cpp
+++ b/kioslave/man/kmanpart.cpp
@@ -94,18 +94,18 @@ bool KManPart::openFile()
url.setProtocol( "man" );
url.setPath( m_file );
- m_job = KIO::get( url, true, false );
- connect( m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray &) ), TQT_SLOT( readData( KIO::Job *, const TQByteArray &) ) );
- connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( jobDone( KIO::Job * ) ) );
+ m_job = TDEIO::get( url, true, false );
+ connect( m_job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray &) ), TQT_SLOT( readData( TDEIO::Job *, const TQByteArray &) ) );
+ connect( m_job, TQT_SIGNAL( result( TDEIO::Job * ) ), TQT_SLOT( jobDone( TDEIO::Job * ) ) );
return true;
}
-void KManPart::readData(KIO::Job * , const TQByteArray & data)
+void KManPart::readData(TDEIO::Job * , const TQByteArray & data)
{
write(data,data.size());
}
-void KManPart::jobDone( KIO::Job *)
+void KManPart::jobDone( TDEIO::Job *)
{
m_job=0;
end();
diff --git a/kioslave/man/kmanpart.h b/kioslave/man/kmanpart.h
index 2f39af11f..dd290cf75 100644
--- a/kioslave/man/kmanpart.h
+++ b/kioslave/man/kmanpart.h
@@ -66,13 +66,13 @@ class KManPart : public KHTMLPart
public slots:
virtual bool openURL( const KURL &url );
protected slots:
- void readData(KIO::Job * , const TQByteArray & data);
- void jobDone( KIO::Job *);
+ void readData(TDEIO::Job * , const TQByteArray & data);
+ void jobDone( TDEIO::Job *);
protected:
virtual bool openFile();
TDEInstance *m_instance;
KParts::BrowserExtension * m_extension;
- KIO::TransferJob *m_job;
+ TDEIO::TransferJob *m_job;
};
#endif
diff --git a/kioslave/media/kcmodule/main.cpp b/kioslave/media/kcmodule/main.cpp
index 29c48d990..9036583df 100644
--- a/kioslave/media/kcmodule/main.cpp
+++ b/kioslave/media/kcmodule/main.cpp
@@ -37,7 +37,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_media, MediaFactory( "kcmmedia" ) )
MediaModule::MediaModule( TQWidget *parent, const char *name, const TQStringList& )
- : KCModule(MediaFactory::instance(), parent, name )
+ : TDECModule(MediaFactory::instance(), parent, name )
{
TDEGlobal::locale()->insertCatalogue("kio_media");
TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
diff --git a/kioslave/media/kcmodule/main.h b/kioslave/media/kcmodule/main.h
index 14e747bd9..b5297aed5 100644
--- a/kioslave/media/kcmodule/main.h
+++ b/kioslave/media/kcmodule/main.h
@@ -22,7 +22,7 @@
#include <kcmodule.h>
-class MediaModule : public KCModule
+class MediaModule : public TDECModule
{
Q_OBJECT
@@ -38,8 +38,8 @@ protected slots:
void moduleChanged( bool state );
private:
- KCModule *m_notifierModule;
- KCModule *m_managerModule;
+ TDECModule *m_notifierModule;
+ TDECModule *m_managerModule;
};
#endif
diff --git a/kioslave/media/kcmodule/managermodule.cpp b/kioslave/media/kcmodule/managermodule.cpp
index 712b026f4..4c9859889 100644
--- a/kioslave/media/kcmodule/managermodule.cpp
+++ b/kioslave/media/kcmodule/managermodule.cpp
@@ -34,7 +34,7 @@
#include "mediamanagersettings.h"
ManagerModule::ManagerModule( TQWidget* parent, const char* name )
- : KCModule( parent, name )
+ : TDECModule( parent, name )
{
view = new ManagerModuleView( this );
@@ -71,9 +71,9 @@ ManagerModule::ManagerModule( TQWidget* parent, const char* name )
void ManagerModule::load()
{
- KCModule::load();
+ TDECModule::load();
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup("DefaultOptions");
view->option_automount->setChecked( config.readBoolEntry("automount", false) );
@@ -109,9 +109,9 @@ void ManagerModule::load()
void ManagerModule::save()
{
- KCModule::save();
+ TDECModule::save();
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup("DefaultOptions");
config.writeEntry("automount", view->option_automount->isChecked());
@@ -152,7 +152,7 @@ void ManagerModule::save()
void ManagerModule::defaults()
{
- KCModule::defaults();
+ TDECModule::defaults();
view->option_automount->setChecked(false);
view->option_ro->setChecked(false);
diff --git a/kioslave/media/kcmodule/managermodule.h b/kioslave/media/kcmodule/managermodule.h
index e34610c7e..a26c7a24a 100644
--- a/kioslave/media/kcmodule/managermodule.h
+++ b/kioslave/media/kcmodule/managermodule.h
@@ -25,7 +25,7 @@
class ManagerModuleView;
-class ManagerModule : public KCModule
+class ManagerModule : public TDECModule
{
Q_OBJECT
diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp
index c7871c953..4146c514f 100644
--- a/kioslave/media/kcmodule/notifiermodule.cpp
+++ b/kioslave/media/kcmodule/notifiermodule.cpp
@@ -32,7 +32,7 @@
#include "mimetypelistboxitem.h"
NotifierModule::NotifierModule(TQWidget *parent, const char *name)
- : KCModule(parent, name)
+ : TDECModule(parent, name)
{
TQBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
diff --git a/kioslave/media/kcmodule/notifiermodule.h b/kioslave/media/kcmodule/notifiermodule.h
index 88f06c97b..391feb47f 100644
--- a/kioslave/media/kcmodule/notifiermodule.h
+++ b/kioslave/media/kcmodule/notifiermodule.h
@@ -26,7 +26,7 @@
#include "notifiersettings.h"
#include "notifiermoduleview.h"
-class NotifierModule : public KCModule
+class NotifierModule : public TDECModule
{
Q_OBJECT
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
index eff311b0d..c6174da81 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
@@ -121,8 +121,8 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
if ( ::statvfs(TQFile::encodeName(mount_point), &vfs) != -1 )
{
- m_total = static_cast<KIO::filesize_t>(vfs.f_blocks) * static_cast<KIO::filesize_t>(vfs.f_frsize);
- m_free = static_cast<KIO::filesize_t>(vfs.f_bavail) * static_cast<KIO::filesize_t>(vfs.f_frsize);
+ m_total = static_cast<TDEIO::filesize_t>(vfs.f_blocks) * static_cast<TDEIO::filesize_t>(vfs.f_frsize);
+ m_free = static_cast<TDEIO::filesize_t>(vfs.f_bavail) * static_cast<TDEIO::filesize_t>(vfs.f_frsize);
m_used = m_total - m_free;
int percent = 0;
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.h b/kioslave/media/kfile-plugin/kfilemediaplugin.h
index 7799ffc3d..df99c46c1 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.h
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.h
@@ -39,9 +39,9 @@ private:
void addMimeType(const char *mimeType);
const Medium askMedium(KFileMetaInfo &info);
- KIO::filesize_t m_total;
- KIO::filesize_t m_used;
- KIO::filesize_t m_free;
+ TDEIO::filesize_t m_total;
+ TDEIO::filesize_t m_used;
+ TDEIO::filesize_t m_free;
};
#endif
diff --git a/kioslave/media/kio_media.cpp b/kioslave/media/kio_media.cpp
index 113d1b311..d1647c6fc 100644
--- a/kioslave/media/kio_media.cpp
+++ b/kioslave/media/kio_media.cpp
@@ -76,7 +76,7 @@ bool MediaProtocol::rewriteURL(const KURL &url, KURL &newUrl)
if ( !m_impl.parseURL(url, name, path) )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return false;
}
@@ -100,7 +100,7 @@ void MediaProtocol::put(const KURL &url, int permissions,
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
+ error(TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, url.prettyURL());
}
else
{
@@ -145,7 +145,7 @@ void MediaProtocol::mkdir(const KURL &url, int permissions)
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_COULD_NOT_MKDIR, url.prettyURL());
+ error(TDEIO::ERR_COULD_NOT_MKDIR, url.prettyURL());
}
else
{
@@ -162,7 +162,7 @@ void MediaProtocol::del(const KURL &url, bool isFile)
if ( ok && path.isEmpty() )
{
- error(KIO::ERR_CANNOT_DELETE, url.prettyURL());
+ error(TDEIO::ERR_CANNOT_DELETE, url.prettyURL());
}
else
{
@@ -177,7 +177,7 @@ void MediaProtocol::stat(const KURL &url)
if( path.isEmpty() || path == "/" )
{
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
m_impl.createTopLevelEntry( entry );
statEntry( entry );
finished();
@@ -189,13 +189,13 @@ void MediaProtocol::stat(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
if( path.isEmpty() )
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if ( m_impl.statMedium(name, entry)
|| m_impl.statMediumByLabel(name, entry) )
@@ -205,7 +205,7 @@ void MediaProtocol::stat(const KURL &url)
}
else
{
- error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
}
else
@@ -229,7 +229,7 @@ void MediaProtocol::listDir(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
@@ -238,9 +238,9 @@ void MediaProtocol::listDir(const KURL &url)
void MediaProtocol::listRoot()
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
- KIO::UDSEntryList media_entries;
+ TDEIO::UDSEntryList media_entries;
bool ok = m_impl.listMedia(media_entries);
if (!ok)
@@ -254,8 +254,8 @@ void MediaProtocol::listRoot()
m_impl.createTopLevelEntry(entry);
listEntry(entry, false);
- KIO::UDSEntryListIterator it = media_entries.begin();
- KIO::UDSEntryListIterator end = media_entries.end();
+ TDEIO::UDSEntryListIterator it = media_entries.begin();
+ TDEIO::UDSEntryListIterator end = media_entries.end();
for(; it!=end; ++it)
{
diff --git a/kioslave/media/kio_media.h b/kioslave/media/kio_media.h
index 80da4a6cc..8a4cd86fb 100644
--- a/kioslave/media/kio_media.h
+++ b/kioslave/media/kio_media.h
@@ -24,7 +24,7 @@
#include "mediaimpl.h"
-class MediaProtocol : public KIO::ForwardingSlaveBase
+class MediaProtocol : public TDEIO::ForwardingSlaveBase
{
Q_OBJECT
public:
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp
index 031e56788..38d68725b 100644
--- a/kioslave/media/libmediacommon/medium.cpp
+++ b/kioslave/media/libmediacommon/medium.cpp
@@ -147,7 +147,7 @@ void Medium::setHidden(bool state)
void Medium::setUserLabel(const TQString &label)
{
- KConfig cfg("mediamanagerrc");
+ TDEConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
TQString entry_name = m_properties[UUID];
@@ -166,7 +166,7 @@ void Medium::setUserLabel(const TQString &label)
void Medium::loadUserLabel()
{
- KConfig cfg("mediamanagerrc");
+ TDEConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
TQString entry_name = m_properties[UUID];
diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp
index cc90e5ef7..254e591cb 100644
--- a/kioslave/media/libmediacommon/notifiersettings.cpp
+++ b/kioslave/media/libmediacommon/notifiersettings.cpp
@@ -227,7 +227,7 @@ void NotifierSettings::reload()
m_actions.append( nothing );
m_idMap[ nothing->id() ] = nothing;
- KConfig config( "medianotifierrc", true );
+ TDEConfig config( "medianotifierrc", true );
TQMap<TQString,TQString> auto_actions_map = config.entryMap( "Auto Actions" );
TQMap<TQString,TQString>::iterator auto_it = auto_actions_map.begin();
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index 8729c832d..8f132776b 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -75,7 +75,7 @@ bool MediaImpl::realURL(const TQString &name, const TQString &path, KURL &url)
}
-bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
+bool MediaImpl::statMedium(const TQString &name, TDEIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMedium: " << name << endl;
@@ -84,7 +84,7 @@ bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -102,7 +102,7 @@ bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
return true;
}
-bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
+bool MediaImpl::statMediumByLabel(const TQString &label, TDEIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMediumByLabel: " << label << endl;
@@ -111,7 +111,7 @@ bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -128,7 +128,7 @@ bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
}
-bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list)
+bool MediaImpl::listMedia(TQValueList<TDEIO::UDSEntry> &list)
{
kdDebug(1219) << "MediaImpl::listMedia" << endl;
@@ -137,14 +137,14 @@ bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
const Medium::MList media = Medium::createList(reply);
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
Medium::MList::const_iterator it = media.begin();
Medium::MList::const_iterator end = media.end();
@@ -173,7 +173,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -183,7 +183,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if (!returned_name.isEmpty()
&& returned_name!=name)
{
- m_lastErrorCode = KIO::ERR_DIR_ALREADY_EXIST;
+ m_lastErrorCode = TDEIO::ERR_DIR_ALREADY_EXIST;
m_lastErrorMessage = i18n("This media name already exists.");
return false;
}
@@ -193,7 +193,7 @@ bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
if ( !reply.isValid() )
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
return false;
}
@@ -214,7 +214,7 @@ const Medium MediaImpl::findMediumByName(const TQString &name, bool &ok)
}
else
{
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
m_lastErrorMessage = i18n("The TDE mediamanager is not running.");
ok = false;
}
@@ -226,7 +226,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
{
if (medium.id().isEmpty())
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("No such medium.");
return false;
}
@@ -234,7 +234,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
#ifdef COMPILE_HALBACKEND
if ( medium.isEncrypted() && medium.clearDeviceUdi().isEmpty() )
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("The drive is encrypted.");
return false;
}
@@ -248,14 +248,14 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
/*
- KIO::Job* job = KIO::mount(false, 0,
+ TDEIO::Job* job = TDEIO::mount(false, 0,
medium.deviceNode(),
medium.mountPoint());
job->setAutoWarningHandlingEnabled(false);
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- this, TQT_SLOT( slotMountResult( KIO::Job * ) ) );
- connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
- this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ this, TQT_SLOT( slotMountResult( TDEIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( warning( TDEIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( TDEIO::Job *, const TQString & ) ) );
*/
kapp->dcopClient()
->connectDCOPSignal("kded", "mediamanager",
@@ -271,7 +271,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
else
m_lastErrorMessage = i18n("Internal Error");
if (!m_lastErrorMessage.isEmpty())
- m_lastErrorCode = KIO::ERR_SLAVE_DEFINED;
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
else {
tqApp->eventLoop()->enterLoop();
}
@@ -289,7 +289,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
if (medium.id().isEmpty())
{
- m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("No such medium.");
return false;
}
@@ -297,12 +297,12 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return true;
}
-void MediaImpl::slotWarning( KIO::Job * /*job*/, const TQString &msg )
+void MediaImpl::slotWarning( TDEIO::Job * /*job*/, const TQString &msg )
{
emit warning( msg );
}
-void MediaImpl::slotMountResult(KIO::Job *job)
+void MediaImpl::slotMountResult(TDEIO::Job *job)
{
kdDebug(1219) << "MediaImpl::slotMountResult" << endl;
@@ -327,10 +327,10 @@ void MediaImpl::slotMediumChanged(const TQString &name)
}
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -338,55 +338,55 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void MediaImpl::createTopLevelEntry(KIO::UDSEntry& entry) const
+void MediaImpl::createTopLevelEntry(TDEIO::UDSEntry& entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_URL, 0, "media:/");
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "blockdevice");
+ addAtom(entry, TDEIO::UDS_URL, 0, "media:/");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "blockdevice");
}
-void MediaImpl::slotStatResult(KIO::Job *job)
+void MediaImpl::slotStatResult(TDEIO::Job *job)
{
if ( job->error() == 0)
{
- KIO::StatJob *stat_job = static_cast<KIO::StatJob *>(job);
+ TDEIO::StatJob *stat_job = static_cast<TDEIO::StatJob *>(job);
m_entryBuffer = stat_job->statResult();
}
tqApp->eventLoop()->exitLoop();
}
-KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
+TDEIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
{
m_entryBuffer.clear();
- KIO::StatJob *job = KIO::stat(url, false);
+ TDEIO::StatJob *job = TDEIO::stat(url, false);
job->setAutoWarningHandlingEnabled( false );
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( slotStatResult(KIO::Job *) ) );
- connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
- this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( slotStatResult(TDEIO::Job *) ) );
+ connect( job, TQT_SIGNAL( warning( TDEIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( TDEIO::Job *, const TQString & ) ) );
tqApp->eventLoop()->enterLoop();
- KIO::UDSEntry::iterator it = m_entryBuffer.begin();
- KIO::UDSEntry::iterator end = m_entryBuffer.end();
+ TDEIO::UDSEntry::iterator it = m_entryBuffer.begin();
+ TDEIO::UDSEntry::iterator end = m_entryBuffer.end();
- KIO::UDSEntry infos;
+ TDEIO::UDSEntry infos;
for(; it!=end; ++it)
{
switch( (*it).m_uds )
{
- case KIO::UDS_ACCESS:
- case KIO::UDS_USER:
- case KIO::UDS_GROUP:
- case KIO::UDS_CREATION_TIME:
- case KIO::UDS_MODIFICATION_TIME:
- case KIO::UDS_ACCESS_TIME:
+ case TDEIO::UDS_ACCESS:
+ case TDEIO::UDS_USER:
+ case TDEIO::UDS_GROUP:
+ case TDEIO::UDS_CREATION_TIME:
+ case TDEIO::UDS_MODIFICATION_TIME:
+ case TDEIO::UDS_ACCESS_TIME:
infos.append(*it);
break;
default:
@@ -396,14 +396,14 @@ KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
if (url.isLocalFile())
{
- addAtom(infos, KIO::UDS_LOCAL_PATH, 0, url.path());
+ addAtom(infos, TDEIO::UDS_LOCAL_PATH, 0, url.path());
}
return infos;
}
-void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
+void MediaImpl::createMediumEntry(TDEIO::UDSEntry& entry,
const Medium &medium)
{
kdDebug(1219) << "MediaProtocol::createMedium" << endl;
@@ -414,30 +414,30 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
entry.clear();
- addAtom(entry, KIO::UDS_URL, 0, url);
+ addAtom(entry, TDEIO::UDS_URL, 0, url);
- TQString label = KIO::encodeFileName( medium.prettyLabel() );
- addAtom(entry, KIO::UDS_NAME, 0, label);
+ TQString label = TDEIO::encodeFileName( medium.prettyLabel() );
+ addAtom(entry, TDEIO::UDS_NAME, 0, label);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, medium.mimeType());
- addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, medium.mimeType());
+ addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, "inode/directory");
if (!medium.iconName().isEmpty())
{
- addAtom(entry, KIO::UDS_ICON_NAME, 0, medium.iconName());
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, medium.iconName());
}
else
{
TQString mime = medium.mimeType();
TQString icon = KMimeType::mimeType(mime)->icon(mime, false);
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
}
if (medium.needMounting())
{
- addAtom(entry, KIO::UDS_ACCESS, 0400);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0400);
}
else
{
diff --git a/kioslave/media/mediaimpl.h b/kioslave/media/mediaimpl.h
index 92b1d0202..4675ee2f9 100644
--- a/kioslave/media/mediaimpl.h
+++ b/kioslave/media/mediaimpl.h
@@ -39,12 +39,12 @@ public:
bool parseURL(const KURL &url, TQString &name, TQString &path) const;
bool realURL(const TQString &name, const TQString &path, KURL &url);
- bool statMedium(const TQString &name, KIO::UDSEntry &entry);
- bool statMediumByLabel(const TQString &label, KIO::UDSEntry &entry);
- bool listMedia(TQValueList<KIO::UDSEntry> &list);
+ bool statMedium(const TQString &name, TDEIO::UDSEntry &entry);
+ bool statMediumByLabel(const TQString &label, TDEIO::UDSEntry &entry);
+ bool listMedia(TQValueList<TDEIO::UDSEntry> &list);
bool setUserLabel(const TQString &name, const TQString &label);
- void createTopLevelEntry(KIO::UDSEntry& entry) const;
+ void createTopLevelEntry(TDEIO::UDSEntry& entry) const;
int lastErrorCode() const { return m_lastErrorCode; }
TQString lastErrorMessage() const { return m_lastErrorMessage; }
@@ -56,18 +56,18 @@ signals:
void warning(const TQString &msg);
private slots:
- void slotWarning(KIO::Job *job, const TQString &msg);
- void slotMountResult(KIO::Job *job);
- void slotStatResult(KIO::Job *job);
+ void slotWarning(TDEIO::Job *job, const TQString &msg);
+ void slotMountResult(TDEIO::Job *job);
+ void slotStatResult(TDEIO::Job *job);
private:
const Medium findMediumByName(const TQString &name, bool &ok);
bool ensureMediumMounted(Medium &medium);
- KIO::UDSEntry extractUrlInfos(const KURL &url);
- KIO::UDSEntry m_entryBuffer;
+ TDEIO::UDSEntry extractUrlInfos(const KURL &url);
+ TDEIO::UDSEntry m_entryBuffer;
- void createMediumEntry(KIO::UDSEntry& entry,
+ void createMediumEntry(TDEIO::UDSEntry& entry,
const Medium &medium);
Medium *mp_mounting;
diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp
index 0ae99228e..b15e26683 100644
--- a/kioslave/media/mediamanager/fstabbackend.cpp
+++ b/kioslave/media/mediamanager/fstabbackend.cpp
@@ -102,8 +102,8 @@ TQString FstabBackend::mount( const TQString &_udi )
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
- KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint());
- KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::mount( false, 0, medium->deviceNode(), medium->mountPoint());
+ TDEIO::NetAccess::synchronousRun( job, 0 );
return TQString::null;
}
@@ -112,8 +112,8 @@ TQString FstabBackend::unmount( const TQString &_udi )
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
- KIO::Job* job = KIO::unmount( medium->mountPoint(), false);
- KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::unmount( medium->mountPoint(), false);
+ TDEIO::NetAccess::synchronousRun( job, 0 );
return TQString::null;
}
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index 9ebf0ade7..072c6cc3a 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/media/mediamanager/halbackend.cpp
@@ -927,7 +927,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
}
}
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
bool use_defaults = true;
if (config.hasGroup(name))
@@ -1097,7 +1097,7 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio
{
kdDebug() << "setMountoptions " << name << " " << options << endl;
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup(name);
TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options);
@@ -1368,7 +1368,7 @@ TQString HALBackend::killUsingProcesses(const Medium* medium)
}
}
-void HALBackend::slotResult(KIO::Job *job)
+void HALBackend::slotResult(TDEIO::Job *job)
{
kdDebug() << "slotResult " << mount_jobs[job] << endl;
@@ -1376,7 +1376,7 @@ void HALBackend::slotResult(KIO::Job *job)
TQString& qerror = data->errorMessage;
const Medium* medium = data->medium;
- if (job->error() == KIO::ERR_COULD_NOT_UNMOUNT) {
+ if (job->error() == TDEIO::ERR_COULD_NOT_UNMOUNT) {
TQString proclist(listUsingProcesses(medium));
qerror = "<qt>";
@@ -1443,9 +1443,9 @@ TQString HALBackend::mount(const Medium *medium)
data.medium = medium;
kdDebug() << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl;
- KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint );
- connect(job, TQT_SIGNAL( result (KIO::Job *)),
- TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::mount( false, 0, medium->deviceNode(), mountPoint );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)),
+ TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be mounted when the function
// completes. Thus block until the job completes.
@@ -1608,9 +1608,9 @@ TQString HALBackend::unmount(const TQString &_udi)
data.medium = medium;
kdDebug() << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl;
- KIO::Job *job = KIO::unmount( medium->mountPoint(), false );
- connect(job, TQT_SIGNAL( result (KIO::Job *)),
- TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::unmount( medium->mountPoint(), false );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)),
+ TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be unmounted when the function
// completes. Thus block until the job completes.
diff --git a/kioslave/media/mediamanager/halbackend.h b/kioslave/media/mediamanager/halbackend.h
index 18de7ea3c..8c8bbfce6 100644
--- a/kioslave/media/mediamanager/halbackend.h
+++ b/kioslave/media/mediamanager/halbackend.h
@@ -45,7 +45,7 @@
#include <libhal.h>
#include <libhal-storage.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -148,7 +148,7 @@ private:
static TQString killUsingProcesses(const Medium *medium);
private slots:
- void slotResult(KIO::Job *job);
+ void slotResult(TDEIO::Job *job);
/* Hal call-backs -- from gvm*/
public:
@@ -220,13 +220,13 @@ private:
const Medium* medium;
// [in,out] Should be set to true when the job completes
bool completed;
- // [out] KIO::Error if an error occured during operation. Otherwise, 0
+ // [out] TDEIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
TQString errorMessage;
};
- TQMap<KIO::Job *, struct mount_job_data*> mount_jobs;
+ TQMap<TDEIO::Job *, struct mount_job_data*> mount_jobs;
};
#endif /* _HALBACKEND_H_ */
diff --git a/kioslave/media/mediamanager/tdehardwarebackend.cpp b/kioslave/media/mediamanager/tdehardwarebackend.cpp
index 1086a3e77..65c6431cf 100644
--- a/kioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/kioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -728,7 +728,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name)
TQString drive_udi = driveUDIFromDeviceUID(medium->id());
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
bool use_defaults = true;
if (config.hasGroup(drive_udi)) {
@@ -893,7 +893,7 @@ bool TDEBackend::setMountoptions(const TQString &name, const TQStringList &optio
kdDebug(1219) << "setMountoptions " << name << " " << options << endl;
- KConfig config("mediamanagerrc");
+ TDEConfig config("mediamanagerrc");
config.setGroup(drive_udi);
TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options);
@@ -948,8 +948,8 @@ TQString TDEBackend::mount(const Medium *medium)
data.completed = false;
data.medium = medium;
- KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint );
- connect(job, TQT_SIGNAL( result (KIO::Job *)), TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::mount( false, 0, medium->deviceNode(), mountPoint );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)), TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be mounted when the function
// completes. Thus block until the job completes.
@@ -1148,8 +1148,8 @@ TQString TDEBackend::unmount(const TQString &_udi)
data.completed = false;
data.medium = medium;
- KIO::Job *job = KIO::unmount( medium->mountPoint(), false );
- connect(job, TQT_SIGNAL( result (KIO::Job *)), TQT_SLOT( slotResult( KIO::Job *)));
+ TDEIO::Job *job = TDEIO::unmount( medium->mountPoint(), false );
+ connect(job, TQT_SIGNAL( result (TDEIO::Job *)), TQT_SLOT( slotResult( TDEIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be unmounted when the function
// completes. Thus block until the job completes.
diff --git a/kioslave/media/mediamanager/tdehardwarebackend.h b/kioslave/media/mediamanager/tdehardwarebackend.h
index 190d06e41..9b5407d8f 100644
--- a/kioslave/media/mediamanager/tdehardwarebackend.h
+++ b/kioslave/media/mediamanager/tdehardwarebackend.h
@@ -36,7 +36,7 @@
#include <tdehardwaredevices.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -157,13 +157,13 @@ private:
const Medium* medium;
// [in,out] Should be set to true when the job completes
bool completed;
- // [out] KIO::Error if an error occured during operation. Otherwise, 0
+ // [out] TDEIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
TQString errorMessage;
};
- TQMap<KIO::Job *, struct mount_job_data*> mount_jobs;
+ TQMap<TDEIO::Job *, struct mount_job_data*> mount_jobs;
TQStringList m_ignoreDeviceChangeEvents;
};
diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp
index 94ee0e8c2..de6a56645 100644
--- a/kioslave/media/medianotifier/medianotifier.cpp
+++ b/kioslave/media/medianotifier/medianotifier.cpp
@@ -80,25 +80,25 @@ void MediaNotifier::onMediumChange( const TQString &name, bool allowNotification
KURL url( "system:/media/"+name );
- KIO::SimpleJob *job = KIO::stat( url, false );
+ TDEIO::SimpleJob *job = TDEIO::stat( url, false );
job->setInteractive( false );
m_allowNotificationMap[job] = allowNotification;
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( TDEIO::Job * ) ) );
}
-void MediaNotifier::slotStatResult( KIO::Job *job )
+void MediaNotifier::slotStatResult( TDEIO::Job *job )
{
bool allowNotification = m_allowNotificationMap[job];
m_allowNotificationMap.remove( job );
if ( job->error() != 0 ) return;
- KIO::StatJob *stat_job = static_cast<KIO::StatJob *>( job );
+ TDEIO::StatJob *stat_job = static_cast<TDEIO::StatJob *>( job );
- KIO::UDSEntry entry = stat_job->statResult();
+ TDEIO::UDSEntry entry = stat_job->statResult();
KURL url = stat_job->url();
KFileItem medium( entry, url );
diff --git a/kioslave/media/medianotifier/medianotifier.h b/kioslave/media/medianotifier/medianotifier.h
index 23f203f97..acbb23505 100644
--- a/kioslave/media/medianotifier/medianotifier.h
+++ b/kioslave/media/medianotifier/medianotifier.h
@@ -43,7 +43,7 @@ k_dcop:
void onMediumChange( const TQString &name, bool allowNotification );
private slots:
- void slotStatResult( KIO::Job *job );
+ void slotStatResult( TDEIO::Job *job );
void checkFreeDiskSpace();
void slotFreeFinished( KMessageBox::ButtonCode );
void slotFreeContinue();
@@ -58,7 +58,7 @@ private:
bool execAutoopen( const KFileItem &medium, const TQString &path,
const TQString &autoopenFile );
- TQMap<KIO::Job*,bool> m_allowNotificationMap;
+ TQMap<TDEIO::Job*,bool> m_allowNotificationMap;
TQTimer * m_freeTimer;
KDialogBase * m_freeDialog;
};
diff --git a/kioslave/media/medianotifier/notificationdialog.cpp b/kioslave/media/medianotifier/notificationdialog.cpp
index 7ba172601..29cf6b4f2 100644
--- a/kioslave/media/medianotifier/notificationdialog.cpp
+++ b/kioslave/media/medianotifier/notificationdialog.cpp
@@ -37,7 +37,7 @@ NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *sett
: KDialogBase( parent, name, false, i18n( "Medium Detected" ), Ok|Cancel|User1, Ok, true),
m_medium(medium), m_settings( settings )
{
- setCaption( KIO::decodeFileName(m_medium.name()) );
+ setCaption( TDEIO::decodeFileName(m_medium.name()) );
clearWState( WState_Polished );
TQWidget *page = new TQWidget( this );
diff --git a/kioslave/nfs/kio_nfs.cpp b/kioslave/nfs/kio_nfs.cpp
index b8ae1aa76..b28f3d61e 100644
--- a/kioslave/nfs/kio_nfs.cpp
+++ b/kioslave/nfs/kio_nfs.cpp
@@ -68,7 +68,7 @@
#define NFSPROG ((u_long)100003)
#define NFSVERS ((u_long)2)
-using namespace KIO;
+using namespace TDEIO;
using namespace std;
//this is taken from tdelibs/tdecore/fakes.cpp
@@ -144,23 +144,23 @@ static void createVirtualDirEntry(UDSEntry & entry)
{
UDSAtom atom;
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
atom.m_str = "root";
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
atom.m_str = "root";
entry.append( atom );
//a dummy size
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = 1024;
entry.append( atom );
}
@@ -468,9 +468,9 @@ void NFSProtocol::openConnection()
fh=fhStatus.fhstatus_u.fhs_fhandle;
TQString fname;
if ( exportlist->ex_dir[0] == '/' )
- fname = KIO::encodeFileName(exportlist->ex_dir + 1);
+ fname = TDEIO::encodeFileName(exportlist->ex_dir + 1);
else
- fname = KIO::encodeFileName(exportlist->ex_dir);
+ fname = TDEIO::encodeFileName(exportlist->ex_dir);
m_handleCache.insert(TQString("/")+fname,fh);
m_exportedDirs.append(fname);
// kdDebug() <<"appending file -"<<fname<<"- with FH: -"<<fhStatus.fhstatus_u.fhs_fhandle<<"-"<<endl;
@@ -534,7 +534,7 @@ void NFSProtocol::listDir( const KURL& _url)
{
UDSAtom atom;
entry.clear();
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = (*it);
kdDebug(7121)<<"listing "<<(*it)<<endl;
entry.append( atom );
@@ -599,7 +599,7 @@ void NFSProtocol::listDir( const KURL& _url)
entry.clear();
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = (*it);
entry.append( atom );
@@ -620,7 +620,7 @@ void NFSProtocol::listDir( const KURL& _url)
if (!checkForError(clnt_stat,readLinkRes.status,(*it))) return;
kdDebug(7121)<<"link dest is -"<<readLinkRes.readlinkres_u.data<<"-"<<endl;
TQCString linkDest(readLinkRes.readlinkres_u.data);
- atom.m_uds = KIO::UDS_LINK_DEST;
+ atom.m_uds = TDEIO::UDS_LINK_DEST;
atom.m_str = linkDest;
entry.append( atom );
@@ -675,7 +675,7 @@ void NFSProtocol::stat( const KURL & url)
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = path;
entry.append( atom );
createVirtualDirEntry(entry);
@@ -714,7 +714,7 @@ void NFSProtocol::stat( const KURL & url)
getLastPart(path, fileName, parentDir);
stripTrailingSlash(parentDir);
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = fileName;
entry.append( atom );
@@ -735,7 +735,7 @@ void NFSProtocol::stat( const KURL & url)
if (!checkForError(clnt_stat,readLinkRes.status,path)) return;
kdDebug(7121)<<"link dest is -"<<readLinkRes.readlinkres_u.data<<"-"<<endl;
TQCString linkDest(readLinkRes.readlinkres_u.data);
- atom.m_uds = KIO::UDS_LINK_DEST;
+ atom.m_uds = TDEIO::UDS_LINK_DEST;
atom.m_str = linkDest;
entry.append( atom );
@@ -782,23 +782,23 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString&
if ( ::stat( path.data(), &buff ) == -1 ) return;
UDSAtom atom;
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = buff.st_mode & S_IFMT; // extract file type
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = buff.st_mode & 07777; // extract permissions
entry.append( atom );
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = buff.st_size;
entry.append( atom );
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = buff.st_mtime;
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
uid_t uid = buff.st_uid;
TQString *temp = m_usercache.find( uid );
@@ -817,7 +817,7 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString&
atom.m_str = *temp;
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
gid_t gid = buff.st_gid;
temp = m_groupcache.find( gid );
if ( !temp )
@@ -835,11 +835,11 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString&
atom.m_str = *temp;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS_TIME;
+ atom.m_uds = TDEIO::UDS_ACCESS_TIME;
atom.m_long = buff.st_atime;
entry.append( atom );
- atom.m_uds = KIO::UDS_CREATION_TIME;
+ atom.m_uds = TDEIO::UDS_CREATION_TIME;
atom.m_long = buff.st_ctime;
entry.append( atom );
}
@@ -850,15 +850,15 @@ void NFSProtocol::completeBadLinkUDSEntry(UDSEntry& entry, fattr& attributes)
completeUDSEntry(entry,attributes);
UDSAtom atom;
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFMT - 1;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRWXU | S_IRWXG | S_IRWXO;
entry.append( atom );
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = 0L;
entry.append( atom );
}
@@ -867,31 +867,31 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
{
UDSAtom atom;
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = attributes.size;
entry.append(atom);
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = attributes.mtime.seconds;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS_TIME;
+ atom.m_uds = TDEIO::UDS_ACCESS_TIME;
atom.m_long = attributes.atime.seconds;
entry.append( atom );
- atom.m_uds = KIO::UDS_CREATION_TIME;
+ atom.m_uds = TDEIO::UDS_CREATION_TIME;
atom.m_long = attributes.ctime.seconds;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = (attributes.mode & 07777);
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long =attributes.mode & S_IFMT; // extract file type
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
uid_t uid = attributes.uid;
TQString *temp = m_usercache.find( uid );
if ( !temp )
@@ -909,7 +909,7 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
atom.m_str = *temp;
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
gid_t gid = attributes.gid;
temp = m_groupcache.find( gid );
if ( !temp )
@@ -927,32 +927,32 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
atom.m_str = *temp;
entry.append( atom );
-/* KIO::UDSEntry::ConstIterator it = entry.begin();
+/* TDEIO::UDSEntry::ConstIterator it = entry.begin();
for( ; it != entry.end(); it++ ) {
switch ((*it).m_uds) {
- case KIO::UDS_FILE_TYPE:
+ case TDEIO::UDS_FILE_TYPE:
kdDebug(7121) << "File Type : " << (mode_t)((*it).m_long) << endl;
break;
- case KIO::UDS_ACCESS:
+ case TDEIO::UDS_ACCESS:
kdDebug(7121) << "Access permissions : " << (mode_t)((*it).m_long) << endl;
break;
- case KIO::UDS_USER:
+ case TDEIO::UDS_USER:
kdDebug(7121) << "User : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_GROUP:
+ case TDEIO::UDS_GROUP:
kdDebug(7121) << "Group : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_NAME:
+ case TDEIO::UDS_NAME:
kdDebug(7121) << "Name : " << ((*it).m_str.ascii() ) << endl;
//m_strText = decodeFileName( (*it).m_str );
break;
- case KIO::UDS_URL:
+ case TDEIO::UDS_URL:
kdDebug(7121) << "URL : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_MIME_TYPE:
+ case TDEIO::UDS_MIME_TYPE:
kdDebug(7121) << "MimeType : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_LINK_DEST:
+ case TDEIO::UDS_LINK_DEST:
kdDebug(7121) << "LinkDest : " << ((*it).m_str.ascii() ) << endl;
break;
}
diff --git a/kioslave/nfs/kio_nfs.h b/kioslave/nfs/kio_nfs.h
index 9f6d38103..73b36e64d 100644
--- a/kioslave/nfs/kio_nfs.h
+++ b/kioslave/nfs/kio_nfs.h
@@ -58,7 +58,7 @@ class NFSFileHandle
typedef TQMap<TQString,NFSFileHandle> NFSFileHandleMap;
-class NFSProtocol : public KIO::SlaveBase
+class NFSProtocol : public TDEIO::SlaveBase
{
public:
NFSProtocol (const TQCString &pool, const TQCString &app );
@@ -80,12 +80,12 @@ class NFSProtocol : public KIO::SlaveBase
virtual void rename(const KURL &src, const KURL &dest, bool overwrite);
virtual void copy( const KURL& src, const KURL &dest, int mode, bool overwrite );
protected:
-// void createVirtualDirEntry(KIO::UDSEntry & entry);
+// void createVirtualDirEntry(TDEIO::UDSEntry & entry);
bool checkForError(int clientStat, int nfsStat, const TQString& text);
bool isExportedDir(const TQString& path);
- void completeUDSEntry(KIO::UDSEntry& entry, fattr& attributes);
- void completeBadLinkUDSEntry(KIO::UDSEntry& entry, fattr& attributes);
- void completeAbsoluteLinkUDSEntry(KIO::UDSEntry& entry, const TQCString& path);
+ void completeUDSEntry(TDEIO::UDSEntry& entry, fattr& attributes);
+ void completeBadLinkUDSEntry(TDEIO::UDSEntry& entry, fattr& attributes);
+ void completeAbsoluteLinkUDSEntry(TDEIO::UDSEntry& entry, const TQCString& path);
bool isValidLink(const TQString& parentDir, const TQString& linkDest);
// bool isAbsoluteLink(const TQString& path);
diff --git a/kioslave/nntp/nntp.cpp b/kioslave/nntp/nntp.cpp
index 1169415b8..b92ff6a30 100644
--- a/kioslave/nntp/nntp.cpp
+++ b/kioslave/nntp/nntp.cpp
@@ -33,7 +33,7 @@
#define WRN kdWarning(DBG_AREA)
#define FAT kdFatal(DBG_AREA)
-using namespace KIO;
+using namespace TDEIO;
extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
@@ -768,7 +768,7 @@ int NNTPProtocol::sendCommand( const TQString &cmd )
DBG << "auth needed, sending user info" << endl;
if ( mUser.isEmpty() || mPass.isEmpty() ) {
- KIO::AuthInfo authInfo;
+ TDEIO::AuthInfo authInfo;
authInfo.username = mUser;
authInfo.password = mPass;
if ( openPassDlg( authInfo ) ) {
@@ -842,7 +842,7 @@ int NNTPProtocol::evalResponse ( char *data, ssize_t &len )
}
/* not really necessary, because the slave has to
- use the KIO::Error's instead, but let this here for
+ use the TDEIO::Error's instead, but let this here for
documentation of the NNTP response codes and may
by later use.
TQString& NNTPProtocol::errorStr(int resp_code) {
diff --git a/kioslave/nntp/nntp.h b/kioslave/nntp/nntp.h
index 30368eee1..1d369b775 100644
--- a/kioslave/nntp/nntp.h
+++ b/kioslave/nntp/nntp.h
@@ -23,7 +23,7 @@
- remove unnecessary debug stuff
*/
-class NNTPProtocol:public KIO::TCPSlaveBase
+class NNTPProtocol:public TDEIO::TCPSlaveBase
{
public:
@@ -115,7 +115,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
*/
bool fetchGroupXOVER( unsigned long first, bool &notSupported );
/// creates an UDSEntry with file information used in stat and listDir
- void fillUDSEntry ( KIO::UDSEntry & entry, const TQString & name, long size,
+ void fillUDSEntry ( TDEIO::UDSEntry & entry, const TQString & name, long size,
bool postingAllowed, bool is_article );
/// error handling for unexpected responses
void unexpected_response ( int res_code, const TQString & command );
diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc
index f4a061521..e950f79c1 100644
--- a/kioslave/pop3/pop3.cc
+++ b/kioslave/pop3/pop3.cc
@@ -73,7 +73,7 @@ extern "C" {
int KDE_EXPORT kdemain(int argc, char **argv);
}
-using namespace KIO;
+using namespace TDEIO;
#ifdef HAVE_LIBSASL2
static sasl_callback_t callbacks[] = {
@@ -349,7 +349,7 @@ void POP3Protocol::closeConnection()
opened = false;
}
-int POP3Protocol::loginAPOP( char *challenge, KIO::AuthInfo &ai )
+int POP3Protocol::loginAPOP( char *challenge, TDEIO::AuthInfo &ai )
{
char buf[512];
@@ -457,7 +457,7 @@ bool POP3Protocol::saslInteract( void *in, AuthInfo &ai )
error(ERR_COULD_NOT_AUTHENTICATE, i18n("An error occured during authentication: %1").arg \
( TQString::fromUtf8( sasl_errdetail( conn ) ))); \
-int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
+int POP3Protocol::loginSASL( TDEIO::AuthInfo &ai )
{
#ifdef HAVE_LIBSASL2
char buf[512];
@@ -606,7 +606,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
#endif
}
-bool POP3Protocol::loginPASS( KIO::AuthInfo &ai )
+bool POP3Protocol::loginPASS( TDEIO::AuthInfo &ai )
{
char buf[512];
@@ -749,7 +749,7 @@ bool POP3Protocol::pop3_open()
return false;
}
- KIO::AuthInfo authInfo;
+ TDEIO::AuthInfo authInfo;
authInfo.username = m_sUser;
authInfo.password = m_sPass;
authInfo.prompt = i18n("Username and password for your POP3 account:");
@@ -1191,7 +1191,7 @@ void POP3Protocol::listDir(const KURL &)
atom.m_long = realGetSize(i + 1);
entry.append(atom);
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IWUSR;
entry.append (atom);
diff --git a/kioslave/pop3/pop3.h b/kioslave/pop3/pop3.h
index 9c6ca9185..60b23c3e8 100644
--- a/kioslave/pop3/pop3.h
+++ b/kioslave/pop3/pop3.h
@@ -39,7 +39,7 @@
#define MAX_PACKET_LEN 4096
-class POP3Protocol:public KIO::TCPSlaveBase {
+class POP3Protocol:public TDEIO::TCPSlaveBase {
public:
POP3Protocol(const TQCString & pool, const TQCString & app, bool SSL);
virtual ~ POP3Protocol();
@@ -107,17 +107,17 @@ protected:
/**
* Authenticate via APOP
*/
- int loginAPOP( char *challenge, KIO::AuthInfo &ai );
+ int loginAPOP( char *challenge, TDEIO::AuthInfo &ai );
- bool saslInteract( void *in, KIO::AuthInfo &ai );
+ bool saslInteract( void *in, TDEIO::AuthInfo &ai );
/**
* Authenticate via SASL
*/
- int loginSASL( KIO::AuthInfo &ai );
+ int loginSASL( TDEIO::AuthInfo &ai );
/**
* Authenticate via traditional USER/PASS
*/
- bool loginPASS( KIO::AuthInfo &ai );
+ bool loginPASS( TDEIO::AuthInfo &ai );
int m_cmd;
unsigned short int m_iOldPort;
diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp
index f4b71086d..87437700f 100644
--- a/kioslave/remote/kio_remote.cpp
+++ b/kioslave/remote/kio_remote.cpp
@@ -89,14 +89,14 @@ void RemoteProtocol::listDir(const KURL &url)
return;
}
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
}
void RemoteProtocol::listRoot()
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
- KIO::UDSEntryList remote_entries;
+ TDEIO::UDSEntryList remote_entries;
m_impl.listRoot(remote_entries);
totalSize(remote_entries.count()+2);
@@ -107,8 +107,8 @@ void RemoteProtocol::listRoot()
m_impl.createWizardEntry(entry);
listEntry(entry, false);
- KIO::UDSEntryListIterator it = remote_entries.begin();
- KIO::UDSEntryListIterator end = remote_entries.end();
+ TDEIO::UDSEntryListIterator it = remote_entries.begin();
+ TDEIO::UDSEntryListIterator end = remote_entries.end();
for(; it!=end; ++it)
{
@@ -129,7 +129,7 @@ void RemoteProtocol::stat(const KURL &url)
if ( path.isEmpty() || path == "/" )
{
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
m_impl.createTopLevelEntry( entry );
statEntry( entry );
finished();
@@ -138,7 +138,7 @@ void RemoteProtocol::stat(const KURL &url)
if (m_impl.isWizardURL(url))
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if (m_impl.createWizardEntry(entry))
{
statEntry(entry);
@@ -146,7 +146,7 @@ void RemoteProtocol::stat(const KURL &url)
}
else
{
- error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
return;
}
@@ -156,7 +156,7 @@ void RemoteProtocol::stat(const KURL &url)
if ( second_slash_idx==-1 || ( (int)url.path().length() )==second_slash_idx+1 )
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if (m_impl.statNetworkFolder(entry, root_dirname))
{
statEntry(entry);
@@ -177,7 +177,7 @@ void RemoteProtocol::stat(const KURL &url)
}
}
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
}
void RemoteProtocol::del(const KURL &url, bool /*isFile*/)
@@ -191,7 +191,7 @@ void RemoteProtocol::del(const KURL &url, bool /*isFile*/)
return;
}
- error(KIO::ERR_CANNOT_DELETE, url.prettyURL());
+ error(TDEIO::ERR_CANNOT_DELETE, url.prettyURL());
}
void RemoteProtocol::get(const KURL &url)
@@ -211,7 +211,7 @@ void RemoteProtocol::get(const KURL &url)
return;
}
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
}
void RemoteProtocol::rename(const KURL &src, const KURL &dest,
@@ -220,7 +220,7 @@ void RemoteProtocol::rename(const KURL &src, const KURL &dest,
if (src.protocol()!="remote" || dest.protocol()!="remote"
|| m_impl.isWizardURL(src) || m_impl.isWizardURL(dest))
{
- error(KIO::ERR_UNSUPPORTED_ACTION, src.prettyURL());
+ error(TDEIO::ERR_UNSUPPORTED_ACTION, src.prettyURL());
return;
}
@@ -230,5 +230,5 @@ void RemoteProtocol::rename(const KURL &src, const KURL &dest,
return;
}
- error(KIO::ERR_CANNOT_RENAME, src.prettyURL());
+ error(TDEIO::ERR_CANNOT_RENAME, src.prettyURL());
}
diff --git a/kioslave/remote/kio_remote.h b/kioslave/remote/kio_remote.h
index f2c06296a..77ac1d7cb 100644
--- a/kioslave/remote/kio_remote.h
+++ b/kioslave/remote/kio_remote.h
@@ -23,7 +23,7 @@
#include <kio/slavebase.h>
#include "remoteimpl.h"
-class RemoteProtocol : public KIO::SlaveBase
+class RemoteProtocol : public TDEIO::SlaveBase
{
public:
RemoteProtocol(const TQCString &protocol, const TQCString &pool,
diff --git a/kioslave/remote/remoteimpl.cpp b/kioslave/remote/remoteimpl.cpp
index fbc21bfec..2ca263768 100644
--- a/kioslave/remote/remoteimpl.cpp
+++ b/kioslave/remote/remoteimpl.cpp
@@ -49,7 +49,7 @@ RemoteImpl::RemoteImpl()
}
}
-void RemoteImpl::listRoot(TQValueList<KIO::UDSEntry> &list) const
+void RemoteImpl::listRoot(TQValueList<TDEIO::UDSEntry> &list) const
{
kdDebug(1220) << "RemoteImpl::listRoot" << endl;
@@ -67,7 +67,7 @@ void RemoteImpl::listRoot(TQValueList<KIO::UDSEntry> &list) const
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator name = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -102,7 +102,7 @@ bool RemoteImpl::findDirectory(const TQString &filename, TQString &directory) co
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator name = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -148,10 +148,10 @@ KURL RemoteImpl::findBaseURL(const TQString &filename) const
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -159,14 +159,14 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void RemoteImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
+void RemoteImpl::createTopLevelEntry(TDEIO::UDSEntry &entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "network");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "network");
}
static KURL findWizardRealURL()
@@ -184,7 +184,7 @@ static KURL findWizardRealURL()
return url;
}
-bool RemoteImpl::createWizardEntry(KIO::UDSEntry &entry) const
+bool RemoteImpl::createWizardEntry(TDEIO::UDSEntry &entry) const
{
entry.clear();
@@ -195,13 +195,13 @@ bool RemoteImpl::createWizardEntry(KIO::UDSEntry &entry) const
return false;
}
- addAtom(entry, KIO::UDS_NAME, 0, i18n("Add a Network Folder"));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_URL, 0, WIZARD_URL);
- addAtom(entry, KIO::UDS_LOCAL_PATH, 0, url.path());
- addAtom(entry, KIO::UDS_ACCESS, 0500);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "wizard");
+ addAtom(entry, TDEIO::UDS_NAME, 0, i18n("Add a Network Folder"));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_URL, 0, WIZARD_URL);
+ addAtom(entry, TDEIO::UDS_LOCAL_PATH, 0, url.path());
+ addAtom(entry, TDEIO::UDS_ACCESS, 0500);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "application/x-desktop");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "wizard");
return true;
}
@@ -212,7 +212,7 @@ bool RemoteImpl::isWizardURL(const KURL &url) const
}
-void RemoteImpl::createEntry(KIO::UDSEntry &entry,
+void RemoteImpl::createEntry(TDEIO::UDSEntry &entry,
const TQString &directory,
const TQString &file) const
{
@@ -227,19 +227,19 @@ void RemoteImpl::createEntry(KIO::UDSEntry &entry,
TQString new_filename = file;
new_filename.truncate( file.length()-8);
- addAtom(entry, KIO::UDS_NAME, 0, desktop.readName());
- addAtom(entry, KIO::UDS_URL, 0, "remote:/"+new_filename);
+ addAtom(entry, TDEIO::UDS_NAME, 0, desktop.readName());
+ addAtom(entry, TDEIO::UDS_URL, 0, "remote:/"+new_filename);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon = desktop.readIcon();
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
- addAtom(entry, KIO::UDS_LINK_DEST, 0, desktop.readURL());
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_LINK_DEST, 0, desktop.readURL());
}
-bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const
+bool RemoteImpl::statNetworkFolder(TDEIO::UDSEntry &entry, const TQString &filename) const
{
kdDebug(1220) << "RemoteImpl::statNetworkFolder: " << filename << endl;
diff --git a/kioslave/remote/remoteimpl.h b/kioslave/remote/remoteimpl.h
index b9bb6ac2d..ff16099dc 100644
--- a/kioslave/remote/remoteimpl.h
+++ b/kioslave/remote/remoteimpl.h
@@ -31,12 +31,12 @@ class RemoteImpl
public:
RemoteImpl();
- void createTopLevelEntry(KIO::UDSEntry &entry) const;
- bool createWizardEntry(KIO::UDSEntry &entry) const;
+ void createTopLevelEntry(TDEIO::UDSEntry &entry) const;
+ bool createWizardEntry(TDEIO::UDSEntry &entry) const;
bool isWizardURL(const KURL &url) const;
- bool statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const;
+ bool statNetworkFolder(TDEIO::UDSEntry &entry, const TQString &filename) const;
- void listRoot(TQValueList<KIO::UDSEntry> &list) const;
+ void listRoot(TQValueList<TDEIO::UDSEntry> &list) const;
KURL findBaseURL(const TQString &filename) const;
TQString findDesktopFile(const TQString &filename) const;
@@ -47,7 +47,7 @@ public:
private:
bool findDirectory(const TQString &filename, TQString &directory) const;
- void createEntry(KIO::UDSEntry& entry, const TQString &directory,
+ void createEntry(TDEIO::UDSEntry& entry, const TQString &directory,
const TQString &file) const;
};
diff --git a/kioslave/settings/kio_settings.cc b/kioslave/settings/kio_settings.cc
index 26e04d9e5..5622cb8aa 100644
--- a/kioslave/settings/kio_settings.cc
+++ b/kioslave/settings/kio_settings.cc
@@ -31,7 +31,7 @@
#include <kservicegroup.h>
#include <kstandarddirs.h>
-class SettingsProtocol : public KIO::SlaveBase
+class SettingsProtocol : public TDEIO::SlaveBase
{
public:
enum RunMode { SettingsMode, ProgramsMode, ApplicationsMode };
@@ -60,40 +60,40 @@ extern "C" {
}
-static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
+static void addAtom(TDEIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
entry.append(atom);
}
-static void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const TQString& iconName, const TQString& localPath)
+static void createFileEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const TQString& iconName, const TQString& localPath)
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, KIO::encodeFileName(name));
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG);
- addAtom(entry, KIO::UDS_URL, 0, url);
- addAtom(entry, KIO::UDS_ACCESS, 0500);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
- addAtom(entry, KIO::UDS_SIZE, 0);
- addAtom(entry, KIO::UDS_LOCAL_PATH, 0, localPath);
- addAtom(entry, KIO::UDS_CREATION_TIME, 1);
- addAtom(entry, KIO::UDS_MODIFICATION_TIME, time(0));
- addAtom(entry, KIO::UDS_ICON_NAME, 0, iconName);
+ addAtom(entry, TDEIO::UDS_NAME, 0, TDEIO::encodeFileName(name));
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ addAtom(entry, TDEIO::UDS_URL, 0, url);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0500);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime);
+ addAtom(entry, TDEIO::UDS_SIZE, 0);
+ addAtom(entry, TDEIO::UDS_LOCAL_PATH, 0, localPath);
+ addAtom(entry, TDEIO::UDS_CREATION_TIME, 1);
+ addAtom(entry, TDEIO::UDS_MODIFICATION_TIME, time(0));
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, iconName);
}
-static void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,const TQString& iconName)
+static void createDirEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,const TQString& iconName)
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, name);
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0500);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
- addAtom(entry, KIO::UDS_URL, 0, url);
- addAtom(entry, KIO::UDS_SIZE, 0);
- addAtom(entry, KIO::UDS_ICON_NAME, 0, iconName);
+ addAtom(entry, TDEIO::UDS_NAME, 0, name);
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0500);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime);
+ addAtom(entry, TDEIO::UDS_URL, 0, url);
+ addAtom(entry, TDEIO::UDS_SIZE, 0);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, iconName);
}
SettingsProtocol::SettingsProtocol( const TQCString &protocol, const TQCString &pool, const TQCString &app): SlaveBase( protocol, pool, app )
@@ -173,14 +173,14 @@ void SettingsProtocol::get( const KURL & url )
redirection(redirUrl);
finished();
} else {
- error( KIO::ERR_IS_DIRECTORY, url.prettyURL() );
+ error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL() );
}
}
void SettingsProtocol::stat(const KURL& url)
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQString servicePath( url.path(1) );
servicePath.remove(0, 1); // remove starting '/'
@@ -203,7 +203,7 @@ void SettingsProtocol::stat(const KURL& url)
createFileEntry(entry, service->name(), url.url(1)+service->desktopEntryName(),
"application/x-desktop", service->icon(), locate("apps", service->desktopEntryPath()) );
} else {
- error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown settings folder"));
+ error(TDEIO::ERR_SLAVE_DEFINED,i18n("Unknown settings folder"));
return;
}
}
@@ -227,13 +227,13 @@ void SettingsProtocol::listDir(const KURL& url)
if (!grp || !grp->isValid()) {
grp = findGroup(groupPath);
if (!grp || !grp->isValid()) {
- error(KIO::ERR_SLAVE_DEFINED,i18n("Unknown settings folder"));
+ error(TDEIO::ERR_SLAVE_DEFINED,i18n("Unknown settings folder"));
return;
}
}
unsigned int count = 0;
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
KServiceGroup::List list = grp->entries(true, true);
KServiceGroup::List::ConstIterator it;
diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
index ac747fa02..73f5bfc6d 100644
--- a/kioslave/sftp/kio_sftp.cpp
+++ b/kioslave/sftp/kio_sftp.cpp
@@ -74,7 +74,7 @@ So we can't connect.
#include "ksshprocess.h"
-using namespace KIO;
+using namespace TDEIO;
extern "C"
{
int KDE_EXPORT kdemain( int argc, char **argv )
@@ -234,7 +234,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
}
}
- KIO::filesize_t offset = 0;
+ TDEIO::filesize_t offset = 0;
TQCString dest_part ( dest_orig + ".part" );
int fd = -1;
@@ -295,7 +295,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
if ( info.code != 0 )
{
// Should we keep the partially downloaded file ??
- KIO::filesize_t size = config()->readNumEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE);
+ TDEIO::filesize_t size = config()->readNumEntry("MinimumKeepSize", DEFAULT_MINIMUM_KEEP_SIZE);
if (info.size < size)
::remove(dest_part.data());
@@ -324,7 +324,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
finished();
}
-sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t offset, int fd )
+sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, TDEIO::filesize_t offset, int fd )
{
int code;
sftpFileAttr attr(remoteEncoding());
@@ -347,7 +347,7 @@ sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t off
return res;
}
- KIO::filesize_t fileSize = attr.fileSize();
+ TDEIO::filesize_t fileSize = attr.fileSize();
TQ_UINT32 pflags = SSH2_FXF_READ;
attr.clear();
@@ -1103,22 +1103,22 @@ void sftpProtocol::stat ( const KURL& url ){
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = TQString::null;
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
atom.m_str = mUsername;
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
entry.append( atom );
// no size
@@ -1331,9 +1331,9 @@ void sftpProtocol::rename(const KURL& src, const KURL& dest, bool overwrite){
if (!overwrite)
{
if ( S_ISDIR(attr.permissions()) )
- error( KIO::ERR_DIR_ALREADY_EXIST, dest.url() );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.url() );
else
- error( KIO::ERR_FILE_ALREADY_EXIST, dest.url() );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.url() );
return;
}
@@ -2184,7 +2184,7 @@ int sftpProtocol::sftpOpen(const KURL& url, const TQ_UINT32 pflags,
}
-int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data)
+int sftpProtocol::sftpRead(const TQByteArray& handle, TDEIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data)
{
// kdDebug(KIO_SFTP_DB) << "sftpRead( offset = " << offset << ", len = " << len << ")" << endl;
TQByteArray p;
@@ -2231,7 +2231,7 @@ int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, TQ
}
-int sftpProtocol::sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, const TQByteArray& data){
+int sftpProtocol::sftpWrite(const TQByteArray& handle, TDEIO::filesize_t offset, const TQByteArray& data){
// kdDebug(KIO_SFTP_DB) << "sftpWrite( offset = " << offset <<
// ", data sz = " << data.size() << ")" << endl;
TQByteArray p;
diff --git a/kioslave/sftp/kio_sftp.h b/kioslave/sftp/kio_sftp.h
index 951d3e46e..e9120452b 100644
--- a/kioslave/sftp/kio_sftp.h
+++ b/kioslave/sftp/kio_sftp.h
@@ -33,7 +33,7 @@
#define KIO_SFTP_DB 7120
-class sftpProtocol : public KIO::SlaveBase
+class sftpProtocol : public TDEIO::SlaveBase
{
public:
@@ -86,7 +86,7 @@ private: // Private variables
struct Status
{
int code;
- KIO::filesize_t size;
+ TDEIO::filesize_t size;
TQString text;
};
@@ -133,9 +133,9 @@ private: // private methods
/** No descriptions */
int sftpOpen(const KURL& url, const TQ_UINT32 pflags, const sftpFileAttr& attr, TQByteArray& handle);
/** No descriptions */
- int sftpRead(const TQByteArray& handle, KIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data);
+ int sftpRead(const TQByteArray& handle, TDEIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data);
/** No descriptions */
- int sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, const TQByteArray& data);
+ int sftpWrite(const TQByteArray& handle, TDEIO::filesize_t offset, const TQByteArray& data);
/** Performs faster upload when the source is a local file... */
void sftpCopyPut(const KURL& src, const KURL& dest, int mode, bool overwrite);
@@ -143,7 +143,7 @@ private: // private methods
void sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool overwrite);
/** */
- Status sftpGet( const KURL& src, KIO::filesize_t offset = 0, int fd = -1);
+ Status sftpGet( const KURL& src, TDEIO::filesize_t offset = 0, int fd = -1);
void sftpPut( const KURL& dest, int permissions, bool resume, bool overwrite, int fd = -1);
};
#endif
diff --git a/kioslave/sftp/sftpfileattr.cpp b/kioslave/sftp/sftpfileattr.cpp
index 1ebb43f5f..95a82677f 100644
--- a/kioslave/sftp/sftpfileattr.cpp
+++ b/kioslave/sftp/sftpfileattr.cpp
@@ -27,7 +27,7 @@
#include <kio/global.h>
#include <kremoteencoding.h>
-using namespace KIO;
+using namespace TDEIO;
sftpFileAttr::sftpFileAttr(){
clear();
diff --git a/kioslave/sftp/sftpfileattr.h b/kioslave/sftp/sftpfileattr.h
index f0bca2527..543153b5e 100644
--- a/kioslave/sftp/sftpfileattr.h
+++ b/kioslave/sftp/sftpfileattr.h
@@ -222,7 +222,7 @@ public:
/** Returns a UDSEntry describing the file.
The UDSEntry is generated from the sftp file attributes. */
- KIO::UDSEntry entry();
+ TDEIO::UDSEntry entry();
/** Use to output the file attributes to a sftp packet
This will only write the sftp ATTR structure to the stream.
diff --git a/kioslave/smb/kio_smb.h b/kioslave/smb/kio_smb.h
index c7c316478..d111c7646 100644
--- a/kioslave/smb/kio_smb.h
+++ b/kioslave/smb/kio_smb.h
@@ -86,13 +86,13 @@ extern "C"
#define MAX_XFER_BUF_SIZE 16348
#define KIO_SMB 7106
-using namespace KIO;
+using namespace TDEIO;
class TDEProcess;
//===========================================================================
-class SMBSlave : public TQObject, public KIO::SlaveBase
+class SMBSlave : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp
index d4a48239f..b03e77420 100644
--- a/kioslave/smb/kio_smb_auth.cpp
+++ b/kioslave/smb/kio_smb_auth.cpp
@@ -76,7 +76,7 @@ void SMBSlave::auth_smbc_get_data(const char *server,const char *share,
password[pwmaxlen - 1] = 0;
TQString s_password = TQString::fromUtf8(password);
- KIO::AuthInfo info;
+ TDEIO::AuthInfo info;
info.url = KURL("smb:///");
info.url.setHost(s_server);
info.url.setPath("/" + s_share);
@@ -113,7 +113,7 @@ bool SMBSlave::checkPassword(SMBUrl &url)
{
kdDebug(KIO_SMB) << "checkPassword for " << url << endl;
- KIO::AuthInfo info;
+ TDEIO::AuthInfo info;
info.url = KURL("smb:///");
info.url.setHost(url.host());
diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp
index e9a216fd3..b8f237653 100644
--- a/kioslave/smb/kio_smb_browse.cpp
+++ b/kioslave/smb/kio_smb_browse.cpp
@@ -41,13 +41,13 @@
#include "kio_smb.h"
#include "kio_smb_internal.h"
-using namespace KIO;
+using namespace TDEIO;
int SMBSlave::cache_stat(const SMBUrl &url, struct stat* st )
{
int result = smbc_stat( url.toSmbcUrl(), st);
kdDebug(KIO_SMB) << "smbc_stat " << url << " " << errno << " " << result << endl;
- kdDebug(KIO_SMB) << "size " << (KIO::filesize_t)st->st_size << endl;
+ kdDebug(KIO_SMB) << "size " << (TDEIO::filesize_t)st->st_size << endl;
return result;
}
@@ -69,15 +69,15 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign
return false;
}
- udsatom.m_uds = KIO::UDS_FILE_TYPE;
+ udsatom.m_uds = TDEIO::UDS_FILE_TYPE;
udsatom.m_long = st.st_mode & S_IFMT;
udsentry.append(udsatom);
- udsatom.m_uds = KIO::UDS_SIZE;
+ udsatom.m_uds = TDEIO::UDS_SIZE;
udsatom.m_long = st.st_size;
udsentry.append(udsatom);
- udsatom.m_uds = KIO::UDS_USER;
+ udsatom.m_uds = TDEIO::UDS_USER;
uid_t uid = st.st_uid;
struct passwd *user = getpwuid( uid );
if ( user )
@@ -86,7 +86,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign
udsatom.m_str = TQString::number( uid );
udsentry.append(udsatom);
- udsatom.m_uds = KIO::UDS_GROUP;
+ udsatom.m_uds = TDEIO::UDS_GROUP;
gid_t gid = st.st_gid;
struct group *grp = getgrgid( gid );
if ( grp )
@@ -95,7 +95,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign
udsatom.m_str = TQString::number( gid );
udsentry.append(udsatom);
- udsatom.m_uds = KIO::UDS_ACCESS;
+ udsatom.m_uds = TDEIO::UDS_ACCESS;
udsatom.m_long = st.st_mode & 07777;
udsentry.append(udsatom);
@@ -153,7 +153,7 @@ void SMBSlave::stat( const KURL& kurl )
UDSAtom udsatom;
UDSEntry udsentry;
// Set name
- udsatom.m_uds = KIO::UDS_NAME;
+ udsatom.m_uds = TDEIO::UDS_NAME;
udsatom.m_str = kurl.fileName();
udsentry.append( udsatom );
@@ -166,7 +166,7 @@ void SMBSlave::stat( const KURL& kurl )
case SMBURLTYPE_ENTIRE_NETWORK:
case SMBURLTYPE_WORKGROUP_OR_SERVER:
- udsatom.m_uds = KIO::UDS_FILE_TYPE;
+ udsatom.m_uds = TDEIO::UDS_FILE_TYPE;
udsatom.m_long = S_IFDIR;
udsentry.append(udsatom);
break;
@@ -342,7 +342,7 @@ void SMBSlave::listDir( const KURL& kurl )
break;
// Set name
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
TQString dirpName = TQString::fromUtf8( dirp->name );
// We cannot trust dirp->commentlen has it might be with or without the NUL character
// See KDE bug #111430 and Samba bug #3030
@@ -387,17 +387,17 @@ void SMBSlave::listDir( const KURL& kurl )
dirp->smbc_type == SMBC_FILE_SHARE)
{
// Set type
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
udsentry.append( atom );
// Set permissions
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = (S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH);
udsentry.append(atom);
if (dirp->smbc_type == SMBC_SERVER) {
- atom.m_uds = KIO::UDS_URL;
+ atom.m_uds = TDEIO::UDS_URL;
// TQString workgroup = m_current_url.host().upper();
KURL u("smb:/");
u.setHost(dirpName);
@@ -408,7 +408,7 @@ void SMBSlave::listDir( const KURL& kurl )
kdDebug(KIO_SMB) << "list item " << atom.m_str << endl;
udsentry.append(atom);
- atom.m_uds = KIO::UDS_MIME_TYPE;
+ atom.m_uds = TDEIO::UDS_MIME_TYPE;
atom.m_str = TQString::fromLatin1("application/x-smb-server");
udsentry.append(atom);
}
@@ -419,20 +419,20 @@ void SMBSlave::listDir( const KURL& kurl )
else if(dirp->smbc_type == SMBC_WORKGROUP)
{
// Set type
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
udsentry.append( atom );
// Set permissions
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = (S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH);
udsentry.append(atom);
- atom.m_uds = KIO::UDS_MIME_TYPE;
+ atom.m_uds = TDEIO::UDS_MIME_TYPE;
atom.m_str = TQString::fromLatin1("application/x-smb-workgroup");
udsentry.append(atom);
- atom.m_uds = KIO::UDS_URL;
+ atom.m_uds = TDEIO::UDS_URL;
// TQString workgroup = m_current_url.host().upper();
KURL u("smb:/");
u.setHost(dirpName);
diff --git a/kioslave/smb/kio_smb_config.cpp b/kioslave/smb/kio_smb_config.cpp
index 101ba160d..123462772 100644
--- a/kioslave/smb/kio_smb_config.cpp
+++ b/kioslave/smb/kio_smb_config.cpp
@@ -37,7 +37,7 @@
//===========================================================================
void SMBSlave::reparseConfiguration()
{
- KConfig *cfg = new KConfig("kioslaverc", true);
+ TDEConfig *cfg = new TDEConfig("kioslaverc", true);
cfg->setGroup("Browser Settings/SMBro");
m_default_user=cfg->readEntry("User");
// m_default_workgroup=cfg->readEntry("Workgroup");
diff --git a/kioslave/smb/kio_smb_dir.cpp b/kioslave/smb/kio_smb_dir.cpp
index 936ec15af..54c3b6cfb 100644
--- a/kioslave/smb/kio_smb_dir.cpp
+++ b/kioslave/smb/kio_smb_dir.cpp
@@ -48,7 +48,7 @@ void SMBSlave::copy( const KURL& ksrc,
int dstflags;
int srcfd = -1;
int dstfd = -1;
- KIO::filesize_t processed_size = 0;
+ TDEIO::filesize_t processed_size = 0;
unsigned char buf[MAX_XFER_BUF_SIZE];
kdDebug(KIO_SMB) << "SMBSlave::copy with src = " << ksrc << "and dest = " << kdst << endl;
@@ -62,17 +62,17 @@ void SMBSlave::copy( const KURL& ksrc,
{
if ( errno == EACCES )
{
- error( KIO::ERR_ACCESS_DENIED, src.prettyURL());
+ error( TDEIO::ERR_ACCESS_DENIED, src.prettyURL());
}
else
{
- error( KIO::ERR_DOES_NOT_EXIST, src.prettyURL());
+ error( TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL());
}
return;
}
if ( S_ISDIR( st.st_mode ) )
{
- error( KIO::ERR_IS_DIRECTORY, src.prettyURL() );
+ error( TDEIO::ERR_IS_DIRECTORY, src.prettyURL() );
return;
}
totalSize(st.st_size);
@@ -82,12 +82,12 @@ void SMBSlave::copy( const KURL& ksrc,
{
if(S_ISDIR(st.st_mode))
{
- error( KIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL());
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL());
return;
}
if(!overwrite)
{
- error( KIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL());
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL());
return;
}
}
@@ -98,11 +98,11 @@ void SMBSlave::copy( const KURL& ksrc,
{
if(errno == EACCES)
{
- error( KIO::ERR_ACCESS_DENIED, src.prettyURL() );
+ error( TDEIO::ERR_ACCESS_DENIED, src.prettyURL() );
}
else
{
- error( KIO::ERR_DOES_NOT_EXIST, src.prettyURL() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL() );
}
return;
}
@@ -129,11 +129,11 @@ void SMBSlave::copy( const KURL& ksrc,
{
if(errno == EACCES)
{
- error(KIO::ERR_WRITE_ACCESS_DENIED, dst.prettyURL());
+ error(TDEIO::ERR_WRITE_ACCESS_DENIED, dst.prettyURL());
}
else
{
- error(KIO::ERR_CANNOT_OPEN_FOR_READING, dst.prettyURL());
+ error(TDEIO::ERR_CANNOT_OPEN_FOR_READING, dst.prettyURL());
}
if(srcfd >= 0 )
{
@@ -152,8 +152,8 @@ void SMBSlave::copy( const KURL& ksrc,
n = smbc_write(dstfd, buf, n);
if(n == -1)
{
- kdDebug(KIO_SMB) << "SMBSlave::copy copy now KIO::ERR_COULD_NOT_WRITE" << endl;
- error( KIO::ERR_COULD_NOT_WRITE, dst.prettyURL());
+ kdDebug(KIO_SMB) << "SMBSlave::copy copy now TDEIO::ERR_COULD_NOT_WRITE" << endl;
+ error( TDEIO::ERR_COULD_NOT_WRITE, dst.prettyURL());
break;
}
@@ -166,7 +166,7 @@ void SMBSlave::copy( const KURL& ksrc,
}
else
{
- error( KIO::ERR_COULD_NOT_READ, src.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_READ, src.prettyURL());
break;
}
}
@@ -188,7 +188,7 @@ void SMBSlave::copy( const KURL& ksrc,
}
else
{
- error( KIO::ERR_COULD_NOT_WRITE, dst.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_WRITE, dst.prettyURL());
return;
}
}
@@ -211,7 +211,7 @@ void SMBSlave::del( const KURL &kurl, bool isfile)
switch(errno)
{
case EISDIR:
- error( KIO::ERR_IS_DIRECTORY, m_current_url.prettyURL());
+ error( TDEIO::ERR_IS_DIRECTORY, m_current_url.prettyURL());
break;
default:
reportError(kurl);
@@ -244,12 +244,12 @@ void SMBSlave::mkdir( const KURL &kurl, int permissions )
{
if(S_ISDIR(st.st_mode ))
{
- error( KIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL());
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL());
}
}
else
{
- error( KIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL());
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL());
}
} else
reportError(kurl);
@@ -287,15 +287,15 @@ void SMBSlave::rename( const KURL& ksrc, const KURL& kdest, bool overwrite )
{
if(S_ISDIR(st.st_mode))
{
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_DIR_ALREADY_EXIST" << endl;
- error( KIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL());
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_DIR_ALREADY_EXIST" << endl;
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL());
finished();
return;
}
if(!overwrite)
{
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_FILE_ALREADY_EXIST" << endl;
- error( KIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL());
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_FILE_ALREADY_EXIST" << endl;
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL());
finished();
return;
}
@@ -311,26 +311,26 @@ void SMBSlave::rename( const KURL& ksrc, const KURL& kdest, bool overwrite )
{
if(errno == EACCES)
{
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_ACCESS_DENIED" << endl;
- error(KIO::ERR_ACCESS_DENIED, src.prettyURL());
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_ACCESS_DENIED" << endl;
+ error(TDEIO::ERR_ACCESS_DENIED, src.prettyURL());
}
else
{
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_DOES_NOT_EXIST" << endl;
- error(KIO::ERR_DOES_NOT_EXIST, src.prettyURL());
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_DOES_NOT_EXIST" << endl;
+ error(TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL());
}
}
break;
case EACCES:
case EPERM:
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_ACCESS_DENIED" << endl;
- error( KIO::ERR_ACCESS_DENIED, dst.prettyURL() );
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_ACCESS_DENIED" << endl;
+ error( TDEIO::ERR_ACCESS_DENIED, dst.prettyURL() );
break;
default:
- kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_CANNOT_RENAME" << endl;
- error( KIO::ERR_CANNOT_RENAME, src.prettyURL() );
+ kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_CANNOT_RENAME" << endl;
+ error( TDEIO::ERR_CANNOT_RENAME, src.prettyURL() );
}
diff --git a/kioslave/smb/kio_smb_file.cpp b/kioslave/smb/kio_smb_file.cpp
index 8c7867722..25137c8ce 100644
--- a/kioslave/smb/kio_smb_file.cpp
+++ b/kioslave/smb/kio_smb_file.cpp
@@ -44,7 +44,7 @@ void SMBSlave::get( const KURL& kurl )
// time_t curtime = 0;
time_t lasttime = 0;
time_t starttime = 0;
- KIO::filesize_t totalbytesread = 0;
+ TDEIO::filesize_t totalbytesread = 0;
TQByteArray filedata;
SMBUrl url;
@@ -68,13 +68,13 @@ void SMBSlave::get( const KURL& kurl )
if(cache_stat(url,&st) == -1 )
{
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, url.prettyURL());
+ error( TDEIO::ERR_ACCESS_DENIED, url.prettyURL());
else
- error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
return;
}
if ( S_ISDIR( st.st_mode ) ) {
- error( KIO::ERR_IS_DIRECTORY, url.prettyURL());
+ error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL());
return;
}
@@ -99,7 +99,7 @@ void SMBSlave::get( const KURL& kurl )
}
else if(bytesread < 0)
{
- error( KIO::ERR_COULD_NOT_READ, url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_READ, url.prettyURL());
return;
}
@@ -133,12 +133,12 @@ void SMBSlave::get( const KURL& kurl )
smbc_close(filefd);
data( TQByteArray() );
- processedSize(static_cast<KIO::filesize_t>(st.st_size));
+ processedSize(static_cast<TDEIO::filesize_t>(st.st_size));
}
else
{
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL());
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL());
return;
}
@@ -172,12 +172,12 @@ void SMBSlave::put( const KURL& kurl,
if (S_ISDIR(st.st_mode))
{
kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" already isdir !!"<< endl;
- error( KIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL());
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL());
}
else
{
kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" already exist !!"<< endl;
- error( KIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL());
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL());
}
return;
}
@@ -216,12 +216,12 @@ void SMBSlave::put( const KURL& kurl,
if ( errno == EACCES )
{
kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" access denied !!"<< endl;
- error( KIO::ERR_WRITE_ACCESS_DENIED, m_current_url.prettyURL());
+ error( TDEIO::ERR_WRITE_ACCESS_DENIED, m_current_url.prettyURL());
}
else
{
kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" can not open for writing !!"<< endl;
- error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, m_current_url.prettyURL());
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, m_current_url.prettyURL());
}
finished();
return;
@@ -246,7 +246,7 @@ void SMBSlave::put( const KURL& kurl,
if ( size < 0)
{
kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" could not write !!"<< endl;
- error( KIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL());
finished();
return;
}
@@ -257,7 +257,7 @@ void SMBSlave::put( const KURL& kurl,
if(smbc_close(filefd))
{
kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" could not write !!"<< endl;
- error( KIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL());
+ error( TDEIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL());
finished();
return;
}
diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp
index 5466ee06a..ad421f631 100644
--- a/kioslave/smb/kio_smb_mount.cpp
+++ b/kioslave/smb/kio_smb_mount.cpp
@@ -65,7 +65,7 @@ void SMBSlave::special( const TQByteArray & data)
if (tmp==3) {
if (!KStandardDirs::makeDir(mountPoint)) {
- error(KIO::ERR_COULD_NOT_MKDIR, mountPoint);
+ error(TDEIO::ERR_COULD_NOT_MKDIR, mountPoint);
return;
}
}
@@ -121,7 +121,7 @@ void SMBSlave::special( const TQByteArray & data)
if (!proc.start( TDEProcess::Block, TDEProcess::AllOutput ))
{
- error(KIO::ERR_CANNOT_LAUNCH_PROCESS,
+ error(TDEIO::ERR_CANNOT_LAUNCH_PROCESS,
"smbmount"+i18n("\nMake sure that the samba package is installed properly on your system."));
return;
}
@@ -131,7 +131,7 @@ void SMBSlave::special( const TQByteArray & data)
if (proc.exitStatus() != 0)
{
- error( KIO::ERR_COULD_NOT_MOUNT,
+ error( TDEIO::ERR_COULD_NOT_MOUNT,
i18n("Mounting of share \"%1\" from host \"%2\" by user \"%3\" failed.\n%4")
.arg(share).arg(host).arg(user).arg(mybuf + "\n" + mystderr));
return;
@@ -162,7 +162,7 @@ void SMBSlave::special( const TQByteArray & data)
if ( !proc.start( TDEProcess::Block, TDEProcess::AllOutput ) )
{
- error(KIO::ERR_CANNOT_LAUNCH_PROCESS,
+ error(TDEIO::ERR_CANNOT_LAUNCH_PROCESS,
"smbumount"+i18n("\nMake sure that the samba package is installed properly on your system."));
return;
}
@@ -172,7 +172,7 @@ void SMBSlave::special( const TQByteArray & data)
if (proc.exitStatus() != 0)
{
- error(KIO::ERR_COULD_NOT_UNMOUNT,
+ error(TDEIO::ERR_COULD_NOT_UNMOUNT,
i18n("Unmounting of mountpoint \"%1\" failed.\n%2")
.arg(mountPoint).arg(mybuf + "\n" + mystderr));
return;
@@ -194,7 +194,7 @@ void SMBSlave::special( const TQByteArray & data)
if ( !ok )
{
- error(KIO::ERR_COULD_NOT_RMDIR, mountPoint);
+ error(TDEIO::ERR_COULD_NOT_RMDIR, mountPoint);
return;
}
}
diff --git a/kioslave/smtp/command.cc b/kioslave/smtp/command.cc
index 2771baf82..2971c291a 100644
--- a/kioslave/smtp/command.cc
+++ b/kioslave/smtp/command.cc
@@ -134,7 +134,7 @@ static sasl_callback_t callbacks[] = {
// "command not {recognized,implemented}" response:
if ( r.code() == 500 || r.code() == 502 ) {
if ( mEHLONotSupported ) { // HELO failed...
- mSMTP->error( KIO::ERR_INTERNAL_SERVER,
+ mSMTP->error( TDEIO::ERR_INTERNAL_SERVER,
i18n("The server rejected both EHLO and HELO commands "
"as unknown or unimplemented.\n"
"Please contact the server's system administrator.") );
@@ -148,7 +148,7 @@ static sasl_callback_t callbacks[] = {
parseFeatures( r );
return true;
}
- mSMTP->error( KIO::ERR_UNKNOWN,
+ mSMTP->error( TDEIO::ERR_UNKNOWN,
i18n("Unexpected server response to %1 command.\n%2")
.arg( mEHLONotSupported ? "HELO" : "EHLO" )
.arg( r.errorMessage() ) );
@@ -182,7 +182,7 @@ static sasl_callback_t callbacks[] = {
if ( tlsrc != -3 )
//kdDebug(7112) << "TLS negotiation failed!" << endl;
- mSMTP->messageBox(KIO::SlaveBase::Information,
+ mSMTP->messageBox(TDEIO::SlaveBase::Information,
i18n("Your SMTP server claims to "
"support TLS, but negotiation "
"was unsuccessful.\nYou can "
@@ -193,7 +193,7 @@ static sasl_callback_t callbacks[] = {
}
-#define SASLERROR mSMTP->error(KIO::ERR_COULD_NOT_AUTHENTICATE, \
+#define SASLERROR mSMTP->error(TDEIO::ERR_COULD_NOT_AUTHENTICATE, \
i18n("An error occured during authentication: %1").arg \
( TQString::fromUtf8( sasl_errdetail( conn ) )));
@@ -203,7 +203,7 @@ static sasl_callback_t callbacks[] = {
AuthCommand::AuthCommand( SMTPProtocol * smtp,
const char *mechanisms,
const TQString &aFQDN,
- KIO::AuthInfo &ai )
+ TDEIO::AuthInfo &ai )
: Command( smtp, CloseConnectionOnError|OnlyLastInPipeline ),
mAi( &ai ),
mFirstTime( true )
@@ -238,7 +238,7 @@ static sasl_callback_t callbacks[] = {
if ( result == SASL_OK ) mOneStep = true;
kdDebug(7112) << "Mechanism: " << mMechusing << " one step: " << mOneStep << endl;
#else
- mSMTP->error(KIO::ERR_COULD_NOT_AUTHENTICATE,
+ mSMTP->error(TDEIO::ERR_COULD_NOT_AUTHENTICATE,
i18n("Authentication support is not compiled into kio_smtp."));
#endif
}
@@ -268,7 +268,7 @@ static sasl_callback_t callbacks[] = {
if ( mAi->username.isEmpty() || mAi->password.isEmpty()) {
if (!mSMTP->openPassDlg(*mAi)) {
- mSMTP->error(KIO::ERR_ABORTED, i18n("No authentication details supplied."));
+ mSMTP->error(TDEIO::ERR_ABORTED, i18n("No authentication details supplied."));
return false;
}
}
@@ -370,15 +370,15 @@ static sasl_callback_t callbacks[] = {
if ( !r.isOk() ) {
if ( mFirstTime )
if ( haveCapability( "AUTH" ) )
- mSMTP->error( KIO::ERR_COULD_NOT_LOGIN,
+ mSMTP->error( TDEIO::ERR_COULD_NOT_LOGIN,
i18n("Your SMTP server does not support %1.\nChoose a different authentication method.\n%2")
.arg( mMechusing ).arg( r.errorMessage() ) );
else
- mSMTP->error( KIO::ERR_COULD_NOT_LOGIN,
+ mSMTP->error( TDEIO::ERR_COULD_NOT_LOGIN,
i18n("Your SMTP server does not support authentication.\n"
" %2").arg( r.errorMessage() ) );
else
- mSMTP->error( KIO::ERR_COULD_NOT_LOGIN,
+ mSMTP->error( TDEIO::ERR_COULD_NOT_LOGIN,
i18n("Authentication failed.\n"
"Most likely the password is wrong.\n"
"%1").arg( r.errorMessage() ) );
@@ -516,7 +516,7 @@ static sasl_callback_t callbacks[] = {
if ( result > 0 )
return prepare( ba );
else if ( result < 0 ) {
- ts->setFailedFatally( KIO::ERR_INTERNAL,
+ ts->setFailedFatally( TDEIO::ERR_INTERNAL,
i18n("Could not read data from application.") );
mComplete = true;
mNeedResponse = true;
diff --git a/kioslave/smtp/command.h b/kioslave/smtp/command.h
index 53e8d00f3..ed3e1fb66 100644
--- a/kioslave/smtp/command.h
+++ b/kioslave/smtp/command.h
@@ -176,7 +176,7 @@ namespace KioSMTP {
class AuthCommand : public Command {
public:
AuthCommand( SMTPProtocol * smtp, const char *mechanisms,
- const TQString &aFQDN, KIO::AuthInfo &ai );
+ const TQString &aFQDN, TDEIO::AuthInfo &ai );
~AuthCommand();
bool doNotExecute( const TransactionState * ts ) const;
TQCString nextCommandLine( TransactionState * );
@@ -193,7 +193,7 @@ namespace KioSMTP {
uint mOutlen;
bool mOneStep;
- KIO::AuthInfo *mAi;
+ TDEIO::AuthInfo *mAi;
TQCString mLastChallenge;
TQCString mUngetSASLResponse;
bool mFirstTime;
diff --git a/kioslave/smtp/response.cc b/kioslave/smtp/response.cc
index 8ae8cdceb..0ddce0e5a 100644
--- a/kioslave/smtp/response.cc
+++ b/kioslave/smtp/response.cc
@@ -119,41 +119,41 @@ namespace KioSMTP {
case 454: // TLS not available due to temporary reason
// Temporary authentication failure
case 554: // Transaction failed / No SMTP service here / No valid recipients
- return KIO::ERR_SERVICE_NOT_AVAILABLE;
+ return TDEIO::ERR_SERVICE_NOT_AVAILABLE;
case 451: // Requested action aborted: local error in processing
- return KIO::ERR_INTERNAL_SERVER;
+ return TDEIO::ERR_INTERNAL_SERVER;
case 452: // Requested action not taken: insufficient system storage
case 552: // Requested mail action aborted: exceeded storage allocation
- return KIO::ERR_DISK_FULL;
+ return TDEIO::ERR_DISK_FULL;
case 500: // Syntax error, command unrecognized
case 501: // Syntax error in parameters or arguments
case 502: // Command not implemented
case 503: // Bad sequence of commands
case 504: // Command parameter not implemented
- return KIO::ERR_INTERNAL;
+ return TDEIO::ERR_INTERNAL;
case 450: // Requested mail action not taken: mailbox unavailable
case 550: // Requested action not taken: mailbox unavailable
case 551: // User not local; please try <forward-path>
case 553: // Requested action not taken: mailbox name not allowed
- return KIO::ERR_DOES_NOT_EXIST;
+ return TDEIO::ERR_DOES_NOT_EXIST;
case 530: // {STARTTLS,Authentication} required
case 538: // Encryption required for requested authentication mechanism
case 534: // Authentication mechanism is too weak
- return KIO::ERR_UPGRADE_REQUIRED;
+ return TDEIO::ERR_UPGRADE_REQUIRED;
case 432: // A password transition is needed
- return KIO::ERR_COULD_NOT_AUTHENTICATE;
+ return TDEIO::ERR_COULD_NOT_AUTHENTICATE;
default:
if ( isPositive() )
return 0;
else
- return KIO::ERR_UNKNOWN;
+ return TDEIO::ERR_UNKNOWN;
}
}
diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc
index 55352aed6..b1effa415 100644
--- a/kioslave/smtp/smtp.cc
+++ b/kioslave/smtp/smtp.cc
@@ -170,7 +170,7 @@ void SMTPProtocol::special( const TQByteArray & aData ) {
if ( !execute( Command::NOOP ) )
return;
} else {
- error( KIO::ERR_INTERNAL,
+ error( TDEIO::ERR_INTERNAL,
i18n("The application sent an invalid request.") );
return;
}
@@ -233,14 +233,14 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
if ( !from.isNull() )
request.setFromAddress( from );
else if ( request.emitHeaders() ) {
- error(KIO::ERR_NO_CONTENT, i18n("The sender address is missing."));
+ error(TDEIO::ERR_NO_CONTENT, i18n("The sender address is missing."));
return;
}
}
if ( !smtp_open( request.heloHostname() ) )
{
- error(KIO::ERR_SERVICE_NOT_AVAILABLE,
+ error(TDEIO::ERR_SERVICE_NOT_AVAILABLE,
i18n("SMTPProtocol::smtp_open failed (%1)") // ### better error message?
.arg(open_url.path()));
return;
@@ -248,7 +248,7 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
if ( request.is8BitBody()
&& !haveCapability("8BITMIME") && metaData("8bitmime") != "on" ) {
- error( KIO::ERR_SERVICE_NOT_AVAILABLE,
+ error( TDEIO::ERR_SERVICE_NOT_AVAILABLE,
i18n("Your server does not support sending of 8-bit messages.\n"
"Please use base64 or quoted-printable encoding.") );
return;
@@ -290,7 +290,7 @@ bool SMTPProtocol::sendCommandLine( const TQCString & cmdline ) {
kdDebug( 7112) << "C: <" << cmdline.length() << " bytes>" << endl;
ssize_t cmdline_len = cmdline.length();
if ( write( cmdline.data(), cmdline_len ) != cmdline_len ) {
- error( KIO::ERR_COULD_NOT_WRITE, m_sServer );
+ error( TDEIO::ERR_COULD_NOT_WRITE, m_sServer );
return false;
}
return true;
@@ -308,14 +308,14 @@ Response SMTPProtocol::getResponse( bool * ok ) {
do {
// wait for data...
if ( !waitForResponse( 600 ) ) {
- error( KIO::ERR_SERVER_TIMEOUT, m_sServer );
+ error( TDEIO::ERR_SERVER_TIMEOUT, m_sServer );
return response;
}
// ...read data...
recv_len = readLine( buf, sizeof(buf) - 1 );
if ( recv_len < 1 && !isConnectionValid() ) {
- error( KIO::ERR_CONNECTION_BROKEN, m_sServer );
+ error( TDEIO::ERR_CONNECTION_BROKEN, m_sServer );
return response;
}
@@ -328,7 +328,7 @@ Response SMTPProtocol::getResponse( bool * ok ) {
} while ( !response.isComplete() && response.isWellFormed() );
if ( !response.isValid() ) {
- error( KIO::ERR_NO_CONTENT, i18n("Invalid SMTP response (%1) received.").arg(response.code()) );
+ error( TDEIO::ERR_NO_CONTENT, i18n("Invalid SMTP response (%1) received.").arg(response.code()) );
return response;
}
@@ -514,7 +514,7 @@ bool SMTPProtocol::smtp_open(const TQString& fakeHostname)
if ( !ok || !greeting.isOk() )
{
if ( ok )
- error( KIO::ERR_COULD_NOT_LOGIN,
+ error( TDEIO::ERR_COULD_NOT_LOGIN,
i18n("The server did not accept the connection.\n"
"%1").arg( greeting.errorMessage() ) );
smtp_close();
@@ -528,7 +528,7 @@ bool SMTPProtocol::smtp_open(const TQString& fakeHostname)
else
{
TQString tmpPort;
- KSocketAddress* addr = KExtendedSocket::localAddress(m_iSock);
+ TDESocketAddress* addr = KExtendedSocket::localAddress(m_iSock);
// perform name lookup. NI_NAMEREQD means: don't return a numeric
// value (we need to know when we get have the IP address, so we
// can enclose it in sqaure brackets (domain-literal). Failure to
@@ -587,7 +587,7 @@ bool SMTPProtocol::authenticate()
if ( (m_sUser.isEmpty() || !haveCapability( "AUTH" )) &&
metaData( "sasl" ).isEmpty() ) return true;
- KIO::AuthInfo authInfo;
+ TDEIO::AuthInfo authInfo;
authInfo.username = m_sUser;
authInfo.password = m_sPass;
authInfo.prompt = i18n("Username and password for your SMTP account:");
@@ -642,6 +642,6 @@ void SMTPProtocol::smtp_close( bool nice ) {
void SMTPProtocol::stat(const KURL & url)
{
TQString path = url.path();
- error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.path());
}
diff --git a/kioslave/smtp/smtp.h b/kioslave/smtp/smtp.h
index bcdcaaae3..eef1aab42 100644
--- a/kioslave/smtp/smtp.h
+++ b/kioslave/smtp/smtp.h
@@ -49,7 +49,7 @@ namespace KioSMTP {
class Command;
}
-class SMTPProtocol : public KIO::TCPSlaveBase {
+class SMTPProtocol : public TDEIO::TCPSlaveBase {
friend class KioSMTP::Command;
public:
SMTPProtocol(const TQCString & pool, const TQCString & app, bool useSSL);
diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc
index 23d7723ee..458b386b8 100644
--- a/kioslave/smtp/test_commands.cc
+++ b/kioslave/smtp/test_commands.cc
@@ -31,7 +31,7 @@ public:
TQByteArray nextData;
int nextDataReturnCode;
TQStringList caps;
- KIO::MetaData metadata;
+ TDEIO::MetaData metadata;
void clear() {
startTLSReturnCode = 1;
@@ -161,7 +161,7 @@ int main( int, char** ) {
assert( ehlo3.processResponse( r, 0 ) == false );
assert( ehlo3.isComplete() );
assert( !ehlo3.needsResponse() );
- assert( smtp.lastErrorCode == KIO::ERR_UNKNOWN );
+ assert( smtp.lastErrorCode == TDEIO::ERR_UNKNOWN );
// dynamics 4: EHLO _and_ HELO fail with "command unknown"
smtp.clear();
@@ -176,7 +176,7 @@ int main( int, char** ) {
assert( ehlo4.processResponse( r, 0 ) == false );
assert( ehlo4.isComplete() );
assert( !ehlo4.needsResponse() );
- assert( smtp.lastErrorCode == KIO::ERR_INTERNAL_SERVER );
+ assert( smtp.lastErrorCode == TDEIO::ERR_INTERNAL_SERVER );
//
// STARTTLS
@@ -218,7 +218,7 @@ int main( int, char** ) {
smtp.startTLSReturnCode = 1;
assert( tls2.processResponse( r, &ts ) == false );
assert( !tls2.needsResponse() );
- assert( smtp.lastErrorCode == KIO::ERR_SERVICE_NOT_AVAILABLE );
+ assert( smtp.lastErrorCode == TDEIO::ERR_SERVICE_NOT_AVAILABLE );
// dynamics 3: ok from server, TLS negotiation unsuccessful
smtp.clear();
@@ -710,7 +710,7 @@ void checkSuccessfulTransferCommand( bool error, bool preload, bool ungetLast,
assert( !xfer.needsResponse() );
assert( ts.complete() );
assert( ts.failed() );
- assert( smtp.lastErrorCode == KIO::ERR_DISK_FULL );
+ assert( smtp.lastErrorCode == TDEIO::ERR_DISK_FULL );
} else {
r.parseLine( "250 Message accepted" );
assert( xfer.processResponse( r, &ts ) == true );
diff --git a/kioslave/smtp/transactionstate.cc b/kioslave/smtp/transactionstate.cc
index 67d61486a..b34b45227 100644
--- a/kioslave/smtp/transactionstate.cc
+++ b/kioslave/smtp/transactionstate.cc
@@ -48,7 +48,7 @@ namespace KioSMTP {
void TransactionState::setMailFromFailed( const TQString & addr, const Response & r ) {
setFailed();
- mErrorCode = KIO::ERR_NO_CONTENT;
+ mErrorCode = TDEIO::ERR_NO_CONTENT;
if ( addr.isEmpty() )
mErrorMessage = i18n("The server did not accept a blank sender address.\n"
"%1").arg( r.errorMessage() );
@@ -81,9 +81,9 @@ namespace KioSMTP {
if ( mErrorCode )
return mErrorCode;
if ( haveRejectedRecipients() || !dataCommandSucceeded() )
- return KIO::ERR_NO_CONTENT;
+ return TDEIO::ERR_NO_CONTENT;
// ### what else?
- return KIO::ERR_INTERNAL;
+ return TDEIO::ERR_INTERNAL;
}
TQString TransactionState::errorMessage() const {
diff --git a/kioslave/system/kio_system.cpp b/kioslave/system/kio_system.cpp
index c64706d8d..61f724093 100644
--- a/kioslave/system/kio_system.cpp
+++ b/kioslave/system/kio_system.cpp
@@ -73,7 +73,7 @@ bool SystemProtocol::rewriteURL(const KURL &url, KURL &newUrl)
if ( !m_impl.parseURL(url, name, path) )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return false;
}
@@ -95,7 +95,7 @@ void SystemProtocol::stat(const KURL &url)
if ( path.isEmpty() || path == "/" )
{
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
m_impl.createTopLevelEntry( entry );
statEntry( entry );
finished();
@@ -107,13 +107,13 @@ void SystemProtocol::stat(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
if( path.isEmpty() )
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
if ( m_impl.statByName(name, entry) )
{
@@ -122,7 +122,7 @@ void SystemProtocol::stat(const KURL &url)
}
else
{
- error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL());
}
}
else
@@ -146,7 +146,7 @@ void SystemProtocol::listDir(const KURL &url)
if ( !ok )
{
- error(KIO::ERR_MALFORMED_URL, url.prettyURL());
+ error(TDEIO::ERR_MALFORMED_URL, url.prettyURL());
return;
}
@@ -155,9 +155,9 @@ void SystemProtocol::listDir(const KURL &url)
void SystemProtocol::listRoot()
{
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
- KIO::UDSEntryList system_entries;
+ TDEIO::UDSEntryList system_entries;
bool ok = m_impl.listRoot(system_entries);
if (!ok)
@@ -171,8 +171,8 @@ void SystemProtocol::listRoot()
m_impl.createTopLevelEntry(entry);
listEntry(entry, false);
- KIO::UDSEntryListIterator it = system_entries.begin();
- KIO::UDSEntryListIterator end = system_entries.end();
+ TDEIO::UDSEntryListIterator it = system_entries.begin();
+ TDEIO::UDSEntryListIterator end = system_entries.end();
for(; it!=end; ++it)
{
diff --git a/kioslave/system/kio_system.h b/kioslave/system/kio_system.h
index 916c495e5..7958e124d 100644
--- a/kioslave/system/kio_system.h
+++ b/kioslave/system/kio_system.h
@@ -24,7 +24,7 @@
#include "systemimpl.h"
-class SystemProtocol : public KIO::ForwardingSlaveBase
+class SystemProtocol : public TDEIO::ForwardingSlaveBase
{
public:
SystemProtocol(const TQCString &protocol, const TQCString &pool,
diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp
index 24d7776bf..12732767c 100644
--- a/kioslave/system/systemimpl.cpp
+++ b/kioslave/system/systemimpl.cpp
@@ -37,7 +37,7 @@ SystemImpl::SystemImpl() : TQObject()
KStandardDirs::kde_default("data") + "systemview");
}
-bool SystemImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
+bool SystemImpl::listRoot(TQValueList<TDEIO::UDSEntry> &list)
{
kdDebug() << "SystemImpl::listRoot" << endl;
@@ -55,7 +55,7 @@ bool SystemImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator filename = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -110,7 +110,7 @@ bool SystemImpl::realURL(const TQString &name, const TQString &path,
return true;
}
-bool SystemImpl::statByName(const TQString &filename, KIO::UDSEntry& entry)
+bool SystemImpl::statByName(const TQString &filename, TDEIO::UDSEntry& entry)
{
kdDebug() << "SystemImpl::statByName" << endl;
@@ -160,7 +160,7 @@ KURL SystemImpl::findBaseURL(const TQString &filename) const
= dir.entryList( TQDir::Files | TQDir::Readable );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStringList::ConstIterator name = filenames.begin();
TQStringList::ConstIterator endf = filenames.end();
@@ -186,10 +186,10 @@ KURL SystemImpl::findBaseURL(const TQString &filename) const
}
-static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
+static void addAtom(TDEIO::UDSEntry &entry, unsigned int ID, long l,
const TQString &s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
@@ -197,14 +197,14 @@ static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l,
}
-void SystemImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
+void SystemImpl::createTopLevelEntry(TDEIO::UDSEntry &entry) const
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0555);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/system_directory");
- addAtom(entry, KIO::UDS_ICON_NAME, 0, "system");
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0555);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/system_directory");
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, "system");
}
TQString SystemImpl::readPathINL(TQString filename)
@@ -234,7 +234,7 @@ TQString SystemImpl::readPathINL(TQString filename)
}
}
-void SystemImpl::createEntry(KIO::UDSEntry &entry,
+void SystemImpl::createEntry(TDEIO::UDSEntry &entry,
const TQString &directory,
const TQString &file)
{
@@ -252,22 +252,22 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
return;
}
- addAtom(entry, KIO::UDS_NAME, 0, desktop.readName());
+ addAtom(entry, TDEIO::UDS_NAME, 0, desktop.readName());
TQString new_filename = file;
new_filename.truncate(file.length()-8);
if ( desktop.readURL().isEmpty() )
{
- addAtom(entry, KIO::UDS_URL, 0, readPathINL(directory+file));
+ addAtom(entry, TDEIO::UDS_URL, 0, readPathINL(directory+file));
}
else
{
- addAtom(entry, KIO::UDS_URL, 0, "system:/"+new_filename);
+ addAtom(entry, TDEIO::UDS_URL, 0, "system:/"+new_filename);
}
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
TQString icon = desktop.readIcon();
TQString empty_icon = desktop.readEntry("EmptyIcon");
@@ -278,22 +278,22 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
m_lastListingEmpty = true;
- KIO::ListJob *job = KIO::listDir(url, false, 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( slotResult(KIO::Job *) ) );
+ TDEIO::ListJob *job = TDEIO::listDir(url, false, 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( slotResult(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
if (m_lastListingEmpty) icon = empty_icon;
}
- addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
+ addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
}
-void SystemImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list)
+void SystemImpl::slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list)
{
if (list.size()>0)
{
@@ -303,7 +303,7 @@ void SystemImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list)
}
}
-void SystemImpl::slotResult(KIO::Job *)
+void SystemImpl::slotResult(TDEIO::Job *)
{
tqApp->eventLoop()->exitLoop();
}
diff --git a/kioslave/system/systemimpl.h b/kioslave/system/systemimpl.h
index 31dc2daad..fcc4cda48 100644
--- a/kioslave/system/systemimpl.h
+++ b/kioslave/system/systemimpl.h
@@ -35,10 +35,10 @@ Q_OBJECT
public:
SystemImpl();
- void createTopLevelEntry(KIO::UDSEntry& entry) const;
- bool statByName(const TQString &filename, KIO::UDSEntry& entry);
+ void createTopLevelEntry(TDEIO::UDSEntry& entry) const;
+ bool statByName(const TQString &filename, TDEIO::UDSEntry& entry);
- bool listRoot(TQValueList<KIO::UDSEntry> &list);
+ bool listRoot(TQValueList<TDEIO::UDSEntry> &list);
bool parseURL(const KURL &url, TQString &name, TQString &path) const;
bool realURL(const TQString &name, const TQString &path, KURL &url) const;
@@ -48,11 +48,11 @@ public:
private slots:
KURL findBaseURL(const TQString &filename) const;
- void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list);
- void slotResult(KIO::Job *job);
+ void slotEntries(TDEIO::Job *job, const TDEIO::UDSEntryList &list);
+ void slotResult(TDEIO::Job *job);
private:
- void createEntry(KIO::UDSEntry& entry, const TQString &directory,
+ void createEntry(TDEIO::UDSEntry& entry, const TQString &directory,
const TQString &file);
bool m_lastListingEmpty;
diff --git a/kioslave/tar/tar.cc b/kioslave/tar/tar.cc
index 9af5062ab..e56b9941c 100644
--- a/kioslave/tar/tar.cc
+++ b/kioslave/tar/tar.cc
@@ -26,7 +26,7 @@
#include "tar.h"
-using namespace KIO;
+using namespace TDEIO;
extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
@@ -60,7 +60,7 @@ ArchiveProtocol::~ArchiveProtocol()
delete m_archiveFile;
}
-bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Error& errorNum )
+bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, TDEIO::Error& errorNum )
{
TQString fullPath = url.path();
kdDebug(7109) << "ArchiveProtocol::checkNewFile " << fullPath << endl;
@@ -137,10 +137,10 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro
{
// Too bad, it is a directory, not an archive.
kdDebug(7109) << "Path is a directory, not an archive." << endl;
- errorNum = KIO::ERR_IS_DIRECTORY;
+ errorNum = TDEIO::ERR_IS_DIRECTORY;
}
else
- errorNum = KIO::ERR_DOES_NOT_EXIST;
+ errorNum = TDEIO::ERR_DOES_NOT_EXIST;
return false;
}
@@ -156,7 +156,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro
m_archiveFile = new KZip( archiveFile );
} else {
kdWarning(7109) << "Protocol " << url.protocol() << " not supported by this IOSlave" << endl;
- errorNum = KIO::ERR_UNSUPPORTED_PROTOCOL;
+ errorNum = TDEIO::ERR_UNSUPPORTED_PROTOCOL;
return false;
}
@@ -165,7 +165,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro
kdDebug(7109) << "Opening " << archiveFile << "failed." << endl;
delete m_archiveFile;
m_archiveFile = 0L;
- errorNum = KIO::ERR_CANNOT_OPEN_FOR_READING;
+ errorNum = TDEIO::ERR_CANNOT_OPEN_FOR_READING;
return false;
}
@@ -216,14 +216,14 @@ void ArchiveProtocol::listDir( const KURL & url )
kdDebug( 7109 ) << "ArchiveProtocol::listDir " << url << endl;
TQString path;
- KIO::Error errorNum;
+ TDEIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
{
- if ( errorNum == KIO::ERR_CANNOT_OPEN_FOR_READING )
+ if ( errorNum == TDEIO::ERR_CANNOT_OPEN_FOR_READING )
{
// If we cannot open, it might be a problem with the archive header (e.g. unsupported format)
// Therefore give a more specific error message
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n( "Could not open the file, probably due to an unsupported file format.\n%1")
.arg( url.prettyURL() ) );
return;
@@ -268,12 +268,12 @@ void ArchiveProtocol::listDir( const KURL & url )
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;
@@ -307,16 +307,16 @@ void ArchiveProtocol::stat( const KURL & url )
{
TQString path;
UDSEntry entry;
- KIO::Error errorNum;
+ TDEIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
{
// We may be looking at a real directory - this happens
// when pressing up after being in the root of an archive
- if ( errorNum == KIO::ERR_CANNOT_OPEN_FOR_READING )
+ if ( errorNum == TDEIO::ERR_CANNOT_OPEN_FOR_READING )
{
// If we cannot open, it might be a problem with the archive header (e.g. unsupported format)
// Therefore give a more specific error message
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n( "Could not open the file, probably due to an unsupported file format.\n%1")
.arg( url.prettyURL() ) );
return;
@@ -329,7 +329,7 @@ void ArchiveProtocol::stat( const KURL & url )
}
// 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;
@@ -338,11 +338,11 @@ void ArchiveProtocol::stat( const KURL & url )
if ( KDE_stat( TQFile::encodeName( url.path() ), &buff ) == -1 )
{
// Should not happen, as the file was already stated by checkNewFile
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL() );
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL() );
return;
}
- 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 );
@@ -368,7 +368,7 @@ void ArchiveProtocol::stat( const KURL & url )
}
if ( !archiveEntry )
{
- error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return;
}
@@ -383,14 +383,14 @@ void ArchiveProtocol::get( const KURL & url )
kdDebug( 7109 ) << "ArchiveProtocol::get " << url << endl;
TQString path;
- KIO::Error errorNum;
+ TDEIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
{
- if ( errorNum == KIO::ERR_CANNOT_OPEN_FOR_READING )
+ if ( errorNum == TDEIO::ERR_CANNOT_OPEN_FOR_READING )
{
// If we cannot open, it might be a problem with the archive header (e.g. unsupported format)
// Therefore give a more specific error message
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n( "Could not open the file, probably due to an unsupported file format.\n%1")
.arg( url.prettyURL() ) );
return;
@@ -410,12 +410,12 @@ void ArchiveProtocol::get( const KURL & url )
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);
@@ -461,13 +461,13 @@ void ArchiveProtocol::get( const KURL & url )
{
// Wrong protocol? Why was this not catched by checkNewFile?
kdWarning(7109) << "Protocol " << url.protocol() << " not supported by this IOSlave; " << k_funcinfo << endl;
- error( KIO::ERR_UNSUPPORTED_PROTOCOL, url.protocol() );
+ error( TDEIO::ERR_UNSUPPORTED_PROTOCOL, url.protocol() );
return;
}
if (!io)
{
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n( "The archive file could not be opened, perhaps because the format is unsupported.\n%1" )
.arg( url.prettyURL() ) );
return;
@@ -475,7 +475,7 @@ void ArchiveProtocol::get( const KURL & url )
if ( !io->open( IO_ReadOnly ) )
{
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL() );
return;
}
@@ -489,7 +489,7 @@ void ArchiveProtocol::get( const KURL & url )
if ( buffer.isEmpty() && bufferSize > 0 )
{
// Something went wrong
- error( KIO::ERR_OUT_OF_MEMORY, url.prettyURL() );
+ error( TDEIO::ERR_OUT_OF_MEMORY, url.prettyURL() );
return;
}
@@ -497,7 +497,7 @@ void ArchiveProtocol::get( const KURL & url )
// How much file do we still have to process?
int fileSize = archiveFileEntry->size();
- KIO::filesize_t processed = 0;
+ TDEIO::filesize_t processed = 0;
while ( !io->atEnd() && fileSize > 0 )
{
@@ -510,7 +510,7 @@ void ArchiveProtocol::get( const KURL & url )
if ( read != bufferSize )
{
kdWarning(7109) << "Read " << read << " bytes but expected " << bufferSize << endl;
- error( KIO::ERR_COULD_NOT_READ, url.prettyURL() );
+ error( TDEIO::ERR_COULD_NOT_READ, url.prettyURL() );
return;
}
if ( firstRead )
diff --git a/kioslave/tar/tar.h b/kioslave/tar/tar.h
index 1cde2deae..95887e559 100644
--- a/kioslave/tar/tar.h
+++ b/kioslave/tar/tar.h
@@ -25,7 +25,7 @@
#include <kio/global.h>
#include <kio/slavebase.h>
-class ArchiveProtocol : public KIO::SlaveBase
+class ArchiveProtocol : public TDEIO::SlaveBase
{
public:
ArchiveProtocol( const TQCString &pool, const TQCString &app );
@@ -36,7 +36,7 @@ public:
virtual void get( const KURL & url );
protected:
- void createUDSEntry( const KArchiveEntry * tarEntry, KIO::UDSEntry & entry );
+ void createUDSEntry( const KArchiveEntry * tarEntry, TDEIO::UDSEntry & entry );
/**
* \brief find, check and open the archive file
@@ -45,7 +45,7 @@ protected:
* \param errNum KIO error number (undefined if the function returns true)
* \return true if file was found, false if there was an error
*/
- bool checkNewFile( const KURL & url, TQString & path, KIO::Error& errorNum );
+ bool checkNewFile( const KURL & url, TQString & path, TDEIO::Error& errorNum );
KArchive * m_archiveFile;
TQString m_archiveName;
diff --git a/kioslave/thumbnail/exrcreator.cpp b/kioslave/thumbnail/exrcreator.cpp
index 0cc8d54d3..39e8f1fe2 100644
--- a/kioslave/thumbnail/exrcreator.cpp
+++ b/kioslave/thumbnail/exrcreator.cpp
@@ -62,8 +62,8 @@ bool EXRCreator::create(const TQString &path, int, int, TQImage &img)
// EXR images just to turn it into an icon, so we go back
// to honouring it in here.
kdDebug() << "EXRcreator - using original image" << endl;
- KConfig * config = TDEGlobal::config();
- KConfigGroupSaver cgs( config, "PreviewSettings" );
+ TDEConfig * config = TDEGlobal::config();
+ TDEConfigGroupSaver cgs( config, "PreviewSettings" );
unsigned long long maxSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
unsigned long long fileSize = TQFile( path ).size();
if ( (fileSize > 0) && (fileSize < maxSize) ) {
diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp
index ac7525c60..3dbd5b4a3 100644
--- a/kioslave/thumbnail/thumbnail.cpp
+++ b/kioslave/thumbnail/thumbnail.cpp
@@ -81,7 +81,7 @@
// int depth
// Otherwise, the data returned is the image in PNG format.
-using namespace KIO;
+using namespace TDEIO;
extern "C"
{
@@ -148,19 +148,19 @@ void ThumbnailProtocol::get(const KURL &url)
if (info.isDir())
{
// We cannot process a directory
- error(KIO::ERR_IS_DIRECTORY,url.path());
+ error(TDEIO::ERR_IS_DIRECTORY,url.path());
return;
}
else if (!info.exists())
{
// The file does not exist
- error(KIO::ERR_DOES_NOT_EXIST,url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST,url.path());
return;
}
else if (!info.isReadable())
{
// The file is not readable!
- error(KIO::ERR_COULD_NOT_READ,url.path());
+ error(TDEIO::ERR_COULD_NOT_READ,url.path());
return;
}
m_mimeType = KMimeType::findByURL(url)->name();
@@ -171,7 +171,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_mimeType.isEmpty())
{
- error(KIO::ERR_INTERNAL, i18n("No MIME Type specified."));
+ error(TDEIO::ERR_INTERNAL, i18n("No MIME Type specified."));
return;
}
@@ -181,7 +181,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_width < 0 || m_height < 0)
{
- error(KIO::ERR_INTERNAL, i18n("No or invalid size specified."));
+ error(TDEIO::ERR_INTERNAL, i18n("No or invalid size specified."));
return;
}
#ifdef THUMBNAIL_HACK
@@ -206,7 +206,7 @@ void ThumbnailProtocol::get(const KURL &url)
TQImage img;
- KConfigGroup group( TDEGlobal::config(), "PreviewSettings" );
+ TDEConfigGroup group( TDEGlobal::config(), "PreviewSettings" );
// ### KFMI
@@ -262,7 +262,7 @@ void ThumbnailProtocol::get(const KURL &url)
#endif
if (plugin.isEmpty())
{
- error(KIO::ERR_INTERNAL, i18n("No plugin specified."));
+ error(TDEIO::ERR_INTERNAL, i18n("No plugin specified."));
return;
}
@@ -280,7 +280,7 @@ void ThumbnailProtocol::get(const KURL &url)
}
if (!creator)
{
- error(KIO::ERR_INTERNAL, i18n("Cannot load ThumbCreator %1").arg(plugin));
+ error(TDEIO::ERR_INTERNAL, i18n("Cannot load ThumbCreator %1").arg(plugin));
return;
}
m_creators.insert(plugin, creator);
@@ -288,7 +288,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (!creator->create(url.path(), m_width, m_height, img))
{
- error(KIO::ERR_INTERNAL, i18n("Cannot create thumbnail for %1").arg(url.path()));
+ error(TDEIO::ERR_INTERNAL, i18n("Cannot create thumbnail for %1").arg(url.path()));
return;
}
flags = creator->flags();
@@ -355,7 +355,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (img.isNull())
{
- error(KIO::ERR_INTERNAL, i18n("Failed to create a thumbnail."));
+ error(TDEIO::ERR_INTERNAL, i18n("Failed to create a thumbnail."));
return;
}
@@ -370,7 +370,7 @@ void ThumbnailProtocol::get(const KURL &url)
TQBuffer buf;
if (!buf.open(IO_WriteOnly))
{
- error(KIO::ERR_INTERNAL, i18n("Could not write image."));
+ error(TDEIO::ERR_INTERNAL, i18n("Could not write image."));
return;
}
img.save(&buf,"PNG");
@@ -395,16 +395,16 @@ void ThumbnailProtocol::get(const KURL &url)
void *shmaddr = shmat(shmid.toInt(), 0, 0);
if (shmaddr == (void *)-1)
{
- error(KIO::ERR_INTERNAL, i18n("Failed to attach to shared memory segment %1").arg(shmid));
+ error(TDEIO::ERR_INTERNAL, i18n("Failed to attach to shared memory segment %1").arg(shmid));
return;
}
if (img.width() * img.height() > m_width * m_height)
{
- error(KIO::ERR_INTERNAL, i18n("Image is too big for the shared memory segment"));
+ error(TDEIO::ERR_INTERNAL, i18n("Image is too big for the shared memory segment"));
shmdt((char*)shmaddr);
return;
}
- if( img.depth() != 32 ) // KIO::PreviewJob and this code below completely
+ if( img.depth() != 32 ) // TDEIO::PreviewJob and this code below completely
img = img.convertDepth( 32 ); // ignores colortable :-/, so make sure there is none
stream << img.width() << img.height() << img.depth()
<< img.hasAlphaBuffer();
diff --git a/kioslave/thumbnail/thumbnail.h b/kioslave/thumbnail/thumbnail.h
index a2eb53841..091ad02c2 100644
--- a/kioslave/thumbnail/thumbnail.h
+++ b/kioslave/thumbnail/thumbnail.h
@@ -27,7 +27,7 @@
class ThumbCreator;
class TQImage;
-class ThumbnailProtocol : public KIO::SlaveBase
+class ThumbnailProtocol : public TDEIO::SlaveBase
{
public:
ThumbnailProtocol(const TQCString &pool, const TQCString &app);
diff --git a/kioslave/trash/kio_trash.cpp b/kioslave/trash/kio_trash.cpp
index 8b033abd4..f77cbf9ab 100644
--- a/kioslave/trash/kio_trash.cpp
+++ b/kioslave/trash/kio_trash.cpp
@@ -94,7 +94,7 @@ void TrashProtocol::restore( const KURL& trashURL )
TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( trashURL, trashId, fileId, relativePath );
if ( !ok ) {
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( trashURL.prettyURL() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( trashURL.prettyURL() ) );
return;
}
TrashedFileInfo info;
@@ -112,7 +112,7 @@ void TrashProtocol::restore( const KURL& trashURL )
const TQString destDir = dest.directory();
KDE_struct_stat buff;
if ( KDE_lstat( TQFile::encodeName( destDir ), &buff ) == -1 ) {
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n( "The directory %1 does not exist anymore, so it is not possible to restore this item to its original location. "
"You can either recreate that directory and use the restore operation again, or drag the item anywhere else to restore it." ).arg( destDir ) );
return;
@@ -128,7 +128,7 @@ void TrashProtocol::rename( const KURL &oldURL, const KURL &newURL, bool overwri
kdDebug()<<"TrashProtocol::rename(): old="<<oldURL<<" new="<<newURL<<" overwrite=" << overwrite<<endl;
if ( oldURL.protocol() == "trash" && newURL.protocol() == "trash" ) {
- error( KIO::ERR_CANNOT_RENAME, oldURL.prettyURL() );
+ error( TDEIO::ERR_CANNOT_RENAME, oldURL.prettyURL() );
return;
}
@@ -142,7 +142,7 @@ void TrashProtocol::copy( const KURL &src, const KURL &dest, int /*permissions*/
kdDebug()<<"TrashProtocol::copy(): " << src << " " << dest << endl;
if ( src.protocol() == "trash" && dest.protocol() == "trash" ) {
- error( KIO::ERR_UNSUPPORTED_ACTION, i18n( "This file is already in the trash bin." ) );
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, i18n( "This file is already in the trash bin." ) );
return;
}
@@ -157,7 +157,7 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( src, trashId, fileId, relativePath );
if ( !ok ) {
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( src.prettyURL() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( src.prettyURL() ) );
return;
}
const TQString destPath = dest.path();
@@ -166,7 +166,7 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
ok = TQFile::remove( destPath );
Q_ASSERT( ok ); // ### TODO
} else {
- error( KIO::ERR_FILE_ALREADY_EXIST, destPath );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, destPath );
return;
}
}
@@ -224,33 +224,33 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
}
return;
} else {
- kdDebug() << "returning KIO::ERR_ACCESS_DENIED, it's not allowed to add a file to an existing trash directory" << endl;
+ kdDebug() << "returning TDEIO::ERR_ACCESS_DENIED, it's not allowed to add a file to an existing trash directory" << endl;
// It's not allowed to add a file to an existing trash directory.
- error( KIO::ERR_ACCESS_DENIED, dest.prettyURL() );
+ error( TDEIO::ERR_ACCESS_DENIED, dest.prettyURL() );
return;
}
} else
- error( KIO::ERR_UNSUPPORTED_ACTION, "should never happen" );
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, "should never happen" );
}
-static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long long l, const TQString& s = TQString::null)
+static void addAtom(TDEIO::UDSEntry& entry, unsigned int ID, long long l, const TQString& s = TQString::null)
{
- KIO::UDSAtom atom;
+ TDEIO::UDSAtom atom;
atom.m_uds = ID;
atom.m_long = l;
atom.m_str = s;
entry.append(atom);
}
-void TrashProtocol::createTopLevelDirEntry(KIO::UDSEntry& entry)
+void TrashProtocol::createTopLevelDirEntry(TDEIO::UDSEntry& entry)
{
entry.clear();
- addAtom(entry, KIO::UDS_NAME, 0, ".");
- addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
- addAtom(entry, KIO::UDS_ACCESS, 0700);
- addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- addAtom(entry, KIO::UDS_USER, 0, m_userName);
- addAtom(entry, KIO::UDS_GROUP, 0, m_groupName);
+ addAtom(entry, TDEIO::UDS_NAME, 0, ".");
+ addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ addAtom(entry, TDEIO::UDS_ACCESS, 0700);
+ addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, "inode/directory");
+ addAtom(entry, TDEIO::UDS_USER, 0, m_userName);
+ addAtom(entry, TDEIO::UDS_GROUP, 0, m_groupName);
}
void TrashProtocol::stat(const KURL& url)
@@ -259,7 +259,7 @@ void TrashProtocol::stat(const KURL& url)
const TQString path = url.path();
if( path.isEmpty() || path == "/" ) {
// The root is "virtual" - it's not a single physical directory
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
createTopLevelDirEntry( entry );
statEntry( entry );
finished();
@@ -274,8 +274,8 @@ void TrashProtocol::stat(const KURL& url)
kdDebug() << k_funcinfo << url << " looks fishy, returning does-not-exist" << endl;
// A URL like trash:/file simply means that CopyJob is trying to see if
// the destination exists already (it made up the URL by itself).
- error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
- //error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
+ //error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
@@ -292,14 +292,14 @@ void TrashProtocol::stat(const KURL& url)
fileURL = url.url();
}
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TrashedFileInfo info;
ok = impl.infoForFile( trashId, fileId, info );
if ( ok )
ok = createUDSEntry( filePath, fileName, fileURL, entry, info );
if ( !ok ) {
- error( KIO::ERR_COULD_NOT_STAT, url.prettyURL() );
+ error( TDEIO::ERR_COULD_NOT_STAT, url.prettyURL() );
}
statEntry( entry );
@@ -314,13 +314,13 @@ void TrashProtocol::del( const KURL &url, bool /*isfile*/ )
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
ok = relativePath.isEmpty();
if ( !ok ) {
- error( KIO::ERR_ACCESS_DENIED, url.prettyURL() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.prettyURL() );
return;
}
@@ -346,7 +346,7 @@ void TrashProtocol::listDir(const KURL& url)
TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
//was: const TQString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
@@ -368,7 +368,7 @@ void TrashProtocol::listDir(const KURL& url)
kdDebug() << k_funcinfo << "listing " << info.physicalPath << endl;
TQStrList entryNames = impl.listDir( info.physicalPath );
totalSize( entryNames.count() );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
TQStrListIterator entryIt( entryNames );
for (; entryIt.current(); ++entryIt) {
TQString fileName = TQFile::decodeName( entryIt.current() );
@@ -390,7 +390,7 @@ void TrashProtocol::listDir(const KURL& url)
finished();
}
-bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString& fileName, const TQString& url, KIO::UDSEntry& entry, const TrashedFileInfo& info )
+bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString& fileName, const TQString& url, TDEIO::UDSEntry& entry, const TrashedFileInfo& info )
{
TQCString physicalPath_c = TQFile::encodeName( physicalPath );
KDE_struct_stat buff;
@@ -405,7 +405,7 @@ bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString
buffer2[ n ] = 0;
}
- addAtom( entry, KIO::UDS_LINK_DEST, 0, TQFile::decodeName( buffer2 ) );
+ addAtom( entry, TDEIO::UDS_LINK_DEST, 0, TQFile::decodeName( buffer2 ) );
// Follow symlink
// That makes sense in kio_file, but not in the trash, especially for the size
// #136876
@@ -422,21 +422,21 @@ bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString
mode_t type = buff.st_mode & S_IFMT; // extract file type
mode_t access = buff.st_mode & 07777; // extract permissions
access &= 07555; // make it readonly, since it's in the trashcan
- addAtom( entry, KIO::UDS_NAME, 0, fileName );
- addAtom( entry, KIO::UDS_FILE_TYPE, type );
+ addAtom( entry, TDEIO::UDS_NAME, 0, fileName );
+ addAtom( entry, TDEIO::UDS_FILE_TYPE, type );
if ( !url.isEmpty() )
- addAtom( entry, KIO::UDS_URL, 0, url );
+ addAtom( entry, TDEIO::UDS_URL, 0, url );
KMimeType::Ptr mt = KMimeType::findByPath( physicalPath, buff.st_mode );
- addAtom( entry, KIO::UDS_MIME_TYPE, 0, mt->name() );
- addAtom( entry, KIO::UDS_ACCESS, access );
- addAtom( entry, KIO::UDS_SIZE, buff.st_size );
- addAtom( entry, KIO::UDS_USER, 0, m_userName ); // assumption
- addAtom( entry, KIO::UDS_GROUP, 0, m_groupName ); // assumption
- addAtom( entry, KIO::UDS_MODIFICATION_TIME, buff.st_mtime );
- addAtom( entry, KIO::UDS_ACCESS_TIME, buff.st_atime ); // ## or use it for deletion time?
- addAtom( entry, KIO::UDS_EXTRA, 0, info.origPath );
- addAtom( entry, KIO::UDS_EXTRA, 0, info.deletionDate.toString( Qt::ISODate ) );
+ addAtom( entry, TDEIO::UDS_MIME_TYPE, 0, mt->name() );
+ addAtom( entry, TDEIO::UDS_ACCESS, access );
+ addAtom( entry, TDEIO::UDS_SIZE, buff.st_size );
+ addAtom( entry, TDEIO::UDS_USER, 0, m_userName ); // assumption
+ addAtom( entry, TDEIO::UDS_GROUP, 0, m_groupName ); // assumption
+ addAtom( entry, TDEIO::UDS_MODIFICATION_TIME, buff.st_mtime );
+ addAtom( entry, TDEIO::UDS_ACCESS_TIME, buff.st_atime ); // ## or use it for deletion time?
+ addAtom( entry, TDEIO::UDS_EXTRA, 0, info.origPath );
+ addAtom( entry, TDEIO::UDS_EXTRA, 0, info.deletionDate.toString( Qt::ISODate ) );
return true;
}
@@ -445,7 +445,7 @@ void TrashProtocol::listRoot()
INIT_IMPL;
const TrashedFileInfoList lst = impl.list();
totalSize( lst.count() );
- KIO::UDSEntry entry;
+ TDEIO::UDSEntry entry;
createTopLevelDirEntry( entry );
listEntry( entry, false );
for ( TrashedFileInfoList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
@@ -488,7 +488,7 @@ void TrashProtocol::special( const TQByteArray & data )
}
default:
kdWarning(7116) << "Unknown command in special(): " << cmd << endl;
- error( KIO::ERR_UNSUPPORTED_ACTION, TQString::number(cmd) );
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, TQString::number(cmd) );
break;
}
}
@@ -499,7 +499,7 @@ void TrashProtocol::put( const KURL& url, int /*permissions*/, bool /*overwrite*
kdDebug() << "put: " << url << endl;
// create deleted file. We need to get the mtime and original location from metadata...
// Maybe we can find the info file for url.fileName(), in case ::rename() was called first, and failed...
- error( KIO::ERR_ACCESS_DENIED, url.prettyURL() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.prettyURL() );
}
void TrashProtocol::get( const KURL& url )
@@ -508,11 +508,11 @@ void TrashProtocol::get( const KURL& url )
kdDebug() << "get() : " << url << endl;
if ( !url.isValid() ) {
kdDebug() << kdBacktrace() << endl;
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.url() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.url() ) );
return;
}
if ( url.path().length() <= 1 ) {
- error( KIO::ERR_IS_DIRECTORY, url.prettyURL() );
+ error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL() );
return;
}
int trashId;
@@ -520,7 +520,7 @@ void TrashProtocol::get( const KURL& url )
TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
- error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
+ error( TDEIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
const TQString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
@@ -533,27 +533,27 @@ void TrashProtocol::get( const KURL& url )
// But for this one we wouldn't use DCOP for every bit of data...
KURL fileURL;
fileURL.setPath( physicalPath );
- KIO::Job* job = KIO::get( fileURL );
- connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
- this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
- connect( job, TQT_SIGNAL( mimetype( KIO::Job*, const TQString& ) ),
- this, TQT_SLOT( slotMimetype( KIO::Job*, const TQString& ) ) );
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( jobFinished(KIO::Job *) ) );
+ TDEIO::Job* job = TDEIO::get( fileURL );
+ connect( job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( mimetype( TDEIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotMimetype( TDEIO::Job*, const TQString& ) ) );
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( jobFinished(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
}
-void TrashProtocol::slotData( KIO::Job*, const TQByteArray&arr )
+void TrashProtocol::slotData( TDEIO::Job*, const TQByteArray&arr )
{
data( arr );
}
-void TrashProtocol::slotMimetype( KIO::Job*, const TQString& mt )
+void TrashProtocol::slotMimetype( TDEIO::Job*, const TQString& mt )
{
mimeType( mt );
}
-void TrashProtocol::jobFinished( KIO::Job* job )
+void TrashProtocol::jobFinished( TDEIO::Job* job )
{
if ( job->error() )
error( job->error(), job->errorText() );
@@ -588,7 +588,7 @@ void TrashProtocol::mkdir( const KURL& url, int /*permissions*/ )
}
} else {
// Well it's not allowed to add a directory to an existing deleted directory.
- error( KIO::ERR_ACCESS_DENIED, url.prettyURL() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.prettyURL() );
}
}
#endif
diff --git a/kioslave/trash/kio_trash.h b/kioslave/trash/kio_trash.h
index 37ea1944f..6f94512d7 100644
--- a/kioslave/trash/kio_trash.h
+++ b/kioslave/trash/kio_trash.h
@@ -22,12 +22,12 @@
#include <kio/slavebase.h>
#include "trashimpl.h"
-namespace KIO { class Job; }
+namespace TDEIO { class Job; }
typedef TrashImpl::TrashedFileInfo TrashedFileInfo;
typedef TrashImpl::TrashedFileInfoList TrashedFileInfoList;
-class TrashProtocol : public TQObject, public KIO::SlaveBase
+class TrashProtocol : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
public:
@@ -50,16 +50,16 @@ public:
virtual void special( const TQByteArray & data );
private slots:
- void slotData( KIO::Job*, const TQByteArray& );
- void slotMimetype( KIO::Job*, const TQString& );
- void jobFinished( KIO::Job* job );
+ void slotData( TDEIO::Job*, const TQByteArray& );
+ void slotMimetype( TDEIO::Job*, const TQString& );
+ void jobFinished( TDEIO::Job* job );
private:
typedef enum CopyOrMove { Copy, Move };
void copyOrMove( const KURL& src, const KURL& dest, bool overwrite, CopyOrMove action );
- void createTopLevelDirEntry(KIO::UDSEntry& entry);
+ void createTopLevelDirEntry(TDEIO::UDSEntry& entry);
bool createUDSEntry( const TQString& physicalPath, const TQString& fileName, const TQString& url,
- KIO::UDSEntry& entry, const TrashedFileInfo& info );
+ TDEIO::UDSEntry& entry, const TrashedFileInfo& info );
void listRoot();
void restore( const KURL& trashURL );
diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp
index 630b8e314..b05cac249 100644
--- a/kioslave/trash/ktrash.cpp
+++ b/kioslave/trash/ktrash.cpp
@@ -53,8 +53,8 @@ int main(int argc, char *argv[])
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)1;
- KIO::Job* job = KIO::special( "trash:/", packedArgs );
- (void)KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( "trash:/", packedArgs );
+ (void)TDEIO::NetAccess::synchronousRun( job, 0 );
// Update konq windows opened on trash:/
KDirNotify_stub allDirNotify("*", "KDirNotify*");
@@ -68,8 +68,8 @@ int main(int argc, char *argv[])
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)2;
- KIO::Job* job = KIO::special( "trash:/", packedArgs );
- (void)KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( "trash:/", packedArgs );
+ (void)TDEIO::NetAccess::synchronousRun( job, 0 );
return 0;
}
#endif
@@ -91,10 +91,10 @@ int main(int argc, char *argv[])
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << trashURL;
- KIO::Job* job = KIO::special( trashURL, packedArgs );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( trashURL, packedArgs );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
if ( !ok )
- kdError() << KIO::NetAccess::lastErrorString() << endl;
+ kdError() << TDEIO::NetAccess::lastErrorString() << endl;
return 0;
}
diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp
index ef255e91d..e3d06a6d2 100644
--- a/kioslave/trash/testtrash.cpp
+++ b/kioslave/trash/testtrash.cpp
@@ -197,12 +197,12 @@ void TestTrash::setup()
// Start with a clean base dir
if ( TQFileInfo( homeTmpDir() ).exists() ) {
- bool ok = KIO::NetAccess::del( homeTmpDir(), 0 );
+ bool ok = TDEIO::NetAccess::del( homeTmpDir(), 0 );
if ( !ok )
kdFatal() << "Couldn't delete " << homeTmpDir() << endl;
}
if ( TQFileInfo( otherTmpDir() ).exists() ) {
- bool ok = KIO::NetAccess::del( otherTmpDir(), 0 );
+ bool ok = TDEIO::NetAccess::del( otherTmpDir(), 0 );
if ( !ok )
kdFatal() << "Couldn't delete " << otherTmpDir() << endl;
}
@@ -249,11 +249,11 @@ void TestTrash::cleanTrash()
removeFile( m_trashDir, "/info/trashDirFromOther.trashinfo" );
removeFile( m_trashDir, "/files/trashDirFromOther/testfile" );
removeDir( m_trashDir, "/files/trashDirFromOther" );
- KIO::NetAccess::del( m_trashDir + "/files/readonly", 0 );
+ TDEIO::NetAccess::del( m_trashDir + "/files/readonly", 0 );
// for trashDirectoryOwnedByRoot
- KIO::NetAccess::del( m_trashDir + "/files/cups", 0 );
- KIO::NetAccess::del( m_trashDir + "/files/boot", 0 );
- KIO::NetAccess::del( m_trashDir + "/files/etc", 0 );
+ TDEIO::NetAccess::del( m_trashDir + "/files/cups", 0 );
+ TDEIO::NetAccess::del( m_trashDir + "/files/boot", 0 );
+ TDEIO::NetAccess::del( m_trashDir + "/files/etc", 0 );
//system( "find ~/.local-testtrash/share/Trash" );
}
@@ -405,12 +405,12 @@ void TestTrash::trashFile( const TQString& origFilePath, const TQString& fileId
u.setPath( origFilePath );
// test
- KIO::Job* job = KIO::move( u, "trash:/" );
+ TDEIO::Job* job = TDEIO::move( u, "trash:/" );
TQMap<TQString, TQString> metaData;
- //bool ok = KIO::NetAccess::move( u, "trash:/" );
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ //bool ok = TDEIO::NetAccess::move( u, "trash:/" );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
if ( !ok )
- kdError() << "moving " << u << " to trash failed with error " << KIO::NetAccess::lastError() << " " << KIO::NetAccess::lastErrorString() << endl;
+ kdError() << "moving " << u << " to trash failed with error " << TDEIO::NetAccess::lastError() << " " << TDEIO::NetAccess::lastErrorString() << endl;
assert( ok );
if ( origFilePath.startsWith( "/tmp" ) && m_tmpIsWritablePartition ) {
kdDebug() << " TESTS SKIPPED" << endl;
@@ -512,9 +512,9 @@ void TestTrash::trashFileIntoOtherPartition()
u.setPath( origFilePath );
// test
- KIO::Job* job = KIO::move( u, "trash:/" );
+ TDEIO::Job* job = TDEIO::move( u, "trash:/" );
TQMap<TQString, TQString> metaData;
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( ok );
// Note that the Path stored in the info file is relative, on other partitions (#95652)
checkInfoFile( m_otherPartitionTrashDir + "/info/" + fileId + ".trashinfo", fileName );
@@ -550,13 +550,13 @@ void TestTrash::trashFileOwnedByRoot()
u.setPath( "/etc/passwd" );
const TQString fileId = "passwd";
- KIO::CopyJob* job = KIO::move( u, "trash:/" );
+ TDEIO::CopyJob* job = TDEIO::move( u, "trash:/" );
job->setInteractive( false ); // no skip dialog, thanks
TQMap<TQString, TQString> metaData;
- //bool ok = KIO::NetAccess::move( u, "trash:/" );
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ //bool ok = TDEIO::NetAccess::move( u, "trash:/" );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
- assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED );
const TQString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
assert( !TQFile::exists( infoPath ) );
@@ -577,7 +577,7 @@ void TestTrash::trashSymlink( const TQString& origFilePath, const TQString& file
u.setPath( origFilePath );
// test
- ok = KIO::NetAccess::move( u, "trash:/" );
+ ok = TDEIO::NetAccess::move( u, "trash:/" );
assert( ok );
if ( origFilePath.startsWith( "/tmp" ) && m_tmpIsWritablePartition ) {
kdDebug() << " TESTS SKIPPED" << endl;
@@ -625,7 +625,7 @@ void TestTrash::trashDirectory( const TQString& origPath, const TQString& fileId
KURL u; u.setPath( origPath );
// test
- bool ok = KIO::NetAccess::move( u, "trash:/" );
+ bool ok = TDEIO::NetAccess::move( u, "trash:/" );
assert( ok );
if ( origPath.startsWith( "/tmp" ) && m_tmpIsWritablePartition ) {
kdDebug() << " TESTS SKIPPED" << endl;
@@ -678,14 +678,14 @@ void TestTrash::trashDirectoryFromOther()
void TestTrash::tryRenameInsideTrash()
{
kdDebug() << k_funcinfo << " with file_move" << endl;
- bool worked = KIO::NetAccess::file_move( "trash:/0-tryRenameInsideTrash", "trash:/foobar" );
+ bool worked = TDEIO::NetAccess::file_move( "trash:/0-tryRenameInsideTrash", "trash:/foobar" );
assert( !worked );
- assert( KIO::NetAccess::lastError() == KIO::ERR_CANNOT_RENAME );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_CANNOT_RENAME );
kdDebug() << k_funcinfo << " with move" << endl;
- worked = KIO::NetAccess::move( "trash:/0-tryRenameInsideTrash", "trash:/foobar" );
+ worked = TDEIO::NetAccess::move( "trash:/0-tryRenameInsideTrash", "trash:/foobar" );
assert( !worked );
- assert( KIO::NetAccess::lastError() == KIO::ERR_CANNOT_RENAME );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_CANNOT_RENAME );
}
void TestTrash::delRootFile()
@@ -693,7 +693,7 @@ void TestTrash::delRootFile()
kdDebug() << k_funcinfo << endl;
// test deleting a trashed file
- bool ok = KIO::NetAccess::del( "trash:/0-fileFromHome", 0L );
+ bool ok = TDEIO::NetAccess::del( "trash:/0-fileFromHome", 0L );
assert( ok );
TQFileInfo file( m_trashDir + "/files/fileFromHome" );
@@ -711,9 +711,9 @@ void TestTrash::delFileInDirectory()
kdDebug() << k_funcinfo << endl;
// test deleting a file inside a trashed directory -> not allowed
- bool ok = KIO::NetAccess::del( "trash:/0-trashDirFromHome/testfile", 0L );
+ bool ok = TDEIO::NetAccess::del( "trash:/0-trashDirFromHome/testfile", 0L );
assert( !ok );
- assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED );
TQFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
assert( dir.exists() );
@@ -728,7 +728,7 @@ void TestTrash::delDirectory()
kdDebug() << k_funcinfo << endl;
// test deleting a trashed directory
- bool ok = KIO::NetAccess::del( "trash:/0-trashDirFromHome", 0L );
+ bool ok = TDEIO::NetAccess::del( "trash:/0-trashDirFromHome", 0L );
assert( ok );
TQFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
@@ -747,8 +747,8 @@ void TestTrash::statRoot()
{
kdDebug() << k_funcinfo << endl;
KURL url( "trash:/" );
- KIO::UDSEntry entry;
- bool ok = KIO::NetAccess::stat( url, entry, 0 );
+ TDEIO::UDSEntry entry;
+ bool ok = TDEIO::NetAccess::stat( url, entry, 0 );
assert( ok );
KFileItem item( entry, url );
assert( item.isDir() );
@@ -764,8 +764,8 @@ void TestTrash::statFileInRoot()
{
kdDebug() << k_funcinfo << endl;
KURL url( "trash:/0-fileFromHome" );
- KIO::UDSEntry entry;
- bool ok = KIO::NetAccess::stat( url, entry, 0 );
+ TDEIO::UDSEntry entry;
+ bool ok = TDEIO::NetAccess::stat( url, entry, 0 );
assert( ok );
KFileItem item( entry, url );
assert( item.isFile() );
@@ -782,8 +782,8 @@ void TestTrash::statDirectoryInRoot()
{
kdDebug() << k_funcinfo << endl;
KURL url( "trash:/0-trashDirFromHome" );
- KIO::UDSEntry entry;
- bool ok = KIO::NetAccess::stat( url, entry, 0 );
+ TDEIO::UDSEntry entry;
+ bool ok = TDEIO::NetAccess::stat( url, entry, 0 );
assert( ok );
KFileItem item( entry, url );
assert( item.isDir() );
@@ -799,8 +799,8 @@ void TestTrash::statSymlinkInRoot()
{
kdDebug() << k_funcinfo << endl;
KURL url( "trash:/0-symlinkFromHome" );
- KIO::UDSEntry entry;
- bool ok = KIO::NetAccess::stat( url, entry, 0 );
+ TDEIO::UDSEntry entry;
+ bool ok = TDEIO::NetAccess::stat( url, entry, 0 );
assert( ok );
KFileItem item( entry, url );
assert( item.isLink() );
@@ -816,8 +816,8 @@ void TestTrash::statFileInDirectory()
{
kdDebug() << k_funcinfo << endl;
KURL url( "trash:/0-trashDirFromHome/testfile" );
- KIO::UDSEntry entry;
- bool ok = KIO::NetAccess::stat( url, entry, 0 );
+ TDEIO::UDSEntry entry;
+ bool ok = TDEIO::NetAccess::stat( url, entry, 0 );
assert( ok );
KFileItem item( entry, url );
assert( item.isFile() );
@@ -837,12 +837,12 @@ void TestTrash::copyFromTrash( const TQString& fileId, const TQString& destPath,
KURL dest;
dest.setPath( destPath );
- assert( KIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
+ assert( TDEIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
// A dnd would use copy(), but we use copyAs to ensure the final filename
//kdDebug() << k_funcinfo << "copyAs:" << src << " -> " << dest << endl;
- KIO::Job* job = KIO::copyAs( src, dest );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::copyAs( src, dest );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
assert( TQFile::exists( infoFile ) );
@@ -895,11 +895,11 @@ void TestTrash::moveFromTrash( const TQString& fileId, const TQString& destPath,
KURL dest;
dest.setPath( destPath );
- assert( KIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
+ assert( TDEIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
// A dnd would use move(), but we use moveAs to ensure the final filename
- KIO::Job* job = KIO::moveAs( src, dest );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::moveAs( src, dest );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
assert( !TQFile::exists( infoFile ) );
@@ -956,14 +956,14 @@ void TestTrash::trashDirectoryOwnedByRoot()
const TQString fileId = u.path();
kdDebug() << k_funcinfo << "fileId=" << fileId << endl;
- KIO::CopyJob* job = KIO::move( u, "trash:/" );
+ TDEIO::CopyJob* job = TDEIO::move( u, "trash:/" );
job->setInteractive( false ); // no skip dialog, thanks
TQMap<TQString, TQString> metaData;
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
- const int err = KIO::NetAccess::lastError();
- assert( err == KIO::ERR_ACCESS_DENIED
- || err == KIO::ERR_CANNOT_OPEN_FOR_READING );
+ const int err = TDEIO::NetAccess::lastError();
+ assert( err == TDEIO::ERR_ACCESS_DENIED
+ || err == TDEIO::ERR_CANNOT_OPEN_FOR_READING );
const TQString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
assert( !TQFile::exists( infoPath ) );
@@ -988,7 +988,7 @@ void TestTrash::getFile()
const TQString fileId = "fileFromHome_1";
const KURL url = TrashImpl::makeURL( 0, fileId, TQString::null );
TQString tmpFile;
- bool ok = KIO::NetAccess::download( url, tmpFile, 0 );
+ bool ok = TDEIO::NetAccess::download( url, tmpFile, 0 );
assert( ok );
TQFile file( tmpFile );
ok = file.open( IO_ReadOnly );
@@ -998,7 +998,7 @@ void TestTrash::getFile()
if ( cstr != "Hello world\n" )
kdFatal() << "get() returned the following data:" << cstr << endl;
file.close();
- KIO::NetAccess::removeTempFile( tmpFile );
+ TDEIO::NetAccess::removeTempFile( tmpFile );
}
void TestTrash::restoreFile()
@@ -1015,8 +1015,8 @@ void TestTrash::restoreFile()
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
- KIO::Job* job = KIO::special( url, packedArgs );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( url, packedArgs );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
assert( !TQFile::exists( infoFile ) );
@@ -1042,11 +1042,11 @@ void TestTrash::restoreFileFromSubDir()
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
- KIO::Job* job = KIO::special( url, packedArgs );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( url, packedArgs );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( !ok );
// dest dir doesn't exist -> error message
- assert( KIO::NetAccess::lastError() == KIO::ERR_SLAVE_DEFINED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_SLAVE_DEFINED );
// check that nothing happened
assert( TQFile::exists( infoFile ) );
@@ -1062,7 +1062,7 @@ void TestTrash::restoreFileToDeletedDirectory()
removeFile( m_trashDir, "/files/fileFromHome" );
trashFileFromHome();
// Delete orig dir
- bool delOK = KIO::NetAccess::del( homeTmpDir(), 0 );
+ bool delOK = TDEIO::NetAccess::del( homeTmpDir(), 0 );
assert( delOK );
const TQString fileId = "fileFromHome";
@@ -1076,11 +1076,11 @@ void TestTrash::restoreFileToDeletedDirectory()
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
- KIO::Job* job = KIO::special( url, packedArgs );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( url, packedArgs );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( !ok );
// dest dir doesn't exist -> error message
- assert( KIO::NetAccess::lastError() == KIO::ERR_SLAVE_DEFINED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_SLAVE_DEFINED );
// check that nothing happened
assert( TQFile::exists( infoFile ) );
@@ -1095,10 +1095,10 @@ void TestTrash::listRootDir()
kdDebug() << k_funcinfo << endl;
m_entryCount = 0;
m_listResult.clear();
- KIO::ListJob* job = KIO::listDir( "trash:/" );
- connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::ListJob* job = TDEIO::listDir( "trash:/" );
+ connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
assert( m_entryCount > 1 );
@@ -1112,10 +1112,10 @@ void TestTrash::listRecursiveRootDir()
kdDebug() << k_funcinfo << endl;
m_entryCount = 0;
m_listResult.clear();
- KIO::ListJob* job = KIO::listRecursive( "trash:/" );
- connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::ListJob* job = TDEIO::listRecursive( "trash:/" );
+ connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
assert( m_entryCount > 1 );
@@ -1129,10 +1129,10 @@ void TestTrash::listSubDir()
kdDebug() << k_funcinfo << endl;
m_entryCount = 0;
m_listResult.clear();
- KIO::ListJob* job = KIO::listDir( "trash:/0-trashDirFromHome" );
- connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::ListJob* job = TDEIO::listDir( "trash:/0-trashDirFromHome" );
+ connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
assert( m_entryCount == 2 );
@@ -1142,18 +1142,18 @@ void TestTrash::listSubDir()
assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once
}
-void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
+void TestTrash::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst )
{
- for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
- KIO::UDSEntry::ConstIterator it2 = (*it).begin();
+ for( TDEIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ TDEIO::UDSEntry::ConstIterator it2 = (*it).begin();
TQString displayName;
KURL url;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
- case KIO::UDS_NAME:
+ case TDEIO::UDS_NAME:
displayName = (*it2).m_str;
break;
- case KIO::UDS_URL:
+ case TDEIO::UDS_URL:
url = (*it2).m_str;
break;
}
@@ -1177,8 +1177,8 @@ void TestTrash::emptyTrash()
TQByteArray packedArgs;
TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)1;
- KIO::Job* job = KIO::special( "trash:/", packedArgs );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::Job* job = TDEIO::special( "trash:/", packedArgs );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
KSimpleConfig cfg( "trashrc", true );
diff --git a/kioslave/trash/testtrash.h b/kioslave/trash/testtrash.h
index fd286c945..ebc217aac 100644
--- a/kioslave/trash/testtrash.h
+++ b/kioslave/trash/testtrash.h
@@ -88,7 +88,7 @@ public:
void emptyTrash();
private slots:
- void slotEntries( KIO::Job*, const KIO::UDSEntryList& );
+ void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& );
private:
void trashFile( const TQString& origFilePath, const TQString& fileId );
diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp
index 96888f9d5..3e109c119 100644
--- a/kioslave/trash/trashimpl.cpp
+++ b/kioslave/trash/trashimpl.cpp
@@ -97,7 +97,7 @@ int TrashImpl::testDir( const TQString &_name ) const
ok = false;
}
if ( !ok ) {
- return KIO::ERR_DIR_ALREADY_EXIST;
+ return TDEIO::ERR_DIR_ALREADY_EXIST;
}
#if 0
//} else {
@@ -109,7 +109,7 @@ int TrashImpl::testDir( const TQString &_name ) const
{
//KMessageBox::sorry( 0, i18n( "Couldn't create directory %1. Check for permissions." ).arg( name ) );
kdWarning() << "could not create " << name << endl;
- return KIO::ERR_COULD_NOT_MKDIR;
+ return TDEIO::ERR_COULD_NOT_MKDIR;
} else {
kdDebug() << name << " created." << endl;
}
@@ -201,9 +201,9 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
KDE_struct_stat buff_src;
if ( KDE_lstat( origPath_c.data(), &buff_src ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, origPath );
+ error( TDEIO::ERR_ACCESS_DENIED, origPath );
else
- error( KIO::ERR_DOES_NOT_EXIST, origPath );
+ error( TDEIO::ERR_DOES_NOT_EXIST, origPath );
return false;
}
@@ -231,10 +231,10 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
fd = ::open( TQFile::encodeName( url.path() ), O_WRONLY | O_CREAT | O_EXCL, 0600 );
if ( fd < 0 ) {
if ( errno == EEXIST ) {
- url.setFileName( KIO::RenameDlg::suggestName( baseDirectory, url.fileName() ) );
+ url.setFileName( TDEIO::RenameDlg::suggestName( baseDirectory, url.fileName() ) );
// and try again on the next iteration
} else {
- error( KIO::ERR_COULD_NOT_WRITE, url.path() );
+ error( TDEIO::ERR_COULD_NOT_WRITE, url.path() );
return false;
}
}
@@ -246,7 +246,7 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
FILE* file = ::fdopen( fd, "w" );
if ( !file ) { // can't see how this would happen
- error( KIO::ERR_COULD_NOT_WRITE, infoPath );
+ error( TDEIO::ERR_COULD_NOT_WRITE, infoPath );
return false;
}
@@ -270,7 +270,7 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
if ( written != sz ) {
::fclose( file );
TQFile::remove( infoPath );
- error( KIO::ERR_DISK_FULL, infoPath );
+ error( TDEIO::ERR_DISK_FULL, infoPath );
return false;
}
@@ -351,7 +351,7 @@ bool TrashImpl::moveFromTrash( const TQString& dest, int trashId, const TQString
bool TrashImpl::move( const TQString& src, const TQString& dest )
{
if ( directRename( src, dest ) ) {
- // This notification is done by KIO::moveAs when using the code below
+ // This notification is done by TDEIO::moveAs when using the code below
// But if we do a direct rename we need to do the notification ourselves
KDirNotify_stub allDirNotify( "*", "KDirNotify*" );
KURL urlDest; urlDest.setPath( dest );
@@ -359,25 +359,25 @@ bool TrashImpl::move( const TQString& src, const TQString& dest )
allDirNotify.FilesAdded( urlDest );
return true;
}
- if ( m_lastErrorCode != KIO::ERR_UNSUPPORTED_ACTION )
+ if ( m_lastErrorCode != TDEIO::ERR_UNSUPPORTED_ACTION )
return false;
KURL urlSrc, urlDest;
urlSrc.setPath( src );
urlDest.setPath( dest );
kdDebug() << k_funcinfo << urlSrc << " -> " << urlDest << endl;
- KIO::CopyJob* job = KIO::moveAs( urlSrc, urlDest, false );
+ TDEIO::CopyJob* job = TDEIO::moveAs( urlSrc, urlDest, false );
#ifdef KIO_COPYJOB_HAS_SETINTERACTIVE
job->setInteractive( false );
#endif
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( jobFinished(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( jobFinished(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
}
-void TrashImpl::jobFinished(KIO::Job* job)
+void TrashImpl::jobFinished(TDEIO::Job* job)
{
kdDebug() << k_funcinfo << " error=" << job->error() << endl;
error( job->error(), job->errorText() );
@@ -413,12 +413,12 @@ bool TrashImpl::copy( const TQString& src, const TQString& dest )
KURL urlDest;
urlDest.setPath( dest );
kdDebug() << k_funcinfo << "copying " << src << " to " << dest << endl;
- KIO::CopyJob* job = KIO::copyAs( urlSrc, urlDest, false );
+ TDEIO::CopyJob* job = TDEIO::copyAs( urlSrc, urlDest, false );
#ifdef KIO_COPYJOB_HAS_SETINTERACTIVE
job->setInteractive( false );
#endif
- connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
- this, TQT_SLOT( jobFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
+ this, TQT_SLOT( jobFinished( TDEIO::Job* ) ) );
tqApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
@@ -429,14 +429,14 @@ bool TrashImpl::directRename( const TQString& src, const TQString& dest )
kdDebug() << k_funcinfo << src << " -> " << dest << endl;
if ( ::rename( TQFile::encodeName( src ), TQFile::encodeName( dest ) ) != 0 ) {
if (errno == EXDEV) {
- error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename") );
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename") );
} else {
if (( errno == EACCES ) || (errno == EPERM)) {
- error( KIO::ERR_ACCESS_DENIED, dest );
+ error( TDEIO::ERR_ACCESS_DENIED, dest );
} else if (errno == EROFS) { // The file is on a read-only filesystem
- error( KIO::ERR_CANNOT_DELETE, src );
+ error( TDEIO::ERR_CANNOT_DELETE, src );
} else {
- error( KIO::ERR_CANNOT_RENAME, src );
+ error( TDEIO::ERR_CANNOT_RENAME, src );
}
}
return false;
@@ -450,13 +450,13 @@ bool TrashImpl::mkdir( int trashId, const TQString& fileId, int permissions )
const TQString path = filesPath( trashId, fileId );
if ( ::mkdir( TQFile::encodeName( path ), permissions ) != 0 ) {
if ( errno == EACCES ) {
- error( KIO::ERR_ACCESS_DENIED, path );
+ error( TDEIO::ERR_ACCESS_DENIED, path );
return false;
} else if ( errno == ENOSPC ) {
- error( KIO::ERR_DISK_FULL, path );
+ error( TDEIO::ERR_DISK_FULL, path );
return false;
} else {
- error( KIO::ERR_COULD_NOT_MKDIR, path );
+ error( TDEIO::ERR_COULD_NOT_MKDIR, path );
return false;
}
} else {
@@ -477,9 +477,9 @@ bool TrashImpl::del( int trashId, const TQString& fileId )
KDE_struct_stat buff;
if ( KDE_lstat( info_c.data(), &buff ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, file );
+ error( TDEIO::ERR_ACCESS_DENIED, file );
else
- error( KIO::ERR_DOES_NOT_EXIST, file );
+ error( TDEIO::ERR_DOES_NOT_EXIST, file );
return false;
}
@@ -505,16 +505,16 @@ bool TrashImpl::synchronousDel( const TQString& path, bool setLastErrorCode, boo
KFileItem fileItem( url, "inode/directory", KFileItem::Unknown );
KFileItemList fileItemList;
fileItemList.append( &fileItem );
- KIO::ChmodJob* chmodJob = KIO::chmod( fileItemList, 0200, 0200, TQString::null, TQString::null, true /*recursive*/, false /*showProgressInfo*/ );
- connect( chmodJob, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( jobFinished(KIO::Job *) ) );
+ TDEIO::ChmodJob* chmodJob = TDEIO::chmod( fileItemList, 0200, 0200, TQString::null, TQString::null, true /*recursive*/, false /*showProgressInfo*/ );
+ connect( chmodJob, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( jobFinished(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
}
kdDebug() << k_funcinfo << "deleting " << url << endl;
- KIO::DeleteJob *job = KIO::del( url, false, false );
- connect( job, TQT_SIGNAL( result(KIO::Job *) ),
- this, TQT_SLOT( jobFinished(KIO::Job *) ) );
+ TDEIO::DeleteJob *job = TDEIO::del( url, false, false );
+ connect( job, TQT_SIGNAL( result(TDEIO::Job *) ),
+ this, TQT_SLOT( jobFinished(TDEIO::Job *) ) );
tqApp->eventLoop()->enterLoop();
bool ok = m_lastErrorCode == 0;
if ( !setLastErrorCode ) {
@@ -615,7 +615,7 @@ bool TrashImpl::readInfoFile( const TQString& infoPath, TrashedFileInfo& info, i
{
KSimpleConfig cfg( infoPath, true );
if ( !cfg.hasGroup( "Trash Info" ) ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, infoPath );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, infoPath );
return false;
}
cfg.setGroup( "Trash Info" );
@@ -713,7 +713,7 @@ int TrashImpl::findTrashDirectory( const TQString& origPath )
&& buff.st_dev == m_homeDevice )
return 0;
- TQString mountPoint = KIO::findPathMountPoint( origPath );
+ TQString mountPoint = TDEIO::findPathMountPoint( origPath );
const TQString trashDir = trashForMountPoint( mountPoint, true );
kdDebug() << "mountPoint=" << mountPoint << " trashDir=" << trashDir << endl;
if ( trashDir.isEmpty() )
diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h
index fb34e5be0..366f8a869 100644
--- a/kioslave/trash/trashimpl.h
+++ b/kioslave/trash/trashimpl.h
@@ -149,7 +149,7 @@ private:
static TQString makeRelativePath( const TQString& topdir, const TQString& path );
private slots:
- void jobFinished(KIO::Job *job);
+ void jobFinished(TDEIO::Job *job);
private:
/// Last error code stored in class to simplify API.