summaryrefslogtreecommitdiffstats
path: root/kioslave/trash/trashimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/trash/trashimpl.h')
-rw-r--r--kioslave/trash/trashimpl.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h
index 2b16ec67e..027864456 100644
--- a/kioslave/trash/trashimpl.h
+++ b/kioslave/trash/trashimpl.h
@@ -23,11 +23,11 @@
#include <kio/jobclasses.h>
#include <ksimpleconfig.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qvaluelist.h>
-#include <qstrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
+#include <tqstrlist.h>
#include <assert.h>
/**
@@ -47,29 +47,29 @@ public:
/// Create info for a file to be trashed
/// Returns trashId and fileId
/// The caller is then responsible for actually trashing the file
- bool createInfo( const QString& origPath, int& trashId, QString& fileId );
+ bool createInfo( const TQString& origPath, int& trashId, TQString& fileId );
/// Delete info file for a file to be trashed
/// Usually used for undoing what createInfo did if trashing failed
- bool deleteInfo( int trashId, const QString& fileId );
+ bool deleteInfo( int trashId, const TQString& fileId );
/// Moving a file or directory into the trash. The ids come from createInfo.
- bool moveToTrash( const QString& origPath, int trashId, const QString& fileId );
+ bool moveToTrash( const TQString& origPath, int trashId, const TQString& fileId );
/// Moving a file or directory out of the trash. The ids come from createInfo.
- bool moveFromTrash( const QString& origPath, int trashId, const QString& fileId, const QString& relativePath );
+ bool moveFromTrash( const TQString& origPath, int trashId, const TQString& fileId, const TQString& relativePath );
/// Copying a file or directory into the trash. The ids come from createInfo.
- bool copyToTrash( const QString& origPath, int trashId, const QString& fileId );
+ bool copyToTrash( const TQString& origPath, int trashId, const TQString& fileId );
/// Copying a file or directory out of the trash. The ids come from createInfo.
- bool copyFromTrash( const QString& origPath, int trashId, const QString& fileId, const QString& relativePath );
+ bool copyFromTrash( const TQString& origPath, int trashId, const TQString& fileId, const TQString& relativePath );
/// Create a top-level trashed directory
- //bool mkdir( int trashId, const QString& fileId, int permissions );
+ //bool mkdir( int trashId, const TQString& fileId, int permissions );
/// Get rid of a trashed file
- bool del( int trashId, const QString& fileId );
+ bool del( int trashId, const TQString& fileId );
/// Empty trash, i.e. delete all trashed files
bool emptyTrash();
@@ -79,35 +79,35 @@ public:
struct TrashedFileInfo {
int trashId; // for the url
- QString fileId; // for the url
- QString physicalPath; // for stat'ing etc.
- QString origPath; // from info file
- QDateTime deletionDate; // from info file
+ TQString fileId; // for the url
+ TQString physicalPath; // for stat'ing etc.
+ TQString origPath; // from info file
+ TQDateTime deletionDate; // from info file
};
/// List trashed files
- typedef QValueList<TrashedFileInfo> TrashedFileInfoList;
+ typedef TQValueList<TrashedFileInfo> TrashedFileInfoList;
TrashedFileInfoList list();
/// Return the info for a given trashed file
- bool infoForFile( int trashId, const QString& fileId, TrashedFileInfo& info );
+ bool infoForFile( int trashId, const TQString& fileId, TrashedFileInfo& info );
/// Return the physicalPath for a given trashed file - helper method which
/// encapsulates the call to infoForFile. Don't use if you need more info from TrashedFileInfo.
- QString physicalPath( int trashId, const QString& fileId, const QString& relativePath );
+ TQString physicalPath( int trashId, const TQString& fileId, const TQString& relativePath );
/// Move data from the old trash system to the new one
void migrateOldTrash();
/// KIO error code
int lastErrorCode() const { return m_lastErrorCode; }
- QString lastErrorMessage() const { return m_lastErrorMessage; }
+ TQString lastErrorMessage() const { return m_lastErrorMessage; }
- QStrList listDir( const QString& physicalPath );
+ TQStrList listDir( const TQString& physicalPath );
- static KURL makeURL( int trashId, const QString& fileId, const QString& relativePath );
- static bool parseURL( const KURL& url, int& trashId, QString& fileId, QString& relativePath );
+ static KURL makeURL( int trashId, const TQString& fileId, const TQString& relativePath );
+ static bool parseURL( const KURL& url, int& trashId, TQString& fileId, TQString& relativePath );
- typedef QMap<int, QString> TrashDirMap;
+ typedef TQMap<int, TQString> TrashDirMap;
/// @internal This method is for TestTrash only. Home trash is included (id 0).
TrashDirMap trashDirectories() const;
/// @internal This method is for TestTrash only. No entry with id 0.
@@ -115,38 +115,38 @@ public:
private:
/// Helper method. Moves a file or directory using the appropriate method.
- bool move( const QString& src, const QString& dest );
- bool copy( const QString& src, const QString& dest );
+ bool move( const TQString& src, const TQString& dest );
+ bool copy( const TQString& src, const TQString& dest );
/// Helper method. Tries to call ::rename(src,dest) and does error handling.
- bool directRename( const QString& src, const QString& dest );
+ bool directRename( const TQString& src, const TQString& dest );
void fileAdded();
void fileRemoved();
// Warning, returns error code, not a bool
- int testDir( const QString& name ) const;
- void error( int e, const QString& s );
+ int testDir( const TQString& name ) const;
+ void error( int e, const TQString& s );
- bool readInfoFile( const QString& infoPath, TrashedFileInfo& info, int trashId );
+ bool readInfoFile( const TQString& infoPath, TrashedFileInfo& info, int trashId );
- QString infoPath( int trashId, const QString& fileId ) const;
- QString filesPath( int trashId, const QString& fileId ) const;
+ TQString infoPath( int trashId, const TQString& fileId ) const;
+ TQString filesPath( int trashId, const TQString& fileId ) const;
/// Find the trash dir to use for a given file to delete, based on original path
- int findTrashDirectory( const QString& origPath );
+ int findTrashDirectory( const TQString& origPath );
- QString trashDirectoryPath( int trashId ) const;
- QString topDirectoryPath( int trashId ) const;
+ TQString trashDirectoryPath( int trashId ) const;
+ TQString topDirectoryPath( int trashId ) const;
- bool synchronousDel( const QString& path, bool setLastErrorCode, bool isDir );
+ bool synchronousDel( const TQString& path, bool setLastErrorCode, bool isDir );
void scanTrashDirectories() const;
- int idForTrashDirectory( const QString& trashDir ) const;
- bool initTrashDirectory( const QCString& trashDir_c ) const;
- bool checkTrashSubdirs( const QCString& trashDir_c ) const;
- QString trashForMountPoint( const QString& topdir, bool createIfNeeded ) const;
- static QString makeRelativePath( const QString& topdir, const QString& path );
+ int idForTrashDirectory( const TQString& trashDir ) const;
+ bool initTrashDirectory( const TQCString& trashDir_c ) const;
+ bool checkTrashSubdirs( const TQCString& trashDir_c ) const;
+ TQString trashForMountPoint( const TQString& topdir, bool createIfNeeded ) const;
+ static TQString makeRelativePath( const TQString& topdir, const TQString& path );
private slots:
void jobFinished(KIO::Job *job);
@@ -155,7 +155,7 @@ private:
/// Last error code stored in class to simplify API.
/// Note that this means almost no method can be const.
int m_lastErrorCode;
- QString m_lastErrorMessage;
+ TQString m_lastErrorMessage;
enum { InitToBeDone, InitOK, InitError } m_initStatus;