diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:59:50 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:59:50 -0600 |
commit | 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch) | |
tree | ab537a329b9613e11dce8195761f93ffe82aed24 /kmail/kmfolderimap.cpp | |
parent | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff) | |
download | tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kmail/kmfolderimap.cpp')
-rw-r--r-- | kmail/kmfolderimap.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp index 6f853038f..05a7864d1 100644 --- a/kmail/kmfolderimap.cpp +++ b/kmail/kmfolderimap.cpp @@ -56,8 +56,8 @@ using KMail::RenameJob; #include <kconfig.h> #include <tqbuffer.h> -#include <textcodec.h> -#include <stylesheet.h> +#include <tqtextcodec.h> +#include <tqstylesheet.h> #include <assert.h> @@ -245,7 +245,7 @@ void KMFolderImap::remove() jd.progressItem = ProgressManager::createProgressItem( "ImapFolderRemove" + ProgressManager::getUniqueID(), i18n("Removing folder"), - i18n( "URL: %1" ).arg( TQStyleSheet::escape( folder()->prettyURL() ) ), + i18n( "URL: %1" ).tqarg( TQStyleSheet::escape( folder()->prettyURL() ) ), false, account()->useSSL() || account()->useTLS() ); account()->insertJob(job, jd); @@ -488,7 +488,7 @@ int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex mAddMessageProgressItem = ProgressManager::createProgressItem( "Uploading"+ProgressManager::getUniqueID(), i18n("Uploading message data"), - i18n("Destination folder: %1").arg( TQStyleSheet::escape( folder()->prettyURL() ) ), + i18n("Destination folder: %1").tqarg( TQStyleSheet::escape( folder()->prettyURL() ) ), true, account()->useSSL() || account()->useTLS() ); mAddMessageProgressItem->setTotalItems( msgList.count() ); @@ -849,7 +849,7 @@ void KMFolderImap::slotListResult( const TQStringList& subfolderNames, // update progress account()->listDirProgressItem()->incCompletedItems(); account()->listDirProgressItem()->updateProgress(); - account()->listDirProgressItem()->seStatus( folder()->prettyURL() + i18n(" completed") ); + account()->listDirProgressItem()->setqStatus( folder()->prettyURL() + i18n(" completed") ); f->initializeFrom( this, subfolderPaths[i], subfolderMimeTypes[i] ); f->setChildrenState( subfolderAttributes[i] ); @@ -1003,11 +1003,11 @@ bool KMFolderImap::mailCheckInProgress() const //----------------------------------------------------------------------------- void KMFolderImap::setChildrenState( TQString attributes ) { - // update children state - if ( attributes.find( "haschildren", 0, false ) != -1 ) + // update tqchildren state + if ( attributes.find( "hastqchildren", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasChildren ); - } else if ( attributes.find( "hasnochildren", 0, false ) != -1 || + } else if ( attributes.find( "hasnotqchildren", 0, false ) != -1 || attributes.find( "noinferiors", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasNoChildren ); @@ -1073,7 +1073,7 @@ void KMFolderImap::checkValidity() mMailCheckProgressItem->setProgress(0); } if ( account()->mailCheckProgressItem() ) { - account()->mailCheckProgressItem()->seStatus( folder()->prettyURL() ); + account()->mailCheckProgressItem()->setqStatus( folder()->prettyURL() ); } ImapAccountBase::jobData jd( url.url() ); KIO::SimpleJob *job = KIO::get(url, false, false); @@ -1231,7 +1231,7 @@ void KMFolderImap::reallyGetFolder(const TQString &startUid) if (startUid.isEmpty()) { if ( mMailCheckProgressItem ) - mMailCheckProgressItem->seStatus( i18n("Retrieving message status") ); + mMailCheckProgressItem->setqStatus( i18n("Retrieving message status") ); url.setPath(imapPath() + ";SECTION=UID FLAGS"); KIO::SimpleJob *job = KIO::listDir(url, false); KIO::Scheduler::assignJobToSlave(account()->slave(), job); @@ -1246,7 +1246,7 @@ void KMFolderImap::reallyGetFolder(const TQString &startUid) } else { mContentState = imapDownloadInProgress; if ( mMailCheckProgressItem ) - mMailCheckProgressItem->seStatus( i18n("Retrieving messages") ); + mMailCheckProgressItem->setqStatus( i18n("Retrieving messages") ); url.setPath(imapPath() + ";UID=" + startUid + ":*;SECTION=ENVELOPE"); KIO::SimpleJob *newJob = KIO::get(url, false, false); @@ -1271,7 +1271,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) if (job->error()) { account()->handleJobError( job, - i18n("Error while listing the contents of the folder %1.").arg( label() ) ); + i18n("Error while listing the contents of the folder %1.").tqarg( label() ) ); account()->removeJob(it); finishMailCheck( "listfolder", imapNoInformation ); return; @@ -1309,9 +1309,9 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) int supportedFlags = mUploadAllFlags ? 31 : mPermanentFlags; if ( mReadOnly ) supportedFlags = INT_MAX; - flagsToStatus( msgBase, serverFlags, false, supportedFlags ); + flagsTotqStatus( msgBase, serverFlags, false, supportedFlags ); } else - seenFlagToStatus( msgBase, serverFlags, false ); + seenFlagTotqStatus( msgBase, serverFlags, false ); idx++; uid = (*it).items.remove(uid); if ( msgBase->getMsgSerNum() > 0 ) { @@ -1341,7 +1341,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) mMailCheckProgressItem->setCompletedItems( 0 ); mMailCheckProgressItem->setTotalItems( jd.total ); mMailCheckProgressItem->setProgress( 0 ); - mMailCheckProgressItem->seStatus( i18n("Retrieving messages") ); + mMailCheckProgressItem->setqStatus( i18n("Retrieving messages") ); } TQStringList sets; @@ -1421,7 +1421,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job, //X } //----------------------------------------------------------------------------- -void KMFolderImap::flagsToStatus(KMMsgBase *msg, int flags, bool newMsg, int supportedFlags ) +void KMFolderImap::flagsTotqStatus(KMMsgBase *msg, int flags, bool newMsg, int supportedFlags ) { if ( !msg ) return; @@ -1440,45 +1440,45 @@ void KMFolderImap::flagsToStatus(KMMsgBase *msg, int flags, bool newMsg, int sup }; static const int numFlags = sizeof imapFlagMap / sizeof *imapFlagMap; - const KMMsgStatus oldStatus = msg->status(); + const KMMsgtqStatus oldtqStatus = msg->status(); for ( int i = 0; i < numFlags; ++i ) { if ( ( (supportedFlags & imapFlagMap[i].imapFlag) == 0 && (supportedFlags & 64) == 0 ) && !imapFlagMap[i].standardFlag ) { continue; } - if ( ((flags & imapFlagMap[i].imapFlag) > 0) != ((oldStatus & imapFlagMap[i].kmFlag) > 0) ) { - msg->toggleStatus( imapFlagMap[i].kmFlag ); + if ( ((flags & imapFlagMap[i].imapFlag) > 0) != ((oldtqStatus & imapFlagMap[i].kmFlag) > 0) ) { + msg->toggletqStatus( imapFlagMap[i].kmFlag ); } } - seenFlagToStatus( msg, flags, newMsg ); + seenFlagTotqStatus( msg, flags, newMsg ); } -void KMFolderImap::seenFlagToStatus(KMMsgBase * msg, int flags, bool newMsg) +void KMFolderImap::seenFlagTotqStatus(KMMsgBase * msg, int flags, bool newMsg) { if ( !msg ) return; - const KMMsgStatus oldStatus = msg->status(); - if ( (flags & 1) && (oldStatus & KMMsgStatusOld) == 0 ) - msg->seStatus( KMMsgStatusOld ); + const KMMsgtqStatus oldtqStatus = msg->status(); + if ( (flags & 1) && (oldtqStatus & KMMsgStatusOld) == 0 ) + msg->setqStatus( KMMsgStatusOld ); // In case the message does not have the seen flag set, override our local // notion that it is read. Otherwise the count of unread messages and the // number of messages which actually show up as read can go out of sync. - if ( msg->isOfUnknownStatus() || (!(flags&1) && !(oldStatus&(KMMsgStatusNew|KMMsgStatusUnread)) ) ) { + if ( msg->isOfUnknowntqStatus() || (!(flags&1) && !(oldtqStatus&(KMMsgStatusNew|KMMsgStatusUnread)) ) ) { if (newMsg) { - if ( (oldStatus & KMMsgStatusNew) == 0 ) - msg->seStatus( KMMsgStatusNew ); + if ( (oldtqStatus & KMMsgStatusNew) == 0 ) + msg->setqStatus( KMMsgStatusNew ); } else { - if ( (oldStatus & KMMsgStatusUnread) == 0 ) - msg->seStatus( KMMsgStatusUnread ); + if ( (oldtqStatus & KMMsgStatusUnread) == 0 ) + msg->setqStatus( KMMsgStatusUnread ); } } } //----------------------------------------------------------------------------- -TQString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags) +TQString KMFolderImap::statusToFlags(KMMsgtqStatus status, int supportedFlags) { TQString flags; if (status & KMMsgStatusDeleted) @@ -1596,14 +1596,14 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } // Transfer the status, if it is cached. if ( md ) { - msg->seStatus( md->status() ); + msg->setqStatus( md->status() ); } else if ( !account()->hasCapability("uidplus") ) { // see if we have cached the msgIdMD5 and get the status + // serial number from there TQString id = msg->msgIdMD5(); if ( mMetaDataMap.find( id ) ) { md = mMetaDataMap[id]; - msg->seStatus( md->status() ); + msg->setqStatus( md->status() ); if ( md->serNum() != 0 && serNum == 0 ) { msg->setMsgSerNum( md->serNum() ); } @@ -1613,7 +1613,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } KMFolderMbox::addMsg(msg, 0); // Merge with the flags from the server. - flagsToStatus((KMMsgBase*)msg, flags, true, mUploadAllFlags ? 31 : mPermanentFlags); + flagsTotqStatus((KMMsgBase*)msg, flags, true, mUploadAllFlags ? 31 : mPermanentFlags); // set the correct size msg->setMsgSizeServer( msg->headerField("X-Length").toUInt() ); msg->setUID(uid); @@ -1880,15 +1880,15 @@ void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList) } //----------------------------------------------------------------------------- -void KMFolderImap::seStatus(int idx, KMMsgStatus status, bool toggle) +void KMFolderImap::setqStatus(int idx, KMMsgtqStatus status, bool toggle) { TQValueList<int> ids; ids.append(idx); - seStatus(ids, status, toggle); + setqStatus(ids, status, toggle); } -void KMFolderImap::seStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle) +void KMFolderImap::setqStatus(TQValueList<int>& _ids, KMMsgtqStatus status, bool toggle) { - FolderStorage::seStatus(_ids, status, toggle); + FolderStorage::setqStatus(_ids, status, toggle); TQValueList<int> ids; if ( mUploadAllFlags ) { kdDebug(5006) << k_funcinfo << "Migrating all flags to the server" << endl; @@ -1929,14 +1929,14 @@ void KMFolderImap::seStatus(TQValueList<int>& _ids, KMMsgStatus status, bool tog TQStringList sets = KMFolderImap::makeSets( seenUids, true ); for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { TQString imappath = imapPath() + ";UID=" + ( *it ); - account()->setImapSeenStatus( folder(), imappath, true ); + account()->setImapSeentqStatus( folder(), imappath, true ); } } if ( !unseenUids.isEmpty() ) { TQStringList sets = KMFolderImap::makeSets( unseenUids, true ); for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { TQString imappath = imapPath() + ";UID=" + ( *it ); - account()->setImapSeenStatus( folder(), imappath, false ); + account()->setImapSeentqStatus( folder(), imappath, false ); } } return; @@ -1960,7 +1960,7 @@ void KMFolderImap::seStatus(TQValueList<int>& _ids, KMMsgStatus status, bool tog // Send off a status setting job for each set. for ( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { TQString imappath = imapPath() + ";UID=" + ( *slit ); - account()->setImapStatus(folder(), imappath, flags); + account()->setImaptqStatus(folder(), imappath, flags); } } if ( mContentState == imapListingInProgress ) { @@ -2284,7 +2284,7 @@ void KMFolderImap::setSubfolderState( imapState state ) mSubfolderState = state; if ( state == imapNoInformation && folder()->child() ) { - // pass through to children + // pass through to tqchildren KMFolderNode* node; TQPtrListIterator<KMFolderNode> it( *folder()->child() ); for ( ; (node = it.current()); ) |