summaryrefslogtreecommitdiffstats
path: root/kmail/kmfolderindex.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmail/kmfolderindex.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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/kmfolderindex.cpp')
-rw-r--r--kmail/kmfolderindex.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kmail/kmfolderindex.cpp b/kmail/kmfolderindex.cpp
index a76b74f5..6a378157 100644
--- a/kmail/kmfolderindex.cpp
+++ b/kmail/kmfolderindex.cpp
@@ -19,8 +19,8 @@
#include "kmfolderindex.h"
#include "kmfolder.h"
#include <config.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -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.