summaryrefslogtreecommitdiffstats
path: root/kmail/compactionjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/compactionjob.cpp')
-rw-r--r--kmail/compactionjob.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kmail/compactionjob.cpp b/kmail/compactionjob.cpp
index 1b9c143b4..243a17537 100644
--- a/kmail/compactionjob.cpp
+++ b/kmail/compactionjob.cpp
@@ -35,9 +35,9 @@ using KPIM::BroadcastStatus;
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -71,14 +71,14 @@ void MboxCompactionJob::kill()
fclose( mTmpFile );
mTmpFile = 0;
if ( !mTempName.isEmpty() )
- QFile::remove( mTempName );
+ TQFile::remove( mTempName );
FolderJob::kill();
}
-QString MboxCompactionJob::realLocation() const
+TQString MboxCompactionJob::realLocation() const
{
- QString location = mSrcFolder->location();
- QFileInfo inf( location );
+ TQString location = mSrcFolder->location();
+ TQFileInfo inf( location );
if (inf.isSymLink()) {
KURL u; u.setPath( location );
// follow (and resolve) symlinks so that the final ::rename() always works
@@ -96,7 +96,7 @@ int MboxCompactionJob::executeNow( bool silent )
if (!storage->compactable()) {
kdDebug(5006) << storage->location() << " compaction skipped." << endl;
if ( !mSilent ) {
- QString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() );
+ TQString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() );
BroadcastStatus::instance()->setStatusMsg( str );
}
return 0;
@@ -109,13 +109,13 @@ int MboxCompactionJob::executeNow( bool silent )
// exit(1); backed out due to broken nfs
}
- const QFileInfo pathInfo( realLocation() );
+ const TQFileInfo pathInfo( realLocation() );
// Use /dir/.mailboxname.compacted so that it's hidden, and doesn't show up after restarting kmail
// (e.g. due to an unfortunate crash while compaction is happening)
mTempName = pathInfo.dirPath() + "/." + pathInfo.fileName() + ".compacted";
mode_t old_umask = umask(077);
- mTmpFile = fopen(QFile::encodeName(mTempName), "w");
+ mTmpFile = fopen(TQFile::encodeName(mTempName), "w");
umask(old_umask);
if (!mTmpFile) {
kdWarning(5006) << "Couldn't start compacting " << mSrcFolder->label()
@@ -131,7 +131,7 @@ int MboxCompactionJob::executeNow( bool silent )
mCurrentIndex = 0;
kdDebug(5006) << "MboxCompactionJob: starting to compact folder " << mSrcFolder->location() << " into " << mTempName << endl;
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) );
if ( !mImmediate )
mTimer.start( COMPACTIONJOB_TIMERINTERVAL );
slotDoWork();
@@ -162,11 +162,11 @@ void MboxCompactionJob::done( int rc )
if (!rc)
rc = fsync(fileno(mTmpFile));
rc |= fclose(mTmpFile);
- QString str;
+ TQString str;
if (!rc) {
bool autoCreate = mbox->autoCreateIndex();
- QString box( realLocation() );
- ::rename(QFile::encodeName(mTempName), QFile::encodeName(box));
+ TQString box( realLocation() );
+ ::rename(TQFile::encodeName(mTempName), TQFile::encodeName(box));
mbox->writeIndex();
mbox->writeConfig();
mbox->setAutoCreateIndex( false );
@@ -180,7 +180,7 @@ void MboxCompactionJob::done( int rc )
str = i18n( "Error occurred while compacting \"%1\". Compaction aborted." ).arg( mSrcFolder->label() );
kdDebug(5006) << "Error occurred while compacting " << mbox->location() << endl;
kdDebug(5006) << "Compaction aborted." << endl;
- QFile::remove( mTempName );
+ TQFile::remove( mTempName );
}
mErrorCode = rc;
@@ -223,13 +223,13 @@ int MaildirCompactionJob::executeNow( bool silent )
storage->open("maildircompact");
mOpeningFolder = false;
mFolderOpen = true;
- QString subdirNew(storage->location() + "/new/");
- QDir d(subdirNew);
+ TQString subdirNew(storage->location() + "/new/");
+ TQDir d(subdirNew);
mEntryList = d.entryList();
mCurrentIndex = 0;
kdDebug(5006) << "MaildirCompactionJob: starting to compact in folder " << mSrcFolder->location() << endl;
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) );
if ( !mImmediate )
mTimer.start( COMPACTIONJOB_TIMERINTERVAL );
slotDoWork();
@@ -254,7 +254,7 @@ void MaildirCompactionJob::done( int rc )
KMFolderMaildir* storage = static_cast<KMFolderMaildir *>( mSrcFolder->storage() );
mTimer.stop();
mCancellable = false;
- QString str;
+ TQString str;
if ( !rc ) {
str = i18n( "Folder \"%1\" successfully compacted" ).arg( mSrcFolder->label() );
} else {