From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: 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 --- kmail/kmfolderimap.cpp | 218 ++++++++++++++++++++++++------------------------- 1 file changed, 109 insertions(+), 109 deletions(-) (limited to 'kmail/kmfolderimap.cpp') diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp index c924fa8a1..28ba493c2 100644 --- a/kmail/kmfolderimap.cpp +++ b/kmail/kmfolderimap.cpp @@ -153,19 +153,19 @@ KMMessage* KMFolderImap::getMsg(int idx) KMAcctImap* KMFolderImap::account() const { if ( !mAccount ) { - KMFolderDir *parentFolderDir = dynamic_cast( folder()->parent() ); - if ( !parentFolderDir ) { - kdWarning() << k_funcinfo << "No parent folder dir found for " << name() << endl; + KMFolderDir *tqparentFolderDir = dynamic_cast( folder()->tqparent() ); + if ( !tqparentFolderDir ) { + kdWarning() << k_funcinfo << "No tqparent folder dir found for " << name() << endl; return 0; } - KMFolder *parentFolder = parentFolderDir->owner(); - if ( !parentFolder ) { - kdWarning() << k_funcinfo << "No parent folder found for " << name() << endl; + KMFolder *tqparentFolder = tqparentFolderDir->owner(); + if ( !tqparentFolder ) { + kdWarning() << k_funcinfo << "No tqparent folder found for " << name() << endl; return 0; } - KMFolderImap *parentStorage = dynamic_cast( parentFolder->storage() ); - if ( parentStorage ) - mAccount = parentStorage->account(); + KMFolderImap *tqparentStorage = dynamic_cast( tqparentFolder->storage() ); + if ( tqparentStorage ) + mAccount = tqparentStorage->account(); } return mAccount; } @@ -302,7 +302,7 @@ void KMFolderImap::removeMsg( const TQPtrList& msgList, bool quiet ) KMMessage *msg; while ( (msg = it.current()) != 0 ) { ++it; - int idx = find(msg); + int idx = tqfind(msg); assert( idx != -1); // ATTENTION port me to maildir KMFolderMbox::removeMsg(idx, quiet); @@ -321,13 +321,13 @@ int KMFolderImap::rename( const TQString& newName, KMFolderDir *aParent ) //----------------------------------------------------------------------------- void KMFolderImap::addMsgQuiet(KMMessage* aMsg) { - KMFolder *aFolder = aMsg->parent(); + KMFolder *aFolder = aMsg->tqparent(); TQ_UINT32 serNum = 0; aMsg->setTransferInProgress( false ); if (aFolder) { serNum = aMsg->getMsgSerNum(); kmkernel->undoStack()->pushSingleAction( serNum, aFolder, folder() ); - int idx = aFolder->find( aMsg ); + int idx = aFolder->tqfind( aMsg ); assert( idx != -1 ); aFolder->take( idx ); } @@ -351,7 +351,7 @@ void KMFolderImap::addMsgQuiet(TQPtrList msgList) mAddMessageProgressItem->setComplete(); mAddMessageProgressItem = 0; } - KMFolder *aFolder = msgList.first()->parent(); + KMFolder *aFolder = msgList.first()->tqparent(); int undoId = -1; bool uidplus = account()->hasCapability("uidplus"); for ( KMMessage* msg = msgList.first(); msg; msg = msgList.next() ) @@ -371,7 +371,7 @@ void KMFolderImap::addMsgQuiet(TQPtrList msgList) if ( aFolder ) { aFolder->take( msgList ); } else { - kdDebug(5006) << k_funcinfo << "no parent" << endl; + kdDebug(5006) << k_funcinfo << "no tqparent" << endl; } msgList.setAutoDelete(true); msgList.clear(); @@ -392,7 +392,7 @@ int KMFolderImap::addMsg(KMMessage* aMsg, int* aIndex_ret) int KMFolderImap::addMsg(TQPtrList& msgList, TQValueList& aIndex_ret) { KMMessage *aMsg = msgList.getFirst(); - KMFolder *msgParent = aMsg->parent(); + KMFolder *msgParent = aMsg->tqparent(); ImapJob *imapJob = 0; if (msgParent) @@ -412,7 +412,7 @@ int KMFolderImap::addMsg(TQPtrList& msgList, TQValueList& aIndex { if (!msg->isComplete()) { - int idx = msgParent->find(msg); + int idx = msgParent->tqfind(msg); assert(idx != -1); msg = msgParent->getMsg(idx); } @@ -480,10 +480,10 @@ int KMFolderImap::addMsg(TQPtrList& msgList, TQValueList& aIndex if ( !msg->transferInProgress() ) msg->setTransferInProgress( true ); } - imapJob = new ImapJob( msgList, TQString::null, ImapJob::tPutMessage, this ); + imapJob = new ImapJob( msgList, TQString(), ImapJob::tPutMessage, this ); if ( !mAddMessageProgressItem && msgList.count() > 1 ) { - // use a parent progress if we have more than 1 message + // use a tqparent progress if we have more than 1 message // otherwise the normal progress is more accurate mAddMessageProgressItem = ProgressManager::createProgressItem( "Uploading"+ProgressManager::getUniqueID(), @@ -786,17 +786,17 @@ void KMFolderImap::slotListResult( const TQStringList& subfolderNames, initInbox(); } - // see if we have a better parent - // if you have a prefix that tqcontains a folder (e.g "INBOX.") the folders + // see if we have a better tqparent + // if you have a prefix that contains a folder (e.g "INBOX.") the folders // need to be created underneath it if ( root && !subfolderNames.empty() ) { - KMFolderImap* parent = findParent( subfolderPaths.first(), subfolderNames.first() ); - if ( parent ) + KMFolderImap* tqparent = findParent( subfolderPaths.first(), subfolderNames.first() ); + if ( tqparent ) { kdDebug(5006) << "KMFolderImap::slotListResult - pass listing to " - << parent->label() << endl; - parent->slotListResult( subfolderNames, subfolderPaths, + << tqparent->label() << endl; + tqparent->slotListResult( subfolderNames, subfolderPaths, subfolderMimeTypes, subfolderAttributes, jobData ); // cleanup TQStringList list; @@ -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] ); @@ -905,7 +905,7 @@ void KMFolderImap::initInbox() } if ( f ) { f->initializeFrom( this, "/INBOX/", "message/directory" ); - f->setChildrenState( TQString::null ); + f->setChildrenState( TQString() ); } // so we have an INBOX account()->setHasInbox( true ); @@ -914,18 +914,18 @@ void KMFolderImap::initInbox() //----------------------------------------------------------------------------- KMFolderImap* KMFolderImap::findParent( const TQString& path, const TQString& name ) { - TQString parent = path.left( path.length() - name.length() - 2 ); - if ( parent.length() > 1 ) + TQString tqparent = path.left( path.length() - name.length() - 2 ); + if ( tqparent.length() > 1 ) { - // extract name of the parent - parent = parent.right( parent.length() - 1 ); - if ( parent != label() ) + // extract name of the tqparent + tqparent = tqparent.right( tqparent.length() - 1 ); + if ( tqparent != label() ) { KMFolderNode *node = folder()->child()->first(); - // look for a better parent + // look for a better tqparent while ( node ) { - if ( node->name() == parent ) + if ( node->name() == tqparent ) { KMFolder* fld = static_cast(node); KMFolderImap* imapFld = static_cast( fld->storage() ); @@ -984,10 +984,10 @@ void KMFolderImap::checkFolders( const TQStringList& subfolderNames, } //----------------------------------------------------------------------------- -void KMFolderImap::initializeFrom( KMFolderImap* parent, TQString folderPath, +void KMFolderImap::initializeFrom( KMFolderImap* tqparent, TQString folderPath, TQString mimeType ) { - setAccount( parent->account() ); + setAccount( tqparent->account() ); setImapPath( folderPath ); setNoContent( mimeType == "inode/directory" ); setNoChildren( mimeType == "message/digest" ); @@ -1003,12 +1003,12 @@ bool KMFolderImap::mailCheckInProgress() const //----------------------------------------------------------------------------- void KMFolderImap::setChildrenState( TQString attributes ) { - // update children state - if ( attributes.find( "haschildren", 0, false ) != -1 ) + // update tqchildren state + if ( attributes.tqfind( "hastqchildren", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasChildren ); - } else if ( attributes.find( "hasnochildren", 0, false ) != -1 || - attributes.find( "noinferiors", 0, false ) != -1 ) + } else if ( attributes.tqfind( "hasnotqchildren", 0, false ) != -1 || + attributes.tqfind( "noinferiors", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasNoChildren ); } else @@ -1060,10 +1060,10 @@ void KMFolderImap::checkValidity() } // otherwise we already are inside a mailcheck if ( !mMailCheckProgressItem ) { - ProgressItem* parent = ( account()->checkingSingleFolder() ? 0 : + ProgressItem* tqparent = ( account()->checkingSingleFolder() ? 0 : account()->mailCheckProgressItem() ); mMailCheckProgressItem = ProgressManager::createProgressItem( - parent, + tqparent, "MailCheck" + folder()->prettyURL(), TQStyleSheet::escape( folder()->prettyURL() ), i18n("checking"), @@ -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); @@ -1123,26 +1123,26 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) close("checkvalidity"); } else { TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.find("X-uidValidity: "); - int b = cstr.find("\r\n", a); + int a = cstr.tqfind("X-uidValidity: "); + int b = cstr.tqfind("\r\n", a); TQString uidv; if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15); - a = cstr.find("X-Access: "); - b = cstr.find("\r\n", a); + a = cstr.tqfind("X-Access: "); + b = cstr.tqfind("\r\n", a); TQString access; if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10); mReadOnly = access == "Read only"; - a = cstr.find("X-Count: "); - b = cstr.find("\r\n", a); + a = cstr.tqfind("X-Count: "); + b = cstr.tqfind("\r\n", a); int exists = -1; bool ok = false; if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok); if ( !ok ) exists = -1; - a = cstr.find( "X-PermanentFlags: " ); - b = cstr.find( "\r\n", a ); + a = cstr.tqfind( "X-PermanentFlags: " ); + b = cstr.tqfind( "\r\n", a ); if ( a >= 0 && (b - a - 18) >= 0 ) mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok); if ( !ok ) mPermanentFlags = 0; @@ -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); @@ -1296,7 +1296,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) mailUid = msgBase->UID(); // parse the uid from the server and the flags out of the list from // the server. Format: 1234, 1 - c = (*uid).find(","); + c = (*uid).tqfind(","); serverUid = (*uid).left( c ).toLong(); serverFlags = (*uid).mid( c+1 ).toInt(); if ( mailUid < serverUid ) { @@ -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 ) { @@ -1326,8 +1326,8 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) } // strip the flags from the list of uids, so it can be reused for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid) - (*uid).truncate((*uid).find(",")); - ImapAccountBase::jobData jd( TQString::null, (*it).parent ); + (*uid).truncate((*uid).tqfind(",")); + ImapAccountBase::jobData jd( TQString(), (*it).tqparent ); jd.total = (*it).items.count(); if (jd.total == 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) @@ -1509,7 +1509,7 @@ void KMFolderImap::ignoreJobsForMessage( KMMessage* msg ) { if ( !msg || msg->transferInProgress() || - !msg->parent() || msg->parent()->folderType() != KMFolderTypeImap ) + !msg->tqparent() || msg->tqparent()->folderType() != KMFolderTypeImap ) return; KMAcctImap *account; if ( !(account = static_cast(msg->storage())->account()) ) @@ -1525,28 +1525,28 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; (*it).cdata += TQCString(data, data.size() + 1); - int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); + int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST"); if ( pos == -1 ) { - // if we do not find the pattern in the complete string we will not find + // if we do not find the pattern in the complete string we will not tqfind // it in a substring. return; } if (pos > 0) { - int p = (*it).cdata.find("\r\nX-uidValidity:"); + int p = (*it).cdata.tqfind("\r\nX-uidValidity:"); if (p != -1) setUidValidity((*it).cdata - .mid(p + 17, (*it).cdata.find("\r\n", p+1) - p - 17)); - int c = (*it).cdata.find("\r\nX-Count:"); + .mid(p + 17, (*it).cdata.tqfind("\r\n", p+1) - p - 17)); + int c = (*it).cdata.tqfind("\r\nX-Count:"); if ( c != -1 ) { bool ok; int exists = (*it).cdata.mid( c+10, - (*it).cdata.find("\r\n", c+1) - c-10 ).toInt(&ok); + (*it).cdata.tqfind("\r\n", c+1) - c-10 ).toInt(&ok); if ( ok && exists < count() ) { kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" << exists << ") then folder (" << count() << "), so reload" << endl; open("getMessage"); - reallyGetFolder( TQString::null ); + reallyGetFolder( TQString() ); (*it).cdata.remove(0, pos); return; } else if ( ok ) { @@ -1558,7 +1558,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); } - pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); int flags; while (pos >= 0) { @@ -1571,7 +1571,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) flags = msg->headerField("X-Flags").toInt(); ulong uid = msg->UID(); KMMsgMetaData *md = 0; - if ( mUidMetaDataMap.find( uid ) ) { + if ( mUidMetaDataMap.tqfind( uid ) ) { md = mUidMetaDataMap[uid]; } ulong serNum = 0; @@ -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 ) ) { + if ( mMetaDataMap.tqfind( 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); @@ -1637,7 +1637,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); } // while } @@ -1667,7 +1667,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, } else { // download complete message or part (attachment) if ( partSpecifier == "STRUCTURE" ) // hide from outside - partSpecifier = TQString::null; + partSpecifier = TQString(); ImapJob *job = new ImapJob( msg, jt, kmfi, partSpecifier ); job->setParentFolder( this ); @@ -1718,18 +1718,18 @@ void KMFolderImap::slotGetMessagesResult(KIO::Job * job) //----------------------------------------------------------------------------- -void KMFolderImap::createFolder(const TQString &name, const TQString& parentPath, +void KMFolderImap::createFolder(const TQString &name, const TQString& tqparentPath, bool askUser) { - kdDebug(5006) << "KMFolderImap::createFolder - name=" << name << ",parent=" << - parentPath << ",askUser=" << askUser << endl; + kdDebug(5006) << "KMFolderImap::createFolder - name=" << name << ",tqparent=" << + tqparentPath << ",askUser=" << askUser << endl; if ( account()->makeConnection() != ImapAccountBase::Connected ) { kdWarning(5006) << "KMFolderImap::createFolder - got no connection" << endl; return; } KURL url = account()->getUrl(); - TQString parent = ( parentPath.isEmpty() ? imapPath() : parentPath ); - TQString path = account()->createImapPath( parent, name ); + TQString tqparent = ( tqparentPath.isEmpty() ? imapPath() : tqparentPath ); + TQString path = account()->createImapPath( tqparent, name ); if ( askUser ) { path += "/;INFO=ASKUSER"; } @@ -1824,7 +1824,7 @@ void KMFolderImap::deleteMessage(KMMessage * msg) mUidMetaDataMap.remove( msg->UID() ); mMetaDataMap.remove( msg->msgIdMD5() ); KURL url = account()->getUrl(); - KMFolderImap *msg_parent = static_cast(msg->storage()); + KMFolderImap *msg_tqparent = static_cast(msg->storage()); ulong uid = msg->UID(); /* If the uid is empty the delete job below will nuke all mail in the folder, so we better safeguard against that. See ::expungeFolder, as @@ -1834,7 +1834,7 @@ void KMFolderImap::deleteMessage(KMMessage * msg) "an empty UID. Aborting." << endl; return; } - url.setPath(msg_parent->imapPath() + ";UID=" + TQString::number(uid) ); + url.setPath(msg_tqparent->imapPath() + ";UID=" + TQString::number(uid) ); if ( account()->makeConnection() != ImapAccountBase::Connected ) return; KIO::SimpleJob *job = KIO::file_delete(url, false); @@ -1860,14 +1860,14 @@ void KMFolderImap::deleteMessage(const TQPtrList& msgList) TQStringList sets = makeSets(uids); KURL url = account()->getUrl(); - KMFolderImap *msg_parent = static_cast(msgList.getFirst()->storage()); + KMFolderImap *msg_tqparent = static_cast(msgList.getFirst()->storage()); for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { TQString uid = *it; // Don't delete with no uid, that nukes the folder. Should not happen, but // better safe than sorry. if ( uid.isEmpty() ) continue; - url.setPath(msg_parent->imapPath() + ";UID=" + uid); + url.setPath(msg_tqparent->imapPath() + ";UID=" + uid); if ( account()->makeConnection() != ImapAccountBase::Connected ) return; KIO::SimpleJob *job = KIO::file_delete(url, false); @@ -1880,15 +1880,15 @@ void KMFolderImap::deleteMessage(const TQPtrList& msgList) } //----------------------------------------------------------------------------- -void KMFolderImap::seStatus(int idx, KMMsgStatus status, bool toggle) +void KMFolderImap::setqStatus(int idx, KMMsgtqStatus status, bool toggle) { TQValueList ids; ids.append(idx); - seStatus(ids, status, toggle); + setqStatus(ids, status, toggle); } -void KMFolderImap::seStatus(TQValueList& _ids, KMMsgStatus status, bool toggle) +void KMFolderImap::setqStatus(TQValueList& _ids, KMMsgtqStatus status, bool toggle) { - FolderStorage::seStatus(_ids, status, toggle); + FolderStorage::setqStatus(_ids, status, toggle); TQValueList ids; if ( mUploadAllFlags ) { kdDebug(5006) << k_funcinfo << "Migrating all flags to the server" << endl; @@ -1929,14 +1929,14 @@ void KMFolderImap::seStatus(TQValueList& _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& _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 ) { @@ -1970,7 +1970,7 @@ void KMFolderImap::seStatus(TQValueList& _ids, KMMsgStatus status, bool tog kdDebug(5006) << "Set status during folder listing, restarting listing." << endl; disconnect(this, TQT_SLOT(slotListFolderResult(KIO::Job *))); quiet( false ); - reallyGetFolder( TQString::null ); + reallyGetFolder( TQString() ); } } @@ -2185,7 +2185,7 @@ TQValueList KMFolderImap::splitSets(const TQString uids) TQValueList uidlist; // ex: 1205,1204,1203,1202,1236:1238 - TQString buffer = TQString::null; + TQString buffer = TQString(); int setstart = -1; // iterate over the uids for (uint i = 0; i < uids.length(); i++) @@ -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 it( *folder()->child() ); for ( ; (node = it.current()); ) @@ -2395,7 +2395,7 @@ bool KMFolderImap::isMoveable() const //----------------------------------------------------------------------------- ulong KMFolderImap::serNumForUID( ulong uid ) { - if ( mUidMetaDataMap.find( uid ) ) { + if ( mUidMetaDataMap.tqfind( uid ) ) { KMMsgMetaData *md = mUidMetaDataMap[uid]; return md->serNum(); } else { -- cgit v1.2.1