summaryrefslogtreecommitdiffstats
path: root/kmail/kmfoldermbox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/kmfoldermbox.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfoldermbox.cpp')
-rw-r--r--kmail/kmfoldermbox.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp
index 025a9d71d..287ce5766 100644
--- a/kmail/kmfoldermbox.cpp
+++ b/kmail/kmfoldermbox.cpp
@@ -55,7 +55,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#include "broadcaststatus.h"
-using KPIM::BroadcasStatus;
+using KPIM::BroadcastqStatus;
#ifndef MAX_LINE
#define MAX_LINE 4096
@@ -119,7 +119,7 @@ int KMFolderMbox::open(const char *owner)
if (!folder()->path().isEmpty())
{
- KMFolderIndex::IndexStatus index_status = indexStatus();
+ KMFolderIndex::IndextqStatus index_status = indextqStatus();
// test if index file exists and is up-to-date
if (KMFolderIndex::IndexOk != index_status)
{
@@ -262,7 +262,7 @@ void KMFolderMbox::reallyDoClose(const char* owner)
Q_UNUSED( owner );
if (mAutoCreateIndex)
{
- if (KMFolderIndex::IndexOk != indexStatus()) {
+ if (KMFolderIndex::IndexOk != indextqStatus()) {
kdDebug(5006) << "Critical error: " << location() <<
" has been modified by an external application while KMail was running." << endl;
// exit(1); backed out due to broken nfs
@@ -521,7 +521,7 @@ int KMFolderMbox::unlock()
//-----------------------------------------------------------------------------
-KMFolderIndex::IndexStatus KMFolderMbox::indexStatus()
+KMFolderIndex::IndextqStatus KMFolderMbox::indextqStatus()
{
if ( !mCompactable )
return KMFolderIndex::IndexCorrupt;
@@ -555,8 +555,8 @@ int KMFolderMbox::createIndexFromContents()
KMMsgInfo* mi;
TQString msgStr;
TQRegExp regexp(MSG_SEPERATOR_REGEX);
- int i, num, numStatus;
- short needStatus;
+ int i, num, numtqStatus;
+ short needtqStatus;
assert(mStream != 0);
rewind(mStream);
@@ -564,7 +564,7 @@ int KMFolderMbox::createIndexFromContents()
mMsgList.clear();
num = -1;
- numStatus= 11;
+ numtqStatus= 11;
off_t offs = 0;
size_t size = 0;
dateStr = "";
@@ -578,7 +578,7 @@ int KMFolderMbox::createIndexFromContents()
replyToAuxIdStr = "";
referencesStr = "";
msgIdStr = "";
- needStatus = 3;
+ needtqStatus = 3;
size_t sizeServer = 0;
ulong uid = 0;
@@ -597,11 +597,11 @@ int KMFolderMbox::createIndexFromContents()
if (num >= 0)
{
- if (numStatus <= 0)
+ if (numtqStatus <= 0)
{
msgStr = i18n("Creating index file: one message done", "Creating index file: %n messages done", num);
emit statusMsg(msgStr);
- numStatus = 10;
+ numtqStatus = 10;
}
if (size > 0)
@@ -609,7 +609,7 @@ int KMFolderMbox::createIndexFromContents()
msgIdStr = msgIdStr.stripWhiteSpace();
if( !msgIdStr.isEmpty() ) {
int rightAngle;
- rightAngle = msgIdStr.find( '>' );
+ rightAngle = msgIdStr.tqfind( '>' );
if( rightAngle != -1 )
msgIdStr.truncate( rightAngle + 1 );
}
@@ -617,7 +617,7 @@ int KMFolderMbox::createIndexFromContents()
replyToIdStr = replyToIdStr.stripWhiteSpace();
if( !replyToIdStr.isEmpty() ) {
int rightAngle;
- rightAngle = replyToIdStr.find( '>' );
+ rightAngle = replyToIdStr.tqfind( '>' );
if( rightAngle != -1 )
replyToIdStr.truncate( rightAngle + 1 );
}
@@ -645,7 +645,7 @@ int KMFolderMbox::createIndexFromContents()
// message In-Reply-To points to is not kept in this folder,
// but e.g. in an Outbox
replyToAuxIdStr = referencesStr;
- rightAngle = referencesStr.find( '>' );
+ rightAngle = referencesStr.tqfind( '>' );
if( rightAngle != -1 )
replyToAuxIdStr.truncate( rightAngle + 1 );
}
@@ -654,7 +654,7 @@ int KMFolderMbox::createIndexFromContents()
charset = "";
if ( !contentTypeStr.isEmpty() )
{
- int cidx = contentTypeStr.find( "charset=" );
+ int cidx = contentTypeStr.tqfind( "charset=" );
if ( cidx != -1 ) {
charset = contentTypeStr.mid( cidx + 8 );
if ( !charset.isEmpty() && ( charset[0] == '"' ) ) {
@@ -682,14 +682,14 @@ int KMFolderMbox::createIndexFromContents()
replyToIdStr, replyToAuxIdStr, msgIdStr,
KMMsgEncryptionStateUnknown, KMMsgSignatureStateUnknown,
KMMsgMDNStateUnknown, charset, offs, size, sizeServer, uid );
- mi->seStatus(status, xstatus);
+ mi->setqStatus(status, xstatus);
mi->setDate( dateStr.stripWhiteSpace() );
mi->setDirty(false);
mMsgList.append(mi, mExportsSernums );
*status = '\0';
*xstatus = '\0';
- needStatus = 3;
+ needtqStatus = 3;
xmarkStr = "";
replyToIdStr = "";
replyToAuxIdStr = "";
@@ -701,12 +701,12 @@ int KMFolderMbox::createIndexFromContents()
sizeServer = 0;
uid = 0;
}
- else num--,numStatus++;
+ else num--,numtqStatus++;
}
offs = ftell(mStream);
num++;
- numStatus--;
+ numtqStatus--;
inHeader = true;
continue;
}
@@ -727,19 +727,19 @@ int KMFolderMbox::createIndexFromContents()
/* -sanders Make all messages read when auto-recreating index */
/* Reverted, as it breaks reading the sent mail status, for example.
-till */
- if ((needStatus & 1) && strncasecmp(line, "Status:", 7) == 0)
+ if ((needtqStatus & 1) && strncasecmp(line, "tqStatus:", 7) == 0)
{
for(i=0; i<4 && line[i+8] > ' '; i++)
status[i] = line[i+8];
status[i] = '\0';
- needStatus &= ~1;
+ needtqStatus &= ~1;
}
- else if ((needStatus & 2) && strncasecmp(line, "X-Status:", 9)==0)
+ else if ((needtqStatus & 2) && strncasecmp(line, "X-tqStatus:", 9)==0)
{
for(i=0; i<4 && line[i+10] > ' '; i++)
xstatus[i] = line[i+10];
xstatus[i] = '\0';
- needStatus &= ~2;
+ needtqStatus &= ~2;
}
else if (strncasecmp(line,"X-KMail-Mark:",13)==0)
xmarkStr = TQCString(line+13);
@@ -805,7 +805,7 @@ int KMFolderMbox::createIndexFromContents()
if (kmkernel->outboxFolder() == folder() && count() > 0)
KMessageBox::queuedMessageBox(0, KMessageBox::Information,
- i18n("Your outbox tqcontains messages which were "
+ i18n("Your outbox contains messages which were "
"most-likely not created by KMail;\nplease remove them from there if you "
"do not want KMail to send them."));
@@ -950,7 +950,7 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret )
}
// take message out of the folder it is currently in, if any
- msgParent = aMsg->parent();
+ msgParent = aMsg->tqparent();
if (msgParent)
{
if ( msgParent== folder() )
@@ -965,7 +965,7 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret )
return 0;
}
- idx = msgParent->find(aMsg);
+ idx = msgParent->tqfind(aMsg);
msgParent->getMsg( idx );
}
@@ -998,7 +998,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
clearerr(mStream);
if (len <= 0)
{
- kdDebug(5006) << "Message added to folder `" << name() << "' tqcontains no data. Ignoring it." << endl;
+ kdDebug(5006) << "Message added to folder `" << name() << "' contains no data. Ignoring it." << endl;
return 0;
}
@@ -1047,7 +1047,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
if (busy) kmkernel->kbp()->idle();
KMessageBox::sorry(0,
i18n("Unable to add message to folder.\n"
- "(No space left on device or insufficient quota?)\n"
+ "(No space left on tqdevice or insufficient quota?)\n"
"Free space and sufficient quota are required to continue safely."));
if (busy) kmkernel->kbp()->busy();
kmkernel->kbp()->idle();
@@ -1085,7 +1085,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
if ( aMsg->getMsgSerNum() <= 0 )
aMsg->setMsgSerNum();
else
- tqreplaceMsgSerNum( aMsg->getMsgSerNum(), &aMsg->toMsgBase(), idx );
+ replaceMsgSerNum( aMsg->getMsgSerNum(), &aMsg->toMsgBase(), idx );
// change the length of the previous message to encompass white space added
if ((idx > 0) && (growth > 0)) {
@@ -1118,7 +1118,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
error |= appendToFolderIdsFile( idx );
if (error) {
- kdWarning(5006) << "Error: Could not add message to folder (No space left on device?)" << endl;
+ kdWarning(5006) << "Error: Could not add message to folder (No space left on tqdevice?)" << endl;
if (ftell(mIndexStream) > revert) {
kdWarning(5006) << "Undoing changes" << endl;
truncate( TQFile::encodeName(indexLocation()), revert );
@@ -1126,14 +1126,14 @@ if( fileD1.open( IO_WriteOnly ) ) {
if ( errno )
kmkernel->emergencyExit( i18n("Could not add message to folder:") + TQString::fromLocal8Bit(strerror(errno)));
else
- kmkernel->emergencyExit( i18n("Could not add message to folder (No space left on device?)") );
+ kmkernel->emergencyExit( i18n("Could not add message to folder (No space left on tqdevice?)") );
/* This code may not be 100% reliable
bool busy = kmkernel->kbp()->isBusy();
if (busy) kmkernel->kbp()->idle();
KMessageBox::sorry(0,
i18n("Unable to add message to folder.\n"
- "(No space left on device or insufficient quota?)\n"
+ "(No space left on tqdevice or insufficient quota?)\n"
"Free space and sufficient quota are required to continue safely."));
if (busy) kmkernel->kbp()->busy();
*/
@@ -1155,7 +1155,7 @@ int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfil
int rc = 0;
TQCString mtext;
unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() :
- QMIN( mMsgList.count(), startIndex + nbMessages );
+ TQMIN( mMsgList.count(), startIndex + nbMessages );
//kdDebug(5006) << "KMFolderMbox: compacting from " << startIndex << " to " << stopIndex << endl;
for(unsigned int idx = startIndex; idx < stopIndex; ++idx) {
KMMsgInfo* mi = (KMMsgInfo*)mMsgList.at(idx);
@@ -1237,10 +1237,10 @@ int KMFolderMbox::compact( bool silent )
// Note that job autodeletes itself.
// If this is the current folder, the changed signal will ultimately call
- // KMHeaders::setFolderInfoStatus which will override the message, so save/restore it
- TQString statusMsg = BroadcasStatus::instance()->statusMsg();
+ // KMHeaders::setFolderInfotqStatus which will override the message, so save/restore it
+ TQString statusMsg = BroadcastqStatus::instance()->statusMsg();
emit changed();
- BroadcasStatus::instance()->seStatusMsg( statusMsg );
+ BroadcastqStatus::instance()->seStatusMsg( statusMsg );
return rc;
}