diff options
Diffstat (limited to 'kmail/kmfoldercachedimap.cpp')
-rw-r--r-- | kmail/kmfoldercachedimap.cpp | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp index 61e155acb..f0b3f0cec 100644 --- a/kmail/kmfoldercachedimap.cpp +++ b/kmail/kmfoldercachedimap.cpp @@ -19,11 +19,11 @@ * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of - * the Qt library by Trolltech AS, Norway (or with modified versions - * of Qt that use the same license as Qt), and distribute linked + * the TQt library by Trolltech AS, Norway (or with modified versions + * of TQt that use the same license as TQt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than - * Qt. If you modify this file, you may extend this exception to + * TQt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. @@ -49,7 +49,7 @@ using KMail::AccountManager; #include "kmglobal.h" #include "acljobs.h" #include "broadcaststatus.h" -using KPIM::BroadcasStatus; +using KPIM::BroadcastqStatus; #include "progressmanager.h" using KMail::CachedImapJob; @@ -92,7 +92,7 @@ static TQString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) { case KMFolderCachedImap::IncForAdmins: return "admins"; case KMFolderCachedImap::IncForReaders: return "readers"; } - return TQString::null; // can't happen + return TQString(); // can't happen } static KMFolderCachedImap::IncidencesFor incidencesForFromString( const TQString& str ) { @@ -102,10 +102,10 @@ static KMFolderCachedImap::IncidencesFor incidencesForFromString( const TQString return KMFolderCachedImap::IncForAdmins; // by default } -DImapTroubleShootDialog::DImapTroubleShootDialog( TQWidget* parent, +DImapTroubleShootDialog::DImapTroubleShootDialog( TQWidget* tqparent, const char* name ) : KDialogBase( Plain, i18n( "Troubleshooting IMAP Cache" ), - Ok | Cancel, Cancel, parent, name, true ), + Ok | Cancel, Cancel, tqparent, name, true ), rc( None ) { TQFrame* page = plainPage(); @@ -239,13 +239,13 @@ void KMFolderCachedImap::reallyDoClose( const char* owner ) KMFolderMaildir::reallyDoClose( owner ); } -void KMFolderCachedImap::initializeFrom( KMFolderCachedImap* parent ) +void KMFolderCachedImap::initializeFrom( KMFolderCachedImap* tqparent ) { - setAccount( parent->account() ); + setAccount( tqparent->account() ); // Now that we have an account, tell it that this folder was created: // if this folder was just removed, then we don't really want to remove it from the server. mAccount->removeDeletedFolder( imapPath() ); - setUserRights( parent->userRights(), parent->userRightsState() ); + setUserRights( tqparent->userRights(), tqparent->userRightsState() ); } void KMFolderCachedImap::readConfig() @@ -285,7 +285,7 @@ void KMFolderCachedImap::readConfig() int storageQuotaUsage = config->readNumEntry( "StorageQuotaUsage", -1 ); int storageQuotaLimit = config->readNumEntry( "StorageQuotaLimit", -1 ); - TQString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", TQString::null ); + TQString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", TQString() ); if ( !storageQuotaRoot.isNull() ) { // isEmpty() means we know there is no quota set mQuotaInfo.setName( "STORAGE" ); mQuotaInfo.setRoot( storageQuotaRoot ); @@ -674,7 +674,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) mapReloaded = true; } - TQMap<ulong,int>::Iterator it = uidMap.find( uid ); + TQMap<ulong,int>::Iterator it = uidMap.tqfind( uid ); if( it != uidMap.end() ) { KMMsgBase *msg = getMsgBase( *it ); #if MAIL_LOSS_DEBUGGING @@ -701,7 +701,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) return 0; // There could be a problem in the maps. Rebuild them and try again reloadUidMap(); - it = uidMap.find( uid ); + it = uidMap.tqfind( uid ); if( it != uidMap.end() ) // Since the uid map is just rebuilt, no need for the sanity check return getMsgBase( *it ); @@ -774,7 +774,7 @@ void KMFolderCachedImap::slotTroubleshoot() void KMFolderCachedImap::serverSync( bool recurse, bool quotaOnly ) { if( mSyncState != SYNC_STATE_INITIAL ) { - if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), TQString::null, i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) { + if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), TQString(), i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) { mSyncState = SYNC_STATE_INITIAL; } else return; } @@ -828,13 +828,13 @@ TQString KMFolderCachedImap::state2String( int state ) const case SYNC_STATE_SET_ANNOTATIONS: return "SYNC_STATE_SET_ANNOTATIONS"; case SYNC_STATE_GET_ACLS: return "SYNC_STATE_GET_ACLS"; case SYNC_STATE_SET_ACLS: return "SYNC_STATE_SET_ACLS"; - case SYNC_STATE_GET_QUOTA: return "SYNC_STATE_GET_QUOTA"; + case SYNC_STATE_GET_TQUOTA: return "SYNC_STATE_GET_TQUOTA"; case SYNC_STATE_FIND_SUBFOLDERS: return "SYNC_STATE_FIND_SUBFOLDERS"; case SYNC_STATE_SYNC_SUBFOLDERS: return "SYNC_STATE_SYNC_SUBFOLDERS"; case SYNC_STATE_RENAME_FOLDER: return "SYNC_STATE_RENAME_FOLDER"; case SYNC_STATE_CHECK_UIDVALIDITY: return "SYNC_STATE_CHECK_UIDVALIDITY"; case SYNC_STATE_CLOSE: return "SYNC_STATE_CLOSE"; - case SYNC_STATE_GET_SUBFOLDER_QUOTA: return "SYNC_STATE_GET_SUBFOLDER_QUOTA"; + case SYNC_STATE_GET_SUBFOLDER_TQUOTA: return "SYNC_STATE_GET_SUBFOLDER_TQUOTA"; default: return "Unknown state"; } } @@ -1080,7 +1080,7 @@ void KMFolderCachedImap::serverSyncInternal() mSyncState = SYNC_STATE_GET_MESSAGES; if( !mQuotaOnly && !noContent() ) { newState( mProgress, i18n("Expunging deleted messages")); - CachedImapJob *job = new CachedImapJob( TQString::null, + CachedImapJob *job = new CachedImapJob( TQString(), CachedImapJob::tExpungeFolder, this ); connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) ); connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); @@ -1170,7 +1170,7 @@ void KMFolderCachedImap::serverSyncInternal() // for a folder we didn't create ourselves: get annotation from server if ( mAnnotationFolderType == "FROMSERVER" ) { needToGetInitialAnnotations = true; - mAnnotationFolderType = TQString::null; + mAnnotationFolderType = TQString(); } else { updateAnnotationFolderType(); } @@ -1293,13 +1293,13 @@ void KMFolderCachedImap::serverSyncInternal() case SYNC_STATE_SYNC_SUBFOLDERS: syncNextSubFolder( false ); break; - case SYNC_STATE_GET_SUBFOLDER_QUOTA: + case SYNC_STATE_GET_SUBFOLDER_TQUOTA: // Sync the subfolders again, so that the quota information is updated for all. This state is // only entered if the close to quota property of one subfolder changed in the previous state. syncNextSubFolder( true ); break; - case SYNC_STATE_GET_QUOTA: + case SYNC_STATE_GET_TQUOTA: mSyncState = SYNC_STATE_CLOSE; if( !noContent() && mAccount->hasQuotaSupport() ) { mProgress = 98; @@ -1346,10 +1346,10 @@ void KMFolderCachedImap::syncNextSubFolder( bool secondSync ) if( mSubfoldersForSync.isEmpty() ) { // Sync finished, and a close to quota property of an subfolder changed, therefore go into - // the SYNC_STATE_GET_SUBFOLDER_QUOTA state and sync again + // the SYNC_STATE_GET_SUBFOLDER_TQUOTA state and sync again if ( mSomeSubFolderCloseToQuotaChanged && mRecurse && !secondSync ) { buildSubFolderList(); - mSyncState = SYNC_STATE_GET_SUBFOLDER_QUOTA; + mSyncState = SYNC_STATE_GET_SUBFOLDER_TQUOTA; serverSyncInternal(); } @@ -1358,7 +1358,7 @@ void KMFolderCachedImap::syncNextSubFolder( bool secondSync ) // Quota checking has to come after syncing subfolder, otherwise the quota information would // be outdated, since the subfolders can change in size during the syncing. // https://issues.kolab.org/issue4066 - mSyncState = SYNC_STATE_GET_QUOTA; + mSyncState = SYNC_STATE_GET_TQUOTA; serverSyncInternal(); } } else { @@ -1491,7 +1491,7 @@ void KMFolderCachedImap::slotPutProgress( unsigned long done, unsigned long tota { // (going from mProgress to mProgress+10) int progressSpan = 10; - newState( mProgress + (progressSpan * done) / total, TQString::null ); + newState( mProgress + (progressSpan * done) / total, TQString() ); if ( done == total ) // we're done mProgress += progressSpan; } @@ -1511,7 +1511,7 @@ void KMFolderCachedImap::uploadFlags() if( !msg || msg->UID() == 0 ) // Either not a valid message or not one that is on the server yet continue; - if ( mUIDsOfLocallyChangedStatuses.find( msg->UID() ) == mUIDsOfLocallyChangedStatuses.end() + if ( mUIDsOfLocallyChangedStatuses.tqfind( msg->UID() ) == mUIDsOfLocallyChangedStatuses.end() && !mStatusChangedLocally ) { // This message has not had its status changed locally continue; @@ -1531,7 +1531,7 @@ void KMFolderCachedImap::uploadFlags() // Send off a status setting job for each set. for( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { TQString imappath = imapPath() + ";UID=" + ( *slit ); - mAccount->setImapStatus(folder(), imappath, flags); + mAccount->setImaptqStatus(folder(), imappath, flags); } } // FIXME END DUPLICATED FROM KMFOLDERIMAP @@ -1559,7 +1559,7 @@ void KMFolderCachedImap::uploadSeenFlags() // Either not a valid message or not one that is on the server yet continue; - if ( mUIDsOfLocallyChangedStatuses.find( msg->UID() ) == mUIDsOfLocallyChangedStatuses.end() + if ( mUIDsOfLocallyChangedStatuses.tqfind( msg->UID() ) == mUIDsOfLocallyChangedStatuses.end() && !mStatusChangedLocally ) { // This message has not had its status changed locally continue; @@ -1575,7 +1575,7 @@ void KMFolderCachedImap::uploadSeenFlags() mStatusFlagsJobs += sets.count(); for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { TQString imappath = imapPath() + ";UID=" + ( *it ); - mAccount->setImapSeenStatus( folder(), imappath, true ); + mAccount->setImapSeentqStatus( folder(), imappath, true ); } } if ( !unseenUids.isEmpty() ) { @@ -1583,7 +1583,7 @@ void KMFolderCachedImap::uploadSeenFlags() mStatusFlagsJobs += sets.count(); for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { TQString imappath = imapPath() + ";UID=" + ( *it ); - mAccount->setImapSeenStatus( folder(), imappath, false ); + mAccount->setImapSeentqStatus( folder(), imappath, false ); } } @@ -1618,18 +1618,18 @@ void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const TQString& } // This is not perfect, what if the status didn't really change? Oh well ... -void KMFolderCachedImap::seStatus( int idx, KMMsgStatus status, bool toggle) +void KMFolderCachedImap::setqStatus( int idx, KMMsgtqStatus status, bool toggle) { - KMFolderMaildir::seStatus( idx, status, toggle ); + KMFolderMaildir::setqStatus( idx, status, toggle ); const KMMsgBase *msg = getMsgBase( idx ); Q_ASSERT( msg ); if ( msg ) mUIDsOfLocallyChangedStatuses.insert( msg->UID() ); } -void KMFolderCachedImap::seStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle) +void KMFolderCachedImap::setqStatus(TQValueList<int>& ids, KMMsgtqStatus status, bool toggle) { - KMFolderMaildir::seStatus(ids, status, toggle); + KMFolderMaildir::setqStatus(ids, status, toggle); for (TQValueList<int>::iterator it = ids.begin(); it != ids.end(); it++ ) { const KMMsgBase *msg = getMsgBase( *it ); Q_ASSERT( msg ); @@ -1691,7 +1691,7 @@ bool KMFolderCachedImap::deleteMessages() TQMap<ulong,int>::const_iterator it = uidMap.constBegin(); for( ; it != uidMap.end(); it++ ) { ulong uid ( it.key() ); - if( uid!=0 && !uidsOnServer.find( uid ) ) { + if( uid!=0 && !uidsOnServer.tqfind( uid ) ) { uids << TQString::number( uid ); msgsForDeletion.append( getMsgBase( *it ) ); } @@ -1832,28 +1832,28 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & 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 > 0) { - int a = (*it).cdata.find("\r\nX-uidValidity:"); + int a = (*it).cdata.tqfind("\r\nX-uidValidity:"); if (a != -1) { - int b = (*it).cdata.find("\r\n", a + 17); + int b = (*it).cdata.tqfind("\r\n", a + 17); setUidValidity((*it).cdata.mid(a + 17, b - a - 17)); } - a = (*it).cdata.find("\r\nX-Access:"); + a = (*it).cdata.tqfind("\r\nX-Access:"); // Only trust X-Access (i.e. the imap select info) if we don't know mUserRights. // The latter is more accurate (checked on every sync) whereas X-Access is only // updated when selecting the folder again, which might not happen if using // RMB / Check Mail in this folder. We don't need two (potentially conflicting) // sources for the readonly setting, in any case. if (a != -1 && mUserRightsState != KMail::ACLJobs::Ok ) { - int b = (*it).cdata.find("\r\n", a + 12); + int b = (*it).cdata.tqfind("\r\n", a + 12); const TQString access = (*it).cdata.mid(a + 12, b - a - 12); setReadOnly( access == "Read only" ); } (*it).cdata.remove(0, pos); mFoundAnIMAPDigest = true; } - pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); // Start with something largish when rebuilding the cache if ( uidsOnServer.size() == 0 ) uidsOnServer.resize( KMail::nextPrime( 2000 ) ); @@ -1869,16 +1869,16 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & // The below is optimized for speed, not prettiness. The commented out chunk // above was the solution copied from kmfolderimap, and it's 15-20% slower. const TQCString& entry( (*it).cdata ); - const int indexOfUID = entry.find("X-UID", 16); + const int indexOfUID = entry.tqfind("X-UID", 16); const int startOfUIDValue = indexOfUID + 7; - const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID + const int indexOfLength = entry.tqfind("X-Length", startOfUIDValue ); // we know length comes after UID const int startOfLengthValue = indexOfLength + 10; - const int indexOfFlags = entry.find("X-Flags", startOfLengthValue ); // we know flags comes last + const int indexOfFlags = entry.tqfind("X-Flags", startOfLengthValue ); // we know flags comes last const int startOfFlagsValue = indexOfFlags + 9; - const int flags = entry.mid( startOfFlagsValue, entry.find( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); - const ulong size = entry.mid( startOfLengthValue, entry.find( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); - const ulong uid = entry.mid( startOfUIDValue, entry.find( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); + const int flags = entry.mid( startOfFlagsValue, entry.tqfind( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); + const ulong size = entry.mid( startOfLengthValue, entry.tqfind( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); + const ulong uid = entry.mid( startOfUIDValue, entry.tqfind( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); const bool deleted = ( flags & 8 ); if ( !deleted ) { @@ -1929,9 +1929,9 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & // be considered correct. if ( !mReadOnly || !GlobalSettings::allowLocalFlags() ) { /* The message is OK, update flags */ - KMFolderImap::flagsToStatus( existingMessage, flags, false, mReadOnly ? INT_MAX : mPermanentFlags ); + KMFolderImap::flagsTotqStatus( existingMessage, flags, false, mReadOnly ? INT_MAX : mPermanentFlags ); } else if ( mUserRights & KMail::ACLJobs::WriteSeenFlag ) { - KMFolderImap::seenFlagToStatus( existingMessage, flags ); + KMFolderImap::seenFlagTotqStatus( existingMessage, flags ); } } // kdDebug(5006) << "message with uid " << uid << " found in the local cache. " << endl; @@ -1941,7 +1941,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & kdDebug(5006) << "Looking at uid " << uid << " high water is: " << lastUid() << " we should download it" << endl; #endif // The message is new since the last sync, but we might have just uploaded it, in which case - // the uid map already tqcontains it. + // the uid map already contains it. if ( !uidMap.tqcontains( uid ) ) { mMsgsForDownload << KMail::CachedImapJob::MsgForDownload(uid, flags, size); if( imapPath() == "/INBOX/" ) @@ -1958,7 +1958,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); } } @@ -1994,7 +1994,7 @@ void KMFolderCachedImap::slotProgress(unsigned long done, unsigned long total) // Progress info while retrieving new emails // (going from mProgress to mProgress+progressSpan) - newState( mProgress + additionalProgress, TQString::null ); + newState( mProgress + additionalProgress, TQString() ); } void KMFolderCachedImap::setAccount(KMAcctCachedImap *aAccount) @@ -2264,11 +2264,11 @@ void KMFolderCachedImap::listDirectory2() } if ( root && !mSubfolderNames.isEmpty() ) { - KMFolderCachedImap* parent = + KMFolderCachedImap* tqparent = findParent( mSubfolderPaths.first(), mSubfolderNames.first() ); - if ( parent ) { + if ( tqparent ) { kdDebug(5006) << "KMFolderCachedImap::listDirectory2 - pass listing to " - << parent->label() << endl; + << tqparent->label() << endl; mSubfolderNames.clear(); } } @@ -2297,7 +2297,7 @@ void KMFolderCachedImap::listDirectory2() // (could be that the folder was deleted & recreated meanwhile from another client...) if ( !locallyDeleted && mAccount->isPreviouslyDeletedFolder( subfolderPath ) ) { locallyDeleted = KMessageBox::warningYesNo( - 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes; + 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), TQString(), KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes; } if ( locallyDeleted ) { @@ -2344,7 +2344,7 @@ void KMFolderCachedImap::listDirectory2() AnnotationJobs::MultiUrlGetAnnotationJob* job = AnnotationJobs::multiUrlGetAnnotation( mAccount->slave(), mAccount->getUrl(), paths, KOLAB_FOLDERTYPE ); - ImapAccountBase::jobData jd( TQString::null, folder() ); + ImapAccountBase::jobData jd( TQString(), folder() ); jd.cancellable = true; mAccount->insertJob(job, jd); connect( job, TQT_SIGNAL(result(KIO::Job *)), @@ -2392,18 +2392,18 @@ void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const TQValue KMFolderCachedImap* KMFolderCachedImap::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<KMFolder*>(node); KMFolderCachedImap* imapFld = @@ -2555,7 +2555,7 @@ KMFolderCachedImap::slotMultiSetACLResult(KIO::Job *job) { KMAcctCachedImap::JobIterator it = mAccount->findJob(job); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - if ( (*it).parent != folder() ) return; // Shouldn't happen + if ( (*it).tqparent != folder() ) return; // Shouldn't happen if ( job->error() ) // Display error but don't abort the sync just for this @@ -2596,7 +2596,7 @@ void KMFolderCachedImap::resetSyncState() KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem(); TQString str = i18n("Aborted"); if (progressItem) - progressItem->seStatus( str ); + progressItem->setqStatus( str ); emit statusMsg( str ); emit syncStateChanged(); } @@ -2606,21 +2606,21 @@ void KMFolderCachedImap::slotIncreaseProgress() mProgress += 5; } -void KMFolderCachedImap::newState( int progress, const TQString& syncStatus ) +void KMFolderCachedImap::newState( int progress, const TQString& synctqStatus ) { - //kdDebug() << k_funcinfo << folder() << " " << mProgress << " " << syncStatus << endl; + //kdDebug() << k_funcinfo << folder() << " " << mProgress << " " << synctqStatus << endl; KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem(); if( progressItem ) progressItem->setCompletedItems( progress ); - if ( !syncStatus.isEmpty() ) { + if ( !synctqStatus.isEmpty() ) { TQString str; // For a subfolder, show the label. But for the main folder, it's already shown. if ( mAccount->imapFolder() == this ) - str = syncStatus; + str = synctqStatus; else - str = TQString( "%1: %2" ).arg( label() ).arg( syncStatus ); + str = TQString( "%1: %2" ).arg( label() ).arg( synctqStatus ); if( progressItem ) - progressItem->seStatus( str ); + progressItem->setqStatus( str ); emit statusMsg( str ); } if( progressItem ) @@ -2669,7 +2669,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() { TQString oldType = mAnnotationFolderType; TQString oldSubType; - int dot = oldType.find( '.' ); + int dot = oldType.tqfind( '.' ); if ( dot != -1 ) { oldType.truncate( dot ); oldSubType = mAnnotationFolderType.mid( dot + 1 ); @@ -2693,7 +2693,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() //kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: " << newType << " " << newSubType << endl; if ( ( newType != oldType || newSubType != oldSubType ) && changingTypeAllowed ) { - mAnnotationFolderType = newType + ( newSubType.isEmpty() ? TQString::null : "."+newSubType ); + mAnnotationFolderType = newType + ( newSubType.isEmpty() ? TQString() : "."+newSubType ); mAnnotationFolderTypeChanged = true; // force a "set annotation" on next sync kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: '" << mAnnotationFolderType << "', was (" << oldType << " " << oldSubType << ") => mAnnotationFolderTypeChanged set to TRUE" << endl; } @@ -2728,7 +2728,7 @@ void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQStr if ( found ) { TQString type = value; TQString subtype; - int dot = value.find( '.' ); + int dot = value.tqfind( '.' ); if ( dot != -1 ) { type.truncate( dot ); subtype = value.mid( dot + 1 ); @@ -2742,13 +2742,13 @@ void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQStr if ( contentsType != ContentsTypeMail ) kmkernel->iCalIface().setStorageFormat( folder(), KMailICalIfaceImpl::StorageXML ); mAnnotationFolderType = value; - if ( folder()->parent()->owner()->idString() != GlobalSettings::self()->theIMAPResourceFolderParent() + if ( folder()->tqparent()->owner()->idString() != GlobalSettings::self()->theIMAPResourceFolderParent() && GlobalSettings::self()->theIMAPResourceEnabled() && subtype == "default" ) { // Truncate subtype if this folder can't be a default resource folder for us, - // although it apparently is for someone else. + // although it aptqparently is for someone else. mAnnotationFolderType = type; - kdDebug(5006) << mImapPath << ": slotGetAnnotationResult: parent folder is " << folder()->parent()->owner()->idString() << " => truncating annotation to " << value << endl; + kdDebug(5006) << mImapPath << ": slotGetAnnotationResult: tqparent folder is " << folder()->tqparent()->owner()->idString() << " => truncating annotation to " << value << endl; } setContentsType( contentsType ); mAnnotationFolderTypeChanged = false; // we changed it, not the user @@ -2800,8 +2800,8 @@ void KMFolderCachedImap::slotGetAnnotationResult( KIO::Job* job ) KMAcctCachedImap::JobIterator it = mAccount->findJob(job); Q_ASSERT( it != mAccount->jobsEnd() ); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - Q_ASSERT( (*it).parent == folder() ); - if ( (*it).parent != folder() ) return; // Shouldn't happen + Q_ASSERT( (*it).tqparent == folder() ); + if ( (*it).tqparent != folder() ) return; // Shouldn't happen AnnotationJobs::GetAnnotationJob* annjob = static_cast<AnnotationJobs::GetAnnotationJob *>( job ); if ( annjob->error() ) { @@ -2826,8 +2826,8 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) KMAcctCachedImap::JobIterator it = mAccount->findJob(job); Q_ASSERT( it != mAccount->jobsEnd() ); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - Q_ASSERT( (*it).parent == folder() ); - if ( (*it).parent != folder() ) return; // Shouldn't happen + Q_ASSERT( (*it).tqparent == folder() ); + if ( (*it).tqparent != folder() ) return; // Shouldn't happen TQValueVector<int> folders; AnnotationJobs::MultiUrlGetAnnotationJob* annjob @@ -2852,7 +2852,7 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl; // we're only interested in the main type TQString type(annotation); - int dot = annotation.find( '.' ); + int dot = annotation.tqfind( '.' ); if ( dot != -1 ) type.truncate( dot ); type = type.simplifyWhiteSpace(); @@ -2878,8 +2878,8 @@ void KMFolderCachedImap::slotQuotaResult( KIO::Job* job ) KMAcctCachedImap::JobIterator it = mAccount->findJob(job); Q_ASSERT( it != mAccount->jobsEnd() ); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - Q_ASSERT( (*it).parent == folder() ); - if ( (*it).parent != folder() ) return; // Shouldn't happen + Q_ASSERT( (*it).tqparent == folder() ); + if ( (*it).tqparent != folder() ) return; // Shouldn't happen QuotaJobs::GetStorageQuotaJob* quotajob = static_cast<QuotaJobs::GetStorageQuotaJob *>( job ); QuotaInfo empty; @@ -2921,8 +2921,8 @@ void KMFolderCachedImap::slotTestAnnotationResult(KIO::Job *job) KMAcctCachedImap::JobIterator it = mAccount->findJob(job); Q_ASSERT( it != mAccount->jobsEnd() ); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - Q_ASSERT( (*it).parent == folder() ); - if ( (*it).parent != folder() ) return; // Shouldn't happen + Q_ASSERT( (*it).tqparent == folder() ); + if ( (*it).tqparent != folder() ) return; // Shouldn't happen mAccount->setAnnotationCheckPassed( true ); if ( job->error() ) { @@ -2940,11 +2940,11 @@ KMFolderCachedImap::slotSetAnnotationResult(KIO::Job *job) { KMAcctCachedImap::JobIterator it = mAccount->findJob(job); if ( it == mAccount->jobsEnd() ) return; // Shouldn't happen - if ( (*it).parent != folder() ) return; // Shouldn't happen + if ( (*it).tqparent != folder() ) return; // Shouldn't happen bool cont = true; if ( job->error() ) { - // Don't show error if the server doesn't support ANNOTATEMORE and this folder only tqcontains mail + // Don't show error if the server doesn't support ANNOTATEMORE and this folder only contains mail if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION && contentsType() == ContentsTypeMail ) { if (mAccount->slave()) mAccount->removeJob(job); } else { @@ -3133,7 +3133,7 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() "Please contact your administrator to allow upload of new messages " "to you, or move them out of this folder.</p> " "<p>Do you want to move these messages to another folder now?</p>").arg( folder()->prettyURL() ) ); - if ( KMessageBox::warningYesNo( 0, msg, TQString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) { + if ( KMessageBox::warningYesNo( 0, msg, TQString(), i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) { KMail::KMFolderSelDlg dlg( kmkernel->getKMMainWidget(), i18n("Move Messages to Folder"), true ); if ( dlg.exec() ) { |