summaryrefslogtreecommitdiffstats
path: root/kmail/kmheaders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmheaders.cpp')
-rw-r--r--kmail/kmheaders.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp
index f13425eb..f8e8fff8 100644
--- a/kmail/kmheaders.cpp
+++ b/kmail/kmheaders.cpp
@@ -953,7 +953,7 @@ void KMHeaders::msgAdded(int id)
if ( !msgId.isEmpty() )
mSortCacheItems.tqreplace(msgId, sci);
- /* Add to the list of potential tqparents for subject threading. But only if
+ /* Add to the list of potential parents for subject threading. But only if
* we are top level. */
if (mSubjThreading && tqparent) {
TQString subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5();
@@ -1110,7 +1110,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId )
if (mSortCacheItems[msgId] == removedItem->sortCacheItem())
mSortCacheItems.remove(msgId);
}
- // Remove the message from the list of potential tqparents for threading by
+ // Remove the message from the list of potential parents for threading by
// subject.
if ( mSubjThreading && removedItem->sortCacheItem()->subjectThreadingList() )
removedItem->sortCacheItem()->subjectThreadingList()->removeRef( removedItem->sortCacheItem() );
@@ -2660,19 +2660,19 @@ void KMHeaders::setSorting( int column, bool ascending )
//Flatten the list and write it to disk
static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,
- int tqparent_id, TQString key,
+ int parent_id, TQString key,
bool update_discover=true)
{
unsigned long msgSerNum;
- unsigned long tqparentSerNum;
+ unsigned long parentSerNum;
msgSerNum = KMMsgDict::instance()->getMsgSerNum( folder, msgid );
- if (tqparent_id >= 0)
- tqparentSerNum = KMMsgDict::instance()->getMsgSerNum( folder, tqparent_id ) + KMAIL_RESERVED;
+ if (parent_id >= 0)
+ parentSerNum = KMMsgDict::instance()->getMsgSerNum( folder, parent_id ) + KMAIL_RESERVED;
else
- tqparentSerNum = (unsigned long)(tqparent_id + KMAIL_RESERVED);
+ parentSerNum = (unsigned long)(parent_id + KMAIL_RESERVED);
fwrite(&msgSerNum, sizeof(msgSerNum), 1, sortStream);
- fwrite(&tqparentSerNum, sizeof(tqparentSerNum), 1, sortStream);
+ fwrite(&parentSerNum, sizeof(parentSerNum), 1, sortStream);
TQ_INT32 len = key.length() * sizeof(TQChar);
fwrite(&len, sizeof(len), 1, sortStream);
if (len)
@@ -2768,7 +2768,7 @@ bool KMHeaders::writeSortOrder()
KMMsgBase *kmb;
while(HeaderItem *i = items.pop()) {
- int tqparent_id = -1; //no tqparent, top level
+ int parent_id = -1; //no tqparent, top level
if (threaded) {
kmb = mFolder->getMsgBase( i->msgId() );
assert(kmb); // I have seen 0L come out of this, called from
@@ -2781,7 +2781,7 @@ bool KMHeaders::writeSortOrder()
p = mSortCacheItems[replymd5];
if (p)
- tqparent_id = p->id();
+ parent_id = p->id();
// We now have either found a tqparent, or set it to -1, which means that
// it will be reevaluated when a message is added, for example. If there
// is no replyToId and no replyToAuxId and the message is not prefixed,
@@ -2790,12 +2790,12 @@ bool KMHeaders::writeSortOrder()
if (replymd5.isEmpty()
&& replyToAuxId.isEmpty()
&& !kmb->subjectIsPrefixed() )
- tqparent_id = -2;
+ parent_id = -2;
// FIXME also mark messages with -1 as -2 a certain amount of time after
// their arrival, since it becomes very unlikely that a new tqparent for
// them will show up. (Ingo suggests a month.) -till
}
- internalWriteItem(sortStream, mFolder, i->msgId(), tqparent_id,
+ internalWriteItem(sortStream, mFolder, i->msgId(), parent_id,
i->key(mSortCol, !mSortDescending), false);
//double check for magic headers
sorted_count++;
@@ -2828,20 +2828,20 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi)
{
TQString sortFile = KMAIL_SORT_FILE(mFolder);
if(FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+")) {
- int tqparent_id = -1; //no tqparent, top level
+ int parent_id = -1; //no tqparent, top level
if (isThreaded()) {
SortCacheItem *sci = khi->sortCacheItem();
KMMsgBase *kmb = mFolder->getMsgBase( khi->msgId() );
if(sci->tqparent() && !sci->isImperfectlyThreaded())
- tqparent_id = sci->tqparent()->id();
+ parent_id = sci->tqparent()->id();
else if(kmb->replyToIdMD5().isEmpty()
&& kmb->replyToAuxIdMD5().isEmpty()
&& !kmb->subjectIsPrefixed())
- tqparent_id = -2;
+ parent_id = -2;
}
- internalWriteItem(sortStream, mFolder, khi->msgId(), tqparent_id,
+ internalWriteItem(sortStream, mFolder, khi->msgId(), parent_id,
khi->key(mSortCol, !mSortDescending), false);
//update the appended flag FIXME obsolete?
@@ -2881,12 +2881,12 @@ void SortCacheItem::updateSortFile( FILE *sortStream, KMFolder *folder,
fseek(sortStream, mSortOffset, SEEK_SET);
}
- int tqparent_id = -1;
+ int parent_id = -1;
if(!waiting_for_tqparent) {
if(mParent && !isImperfectlyThreaded())
- tqparent_id = mParent->id();
+ parent_id = mParent->id();
}
- internalWriteItem(sortStream, folder, mId, tqparent_id, mKey, update_discover);
+ internalWriteItem(sortStream, folder, mId, parent_id, mKey, update_discover);
}
static bool compare_ascending = false;
@@ -2931,8 +2931,8 @@ void KMHeaders::printThreadingTree()
}
for (int i = 0; i < (int)mItems.size(); ++i) {
HeaderItem *item = mItems[i];
- int tqparentCacheId = item->sortCacheItem()->tqparent()?item->sortCacheItem()->tqparent()->id():0;
- kdDebug( 5006 ) << "SortCacheItem: " << item->sortCacheItem()->id() << " tqparent: " << tqparentCacheId << endl;
+ int parentCacheId = item->sortCacheItem()->tqparent()?item->sortCacheItem()->tqparent()->id():0;
+ kdDebug( 5006 ) << "SortCacheItem: " << item->sortCacheItem()->id() << " tqparent: " << parentCacheId << endl;
kdDebug( 5006 ) << "Item: " << item << " sortCache: " << item->sortCacheItem() << " tqparent: " << item->sortCacheItem()->tqparent() << endl;
}
kdDebug(5006) << endl;
@@ -3038,7 +3038,7 @@ SortCacheItem* KMHeaders::findParentBySubject(SortCacheItem *item)
TQString replyToIdMD5 = msg->replyToIdMD5();
TQString subjMD5 = msg->strippedSubjectMD5();
if (!subjMD5.isEmpty() && mSubjectLists[subjMD5]) {
- /* Iterate over the list of potential tqparents with the same
+ /* Iterate over the list of potential parents with the same
* subject, and take the closest one by date. */
for (TQPtrListIterator<SortCacheItem> it2(*mSubjectLists[subjMD5]);
it2.current(); ++it2) {
@@ -3050,7 +3050,7 @@ SortCacheItem* KMHeaders::findParentBySubject(SortCacheItem *item)
// delta == 0 is not allowed, to avoid circular threading
// with duplicates.
if (delta > 0 ) {
- // Don't use tqparents more than 6 weeks older than us.
+ // Don't use parents more than 6 weeks older than us.
if (delta < 3628899)
tqparent = (*it2);
break;
@@ -3077,7 +3077,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
bool error = false;
//threaded cases
- TQPtrList<SortCacheItem> untqparented;
+ TQPtrList<SortCacheItem> unparented;
mImperfectlyThreadedList.clear();
//cleanup
@@ -3117,7 +3117,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
mSortInfo.ascending = (compare_ascending = ascending);
SortCacheItem *item;
- unsigned long serNum, tqparentSerNum;
+ unsigned long serNum, parentSerNum;
int id, len, tqparent, x;
TQChar *tmp_qchar = 0;
int tmp_qchar_len = 0;
@@ -3131,7 +3131,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
KMFolder *folder;
//parse
if(!fread(&serNum, sizeof(serNum), 1, sortStream) || //short read means to end
- !fread(&tqparentSerNum, sizeof(tqparentSerNum), 1, sortStream) ||
+ !fread(&parentSerNum, sizeof(parentSerNum), 1, sortStream) ||
!fread(&len, sizeof(len), 1, sortStream)) {
break;
}
@@ -3157,10 +3157,10 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
++deleted_count;
continue;
}
- if (tqparentSerNum < KMAIL_RESERVED) {
- tqparent = (int)tqparentSerNum - KMAIL_RESERVED;
+ if (parentSerNum < KMAIL_RESERVED) {
+ tqparent = (int)parentSerNum - KMAIL_RESERVED;
} else {
- KMMsgDict::instance()->getLocation(tqparentSerNum - KMAIL_RESERVED, &folder, &tqparent);
+ KMMsgDict::instance()->getLocation(parentSerNum - KMAIL_RESERVED, &folder, &tqparent);
if (folder != mFolder)
tqparent = -1;
}
@@ -3185,7 +3185,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
}
if (threaded && tqparent != -2) {
if(tqparent == -1) {
- untqparented.append(item);
+ unparented.append(item);
mRoot->addUnsortedChild(item);
} else {
if( ! sortCache[tqparent] ) {
@@ -3245,7 +3245,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
sortCache[x] = new SortCacheItem(
x, HeaderItem::generate_key( this, msg, &mPaintInfo, sortOrder ));
if(threaded)
- untqparented.append(sortCache[x]);
+ unparented.append(sortCache[x]);
else
mRoot->addUnsortedChild(sortCache[x]);
if(sortStream)
@@ -3263,11 +3263,11 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if (threaded) buildThreadingTree( sortCache );
TQPtrList<SortCacheItem> toBeSubjThreaded;
- if (threaded && !untqparented.isEmpty()) {
+ if (threaded && !unparented.isEmpty()) {
CREATE_TIMER(reparent);
START_TIMER(reparent);
- for(TQPtrListIterator<SortCacheItem> it(untqparented); it.current(); ++it) {
+ for(TQPtrListIterator<SortCacheItem> it(unparented); it.current(); ++it) {
SortCacheItem *item = (*it);
SortCacheItem *tqparent = findParent( item );
// If we have a tqparent, make sure it's not ourselves
@@ -3515,7 +3515,7 @@ void KMHeaders::setCurrentItemBySerialNum( unsigned long serialNum )
{
// Linear search == slow. Don't overuse this method.
// It's currently only used for finding the current item again
- // after expiry deleted mails (so the index got tqinvalidated).
+ // after expiry deleted mails (so the index got invalidated).
for (int i = 0; i < (int)mItems.size() - 1; ++i) {
KMMsgBase *mMsgBase = mFolder->getMsgBase( i );
if ( mMsgBase->getMsgSerNum() == serialNum ) {