diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kmail/kmfoldermaildir.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfoldermaildir.cpp')
-rw-r--r-- | kmail/kmfoldermaildir.cpp | 212 |
1 files changed, 106 insertions, 106 deletions
diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp index f13bb6761..bfb606f7e 100644 --- a/kmail/kmfoldermaildir.cpp +++ b/kmail/kmfoldermaildir.cpp @@ -6,8 +6,8 @@ #include <config.h> #endif -#include <qdir.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqregexp.h> #include <libkdepim/kfileio.h> #include "kmfoldermaildir.h" @@ -48,7 +48,7 @@ using KMail::MaildirJob; #endif // define the static member -QValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue; +TQValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue; //----------------------------------------------------------------------------- KMFolderMaildir::KMFolderMaildir(KMFolder* folder, const char* name) @@ -71,19 +71,19 @@ int KMFolderMaildir::canAccess() assert(!folder()->name().isEmpty()); - QString sBadFolderName; - if (access(QFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) { + TQString sBadFolderName; + if (access(TQFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location(); - } else if (access(QFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/new"; - } else if (access(QFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/cur"; - } else if (access(QFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/tmp"; } if ( !sBadFolderName.isEmpty() ) { - int nRetVal = QFile::exists(sBadFolderName) ? EPERM : ENOENT; + int nRetVal = TQFile::exists(sBadFolderName) ? EPERM : ENOENT; KCursorSaver idle(KBusyPtr::idle()); if ( nRetVal == ENOENT ) KMessageBox::sorry(0, i18n("Error opening %1; this folder is missing.") @@ -119,13 +119,13 @@ int KMFolderMaildir::open(const char *) { if (KMFolderIndex::IndexOk != indexStatus()) // test if contents file has changed { - QString str; + TQString str; mIndexStream = 0; str = i18n("Folder `%1' changed; recreating index.") .arg(name()); emit statusMsg(str); } else { - mIndexStream = fopen(QFile::encodeName(indexLocation()), "r+"); // index file + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "r+"); // index file if ( mIndexStream ) { fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC); updateIndexStreamPtr(); @@ -152,10 +152,10 @@ int KMFolderMaildir::open(const char *) //----------------------------------------------------------------------------- -int KMFolderMaildir::createMaildirFolders( const QString & folderPath ) +int KMFolderMaildir::createMaildirFolders( const TQString & folderPath ) { // Make sure that neither a new, cur or tmp subfolder exists already. - QFileInfo dirinfo; + TQFileInfo dirinfo; dirinfo.setFile( folderPath + "/new" ); if ( dirinfo.exists() ) return EEXIST; dirinfo.setFile( folderPath + "/cur" ); @@ -164,19 +164,19 @@ int KMFolderMaildir::createMaildirFolders( const QString & folderPath ) if ( dirinfo.exists() ) return EEXIST; // create the maildir directory structure - if ( ::mkdir( QFile::encodeName( folderPath ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/new" << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/cur" << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/tmp" << endl; return errno; } @@ -201,7 +201,7 @@ int KMFolderMaildir::create() if (!folder()->path().isEmpty()) { old_umask = umask(077); - mIndexStream = fopen(QFile::encodeName(indexLocation()), "w+"); //sven; open RW + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "w+"); //sven; open RW updateIndexStreamPtr(true); umask(old_umask); @@ -257,25 +257,25 @@ void KMFolderMaildir::sync() int KMFolderMaildir::expungeContents() { // nuke all messages in this folder now - QDir d(location() + "/new"); - // d.setFilter(QDir::Files); coolo: QFile::remove returns false for non-files - QStringList files(d.entryList()); - QStringList::ConstIterator it(files.begin()); + TQDir d(location() + "/new"); + // d.setFilter(TQDir::Files); coolo: TQFile::remove returns false for non-files + TQStringList files(d.entryList()); + TQStringList::ConstIterator it(files.begin()); for ( ; it != files.end(); ++it) - QFile::remove(d.filePath(*it)); + TQFile::remove(d.filePath(*it)); d.setPath(location() + "/cur"); files = d.entryList(); for (it = files.begin(); it != files.end(); ++it) - QFile::remove(d.filePath(*it)); + TQFile::remove(d.filePath(*it)); return 0; } -int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QStringList& entryList, bool& done ) +int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done ) { - QString subdirNew(location() + "/new/"); - QString subdirCur(location() + "/cur/"); + TQString subdirNew(location() + "/new/"); + TQString subdirCur(location() + "/cur/"); unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() : QMIN( mMsgList.count(), startIndex + nbMessages ); @@ -285,7 +285,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QSt if (!mi) continue; - QString filename(mi->fileName()); + TQString filename(mi->fileName()); if (filename.isEmpty()) continue; @@ -330,7 +330,7 @@ int KMFolderMaildir::compact( bool silent ) //------------------------------------------------------------- FolderJob* KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString, const AttachmentStrategy* ) const + KMFolder *folder, TQString, const AttachmentStrategy* ) const { MaildirJob *job = new MaildirJob( msg, jt, folder ); job->setParentFolder( this ); @@ -339,7 +339,7 @@ KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt, //------------------------------------------------------------- FolderJob* -KMFolderMaildir::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, +KMFolderMaildir::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { MaildirJob *job = new MaildirJob( msgList, sets, jt, folder ); @@ -359,9 +359,9 @@ int KMFolderMaildir::addMsgInternal( KMMessage* aMsg, int* index_return, bool stripUid ) { /* -QFile fileD0( "testdat_xx-kmfoldermaildir-0" ); +TQFile fileD0( "testdat_xx-kmfoldermaildir-0" ); if( fileD0.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD0 ); + TQDataStream ds( &fileD0 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD0.close(); // If data is 0 we just create a zero length file. } @@ -369,7 +369,7 @@ if( fileD0.open( IO_WriteOnly ) ) { long len; unsigned long size; KMFolder* msgParent; - QCString msgText; + TQCString msgText; int idx(-1); int rc; @@ -389,7 +389,7 @@ if( fileD0.open( IO_WriteOnly ) ) { aMsg->removeHeaderField("Content-Type"); // the line above - const QString uidHeader = aMsg->headerField( "X-UID" ); + const TQString uidHeader = aMsg->headerField( "X-UID" ); if ( !uidHeader.isEmpty() && stripUid ) aMsg->removeHeaderField( "X-UID" ); @@ -408,15 +408,15 @@ if( fileD0.open( IO_WriteOnly ) ) { } // make sure the filename has the correct extension - QString filename = constructValidFileName( aMsg->fileName(), aMsg->status() ); + TQString filename = constructValidFileName( aMsg->fileName(), aMsg->status() ); - QString tmp_file(location() + "/tmp/"); + TQString tmp_file(location() + "/tmp/"); tmp_file += filename; if (!KPIM::kCStringToFile(msgText, tmp_file, false, false, false)) kmkernel->emergencyExit( i18n("Message could not be added to the folder, possibly disk space is low.") ); - QFile file(tmp_file); + TQFile file(tmp_file); size = msgText.length(); KMFolderOpener openThis(folder(), "maildir"); @@ -428,7 +428,7 @@ if( fileD0.open( IO_WriteOnly ) ) { } // now move the file to the correct location - QString new_loc(location() + "/cur/"); + TQString new_loc(location() + "/cur/"); new_loc += filename; if (moveInternal(tmp_file, new_loc, filename, aMsg->status()).isNull()) { @@ -505,7 +505,7 @@ if( fileD0.open( IO_WriteOnly ) ) { kdDebug(5006) << "Error: Could not add message to folder (No space left on device?)" << endl; if (ftell(mIndexStream) > revert) { kdDebug(5006) << "Undoing changes" << endl; - truncate( QFile::encodeName(indexLocation()), revert ); + truncate( TQFile::encodeName(indexLocation()), revert ); } kmkernel->emergencyExit(i18n("KMFolderMaildir::addMsg: abnormally terminating to prevent data loss.")); // exit(1); // don't ever use exit(), use the above! @@ -530,9 +530,9 @@ if( fileD0.open( IO_WriteOnly ) ) { needsCompact = true; /* -QFile fileD1( "testdat_xx-kmfoldermaildir-1" ); +TQFile fileD1( "testdat_xx-kmfoldermaildir-1" ); if( fileD1.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD1 ); + TQDataStream ds( &fileD1 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD1.close(); // If data is 0 we just create a zero length file. } @@ -554,13 +554,13 @@ KMMessage* KMFolderMaildir::readMsg(int idx) DwString KMFolderMaildir::getDwString(int idx) { KMMsgInfo* mi = (KMMsgInfo*)mMsgList[idx]; - QString abs_file(location() + "/cur/"); + TQString abs_file(location() + "/cur/"); abs_file += mi->fileName(); - QFileInfo fi( abs_file ); + TQFileInfo fi( abs_file ); if (fi.exists() && fi.isFile() && fi.isWritable() && fi.size() > 0) { - FILE* stream = fopen(QFile::encodeName(abs_file), "r+"); + FILE* stream = fopen(TQFile::encodeName(abs_file), "r+"); if (stream) { size_t msgSize = fi.size(); char* msgText = new char[ msgSize + 1 ]; @@ -579,14 +579,14 @@ DwString KMFolderMaildir::getDwString(int idx) } -void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& file, KMMsgStatus status) +void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& file, KMMsgStatus status) { // we keep our current directory to restore it later char path_buffer[PATH_MAX]; if(!::getcwd(path_buffer, PATH_MAX - 1)) return; - ::chdir(QFile::encodeName(dir)); + ::chdir(TQFile::encodeName(dir)); // messages in the 'cur' directory are Read by default.. but may // actually be some other state (but not New) @@ -599,9 +599,9 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi } // open the file and get a pointer to it - QFile f(file); + TQFile f(file); if ( f.open( IO_ReadOnly ) == false ) { - kdWarning(5006) << "The file '" << QFile::encodeName(dir) << "/" << file + kdWarning(5006) << "The file '" << TQFile::encodeName(dir) << "/" << file << "' could not be opened for reading the message. " "Please check ownership and permissions." << endl; @@ -611,12 +611,12 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi char line[MAX_LINE]; bool atEof = false; bool inHeader = true; - QCString *lastStr = 0; + TQCString *lastStr = 0; - QCString dateStr, fromStr, toStr, subjStr; - QCString xmarkStr, replyToIdStr, msgIdStr, referencesStr; - QCString statusStr, replyToAuxIdStr, uidStr; - QCString contentTypeStr, charset; + TQCString dateStr, fromStr, toStr, subjStr; + TQCString xmarkStr, replyToIdStr, msgIdStr, referencesStr; + TQCString statusStr, replyToAuxIdStr, uidStr; + TQCString contentTypeStr, charset; // iterate through this file until done while (!atEof) @@ -734,8 +734,8 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi // if this is a New file and is in 'new', we move it to 'cur' if (status & KMMsgStatusNew) { - QString newDir(location() + "/new/"); - QString curDir(location() + "/cur/"); + TQString newDir(location() + "/new/"); + TQString curDir(location() + "/cur/"); moveInternal(newDir + file, curDir + file, mi); } @@ -764,55 +764,55 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi if (strncasecmp(line, "Date:", 5) == 0) { - dateStr = QCString(line+5); + dateStr = TQCString(line+5); lastStr = &dateStr; } else if (strncasecmp(line, "From:", 5) == 0) { - fromStr = QCString(line+5); + fromStr = TQCString(line+5); lastStr = &fromStr; } else if (strncasecmp(line, "To:", 3) == 0) { - toStr = QCString(line+3); + toStr = TQCString(line+3); lastStr = &toStr; } else if (strncasecmp(line, "Subject:", 8) == 0) { - subjStr = QCString(line+8); + subjStr = TQCString(line+8); lastStr = &subjStr; } else if (strncasecmp(line, "References:", 11) == 0) { - referencesStr = QCString(line+11); + referencesStr = TQCString(line+11); lastStr = &referencesStr; } else if (strncasecmp(line, "Message-Id:", 11) == 0) { - msgIdStr = QCString(line+11); + msgIdStr = TQCString(line+11); lastStr = &msgIdStr; } else if (strncasecmp(line, "X-KMail-Mark:", 13) == 0) { - xmarkStr = QCString(line+13); + xmarkStr = TQCString(line+13); } else if (strncasecmp(line, "X-Status:", 9) == 0) { - statusStr = QCString(line+9); + statusStr = TQCString(line+9); } else if (strncasecmp(line, "In-Reply-To:", 12) == 0) { - replyToIdStr = QCString(line+12); + replyToIdStr = TQCString(line+12); lastStr = &replyToIdStr; } else if (strncasecmp(line, "X-UID:", 6) == 0) { - uidStr = QCString(line+6); + uidStr = TQCString(line+6); lastStr = &uidStr; } else if (strncasecmp(line, "Content-Type:", 13) == 0) { - contentTypeStr = QCString(line+13); + contentTypeStr = TQCString(line+13); lastStr = &contentTypeStr; } @@ -839,7 +839,7 @@ int KMFolderMaildir::createIndexFromContents() // first, we make sure that all the directories are here as they // should be - QFileInfo dirinfo; + TQFileInfo dirinfo; dirinfo.setFile(location() + "/new"); if (!dirinfo.exists() || !dirinfo.isDir()) @@ -847,8 +847,8 @@ int KMFolderMaildir::createIndexFromContents() kdDebug(5006) << "Directory " << location() << "/new doesn't exist or is a file"<< endl; return 1; } - QDir newDir(location() + "/new"); - newDir.setFilter(QDir::Files); + TQDir newDir(location() + "/new"); + newDir.setFilter(TQDir::Files); dirinfo.setFile(location() + "/cur"); if (!dirinfo.exists() || !dirinfo.isDir()) @@ -856,13 +856,13 @@ int KMFolderMaildir::createIndexFromContents() kdDebug(5006) << "Directory " << location() << "/cur doesn't exist or is a file"<< endl; return 1; } - QDir curDir(location() + "/cur"); - curDir.setFilter(QDir::Files); + TQDir curDir(location() + "/cur"); + curDir.setFilter(TQDir::Files); // then, we look for all the 'cur' files const QFileInfoList *list = curDir.entryInfoList(); QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfo *fi; while ((fi = it.current())) { @@ -901,9 +901,9 @@ int KMFolderMaildir::createIndexFromContents() KMFolderIndex::IndexStatus KMFolderMaildir::indexStatus() { - QFileInfo new_info(location() + "/new"); - QFileInfo cur_info(location() + "/cur"); - QFileInfo index_info(indexLocation()); + TQFileInfo new_info(location() + "/new"); + TQFileInfo cur_info(location() + "/cur"); + TQFileInfo index_info(indexLocation()); if (!index_info.exists()) return KMFolderIndex::IndexMissing; @@ -946,19 +946,19 @@ KMMessage* KMFolderMaildir::take(int idx) } // static -bool KMFolderMaildir::removeFile( const QString & folderPath, - const QString & filename ) +bool KMFolderMaildir::removeFile( const TQString & folderPath, + const TQString & filename ) { // we need to look in both 'new' and 'cur' since it's possible to // delete a message before the folder is compacted. Since the file // naming and moving is done in ::compact, we can't assume any // location at this point. - QCString abs_file( QFile::encodeName( folderPath + "/cur/" + filename ) ); + TQCString abs_file( TQFile::encodeName( folderPath + "/cur/" + filename ) ); if ( ::unlink( abs_file ) == 0 ) return true; if ( errno == ENOENT ) { // doesn't exist - abs_file = QFile::encodeName( folderPath + "/new/" + filename ); + abs_file = TQFile::encodeName( folderPath + "/new/" + filename ); if ( ::unlink( abs_file ) == 0 ) return true; } @@ -967,24 +967,24 @@ bool KMFolderMaildir::removeFile( const QString & folderPath, return false; } -bool KMFolderMaildir::removeFile( const QString & filename ) +bool KMFolderMaildir::removeFile( const TQString & filename ) { return removeFile( location(), filename ); } #include <sys/types.h> #include <dirent.h> -static bool removeDirAndContentsRecursively( const QString & path ) +static bool removeDirAndContentsRecursively( const TQString & path ) { bool success = true; - QDir d; + TQDir d; d.setPath( path ); - d.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); + d.setFilter( TQDir::Files | TQDir::Dirs | TQDir::Hidden | TQDir::NoSymLinks ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { if( fi->isDir() ) { @@ -1013,22 +1013,22 @@ int KMFolderMaildir::removeContents() /* The subdirs are removed now. Check if there is anything else in the dir * and only if not delete the dir itself. The user could have data stored * that would otherwise be deleted. */ - QDir dir(location()); + TQDir dir(location()); if ( dir.count() == 2 ) { // only . and .. if ( !removeDirAndContentsRecursively( location() ), 0 ) return 1; } return 0; } -static QRegExp *suffix_regex = 0; -static KStaticDeleter<QRegExp> suffix_regex_sd; +static TQRegExp *suffix_regex = 0; +static KStaticDeleter<TQRegExp> suffix_regex_sd; //----------------------------------------------------------------------------- // static -QString KMFolderMaildir::constructValidFileName( const QString & filename, +TQString KMFolderMaildir::constructValidFileName( const TQString & filename, KMMsgStatus status ) { - QString aFileName( filename ); + TQString aFileName( filename ); if (aFileName.isEmpty()) { @@ -1037,14 +1037,14 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename, } if (!suffix_regex) - suffix_regex_sd.setObject(suffix_regex, new QRegExp(":2,?R?S?$")); + suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$")); aFileName.truncate(aFileName.findRev(*suffix_regex)); // only add status suffix if the message is neither new nor unread if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) ) { - QString suffix( ":2," ); + TQString suffix( ":2," ); if (status & KMMsgStatusReplied) suffix += "RS"; else @@ -1056,10 +1056,10 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename, } //----------------------------------------------------------------------------- -QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, KMMsgInfo *mi) +TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, KMMsgInfo *mi) { - QString filename(mi->fileName()); - QString ret(moveInternal(oldLoc, newLoc, filename, mi->status())); + TQString filename(mi->fileName()); + TQString ret(moveInternal(oldLoc, newLoc, filename, mi->status())); if (filename != mi->fileName()) mi->setFileName(filename); @@ -1068,22 +1068,22 @@ QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newL } //----------------------------------------------------------------------------- -QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, QString& aFileName, KMMsgStatus status) +TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status) { - QString dest(newLoc); + TQString dest(newLoc); // make sure that our destination filename doesn't already exist - while (QFile::exists(dest)) + while (TQFile::exists(dest)) { - aFileName = constructValidFileName( QString(), status ); + aFileName = constructValidFileName( TQString(), status ); - QFileInfo fi(dest); + TQFileInfo fi(dest); dest = fi.dirPath(true) + "/" + aFileName; setDirty( true ); } - QDir d; + TQDir d; if (d.rename(oldLoc, dest) == false) - return QString::null; + return TQString::null; else return dest; } @@ -1116,7 +1116,7 @@ Q_INT64 KMFolderMaildir::doFolderSize() const item = new KFileItem( S_IFDIR, -1, location() + "/tmp" ); list.append( item ); s_DirSizeJobQueue.append( - qMakePair( QGuardedPtr<const KMFolderMaildir>( this ), list ) ); + qMakePair( TQGuardedPtr<const KMFolderMaildir>( this ), list ) ); // if there's only one entry in the queue then we can start // a dirSizeJob right away @@ -1125,8 +1125,8 @@ Q_INT64 KMFolderMaildir::doFolderSize() const //kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder " // << location() << endl; KDirSize* job = KDirSize::dirSizeJob( list ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); } return -1; @@ -1157,8 +1157,8 @@ void KMFolderMaildir::slotDirSizeJobResult( KIO::Job* job ) //kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder " // << entry.first->location() << endl; KDirSize* job = KDirSize::dirSizeJob( entry.second ); - connect( job, SIGNAL( result( KIO::Job* ) ), - entry.first, SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + entry.first, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); break; } else |