From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/kmfolderindex.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kmail/kmfolderindex.cpp') diff --git a/kmail/kmfolderindex.cpp b/kmail/kmfolderindex.cpp index a76b74f53..6a3781570 100644 --- a/kmail/kmfolderindex.cpp +++ b/kmail/kmfolderindex.cpp @@ -19,8 +19,8 @@ #include "kmfolderindex.h" #include "kmfolder.h" #include -#include -#include +#include +#include #include @@ -90,9 +90,9 @@ KMFolderIndex::~KMFolderIndex() } -QString KMFolderIndex::indexLocation() const +TQString KMFolderIndex::indexLocation() const { - QString sLocation(folder()->path()); + TQString sLocation(folder()->path()); if ( !sLocation.isEmpty() ) { sLocation += '/'; @@ -122,22 +122,22 @@ int KMFolderIndex::updateIndex() int KMFolderIndex::writeIndex( bool createEmptyIndex ) { - QString tempName; - QString indexName; + TQString tempName; + TQString indexName; mode_t old_umask; int len; const uchar *buffer = 0; indexName = indexLocation(); tempName = indexName + ".temp"; - unlink(QFile::encodeName(tempName)); + unlink(TQFile::encodeName(tempName)); // We touch the folder, otherwise the index is regenerated, if KMail is // running, while the clock switches from daylight savings time to normal time - utime(QFile::encodeName(location()), 0); + utime(TQFile::encodeName(location()), 0); old_umask = umask(077); - FILE *tmpIndexStream = fopen(QFile::encodeName(tempName), "w"); + FILE *tmpIndexStream = fopen(TQFile::encodeName(tempName), "w"); umask(old_umask); if (!tmpIndexStream) return errno; @@ -189,7 +189,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex ) if( fclose( tmpIndexStream ) != 0 ) return errno; - ::rename(QFile::encodeName(tempName), QFile::encodeName(indexName)); + ::rename(TQFile::encodeName(tempName), TQFile::encodeName(indexName)); mHeaderOffset = nho; if (mIndexStream) fclose(mIndexStream); @@ -197,7 +197,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex ) if ( createEmptyIndex ) return 0; - mIndexStream = fopen(QFile::encodeName(indexName), "r+"); // index file + mIndexStream = fopen(TQFile::encodeName(indexName), "r+"); // index file assert( mIndexStream ); fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC); @@ -247,7 +247,7 @@ bool KMFolderIndex::readIndex() } else { - QCString line(MAX_LINE); + TQCString line(MAX_LINE); fgets(line.data(), MAX_LINE, mIndexStream); if (feof(mIndexStream)) break; if (*line.data() == '\0') { @@ -334,7 +334,7 @@ bool KMFolderIndex::readIndexHeader(int *gv) "The mail index for '%1' is from an unknown version of KMail (%2).\n" "This index can be regenerated from your mail folder, but some " "information, including status flags, may be lost. Do you wish " - "to downgrade your index file?") .arg(name()) .arg(indexVersion), QString::null, i18n("Downgrade"), i18n("Do Not Downgrade") ); + "to downgrade your index file?") .arg(name()) .arg(indexVersion), TQString::null, i18n("Downgrade"), i18n("Do Not Downgrade") ); kapp->restoreOverrideCursor(); if (r == KMessageBox::Yes) createIndexFromContents(); @@ -394,9 +394,9 @@ bool KMFolderIndex::updateIndexStreamPtr(bool) { // We touch the folder, otherwise the index is regenerated, if KMail is // running, while the clock switches from daylight savings time to normal time - utime(QFile::encodeName(location()), 0); - utime(QFile::encodeName(indexLocation()), 0); - utime(QFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0); + utime(TQFile::encodeName(location()), 0); + utime(TQFile::encodeName(indexLocation()), 0); + utime(TQFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0); mIndexSwapByteOrder = false; #ifdef HAVE_MMAP @@ -434,8 +434,8 @@ bool KMFolderIndex::updateIndexStreamPtr(bool) KMFolderIndex::IndexStatus KMFolderIndex::indexStatus() { - QFileInfo contInfo(location()); - QFileInfo indInfo(indexLocation()); + TQFileInfo contInfo(location()); + TQFileInfo indInfo(indexLocation()); if (!contInfo.exists()) return KMFolderIndex::IndexOk; if (!indInfo.exists()) return KMFolderIndex::IndexMissing; @@ -454,7 +454,7 @@ void KMFolderIndex::clearIndex(bool autoDelete, bool syncDict) void KMFolderIndex::truncateIndex() { if ( mHeaderOffset ) - truncate(QFile::encodeName(indexLocation()), mHeaderOffset); + truncate(TQFile::encodeName(indexLocation()), mHeaderOffset); else // The index file wasn't opened, so we don't know the header offset. // So let's just create a new empty index. -- cgit v1.2.1