summaryrefslogtreecommitdiffstats
path: root/kmail/cachedimapjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/cachedimapjob.cpp')
-rw-r--r--kmail/cachedimapjob.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp
index f80f56744..2b9ab2a8e 100644
--- a/kmail/cachedimapjob.cpp
+++ b/kmail/cachedimapjob.cpp
@@ -20,11 +20,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.
@@ -70,7 +70,7 @@ CachedImapJob::CachedImapJob( const TQValueList<MsgForDownload>& msgs,
// Put messages
CachedImapJob::CachedImapJob( const TQPtrList<KMMessage>& msgs, JobType type,
KMFolderCachedImap* folder )
- : FolderJob( msgs, TQString::null, type, folder?folder->folder():0 ), mFolder( folder ),
+ : FolderJob( msgs, TQString(), type, folder?folder->folder():0 ), mFolder( folder ),
mTotalBytes( msgs.count() ), // we abuse it as "total number of messages"
mMsg( 0 ), mParentFolder( 0 )
{
@@ -78,7 +78,7 @@ CachedImapJob::CachedImapJob( const TQPtrList<KMMessage>& msgs, JobType type,
CachedImapJob::CachedImapJob( const TQValueList<unsigned long>& msgs,
JobType type, KMFolderCachedImap* folder )
- : FolderJob( TQPtrList<KMMessage>(), TQString::null, type, folder?folder->folder():0 ),
+ : FolderJob( TQPtrList<KMMessage>(), TQString(), type, folder?folder->folder():0 ),
mFolder( folder ), mSerNumMsgList( msgs ), mTotalBytes( msgs.count() ), mMsg( 0 ),
mParentFolder ( 0 )
{
@@ -311,7 +311,7 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job)
mFolder->addMsgInternal( mMsg, true, &index );
if ( kmkernel->iCalIface().isResourceFolder( mFolder->folder() ) ) {
- mFolder->seStatus( index, KMMsgStatusRead, false );
+ mFolder->setqStatus( index, KMMsgStatusRead, false );
}
emit messageRetrieved( mMsg );
@@ -339,7 +339,7 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job)
mMsg->setUID(mfd.uid);
mMsg->setMsgSizeServer(mfd.size);
if( mfd.flags > 0 )
- KMFolderImap::flagsToStatus(mMsg, mfd.flags, true, GlobalSettings::allowLocalFlags() ? mFolder->permanentFlags() : INT_MAX);
+ KMFolderImap::flagsTotqStatus(mMsg, mfd.flags, true, GlobalSettings::allowLocalFlags() ? mFolder->permanentFlags() : INT_MAX);
KURL url = mAccount->getUrl();
url.setPath(mFolder->imapPath() + TQString(";UID=%1;SECTION=BODY.PEEK[]").arg(mfd.uid));
@@ -401,9 +401,9 @@ void CachedImapJob::slotPutNextMessage()
mMsg->setUID( 0 ); // for the index
TQCString cstr(mMsg->asString());
- int a = cstr.find("\nX-UID: ");
- int b = cstr.find('\n', a);
- if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a);
+ int a = cstr.tqfind("\nX-UID: ");
+ int b = cstr.tqfind('\n', a);
+ if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a);
TQCString mData(cstr.length() + cstr.tqcontains('\n'));
unsigned int i = 0;
for( char *ch = cstr.data(); *ch; ch++ ) {
@@ -462,7 +462,7 @@ void CachedImapJob::slotPutMessageInfoData( KIO::Job *job, const TQString &data
return;
}
- if ( data.find( "UID" ) != -1 && mMsg ) {
+ if ( data.tqfind( "UID" ) != -1 && mMsg ) {
int uid = ( data.right( data.length() - 4 ) ).toInt();
kdDebug( 5006 ) << k_funcinfo << "Server told us uid is: " << uid << endl;
mMsg->setUID( uid );
@@ -498,7 +498,7 @@ void CachedImapJob::slotPutMessageResult(KIO::Job *job)
emit progress( mSentBytes, mTotalBytes );
int i;
- if( ( i = mFolder->find(mMsg) ) != -1 ) {
+ if( ( i = mFolder->tqfind(mMsg) ) != -1 ) {
/*
* If we have aquired a uid during upload the server supports the uidnext
* extension and there is no need to redownload this mail, we already have
@@ -534,8 +534,8 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
}
// make copy of setting, to reset it before potentially destroying 'it'
- bool silentUpload = static_cast<KMFolderCachedImap*>((*it).parent->storage())->silentUpload();
- static_cast<KMFolderCachedImap*>((*it).parent->storage())->setSilentUpload( false );
+ bool silentUpload = static_cast<KMFolderCachedImap*>((*it).tqparent->storage())->silentUpload();
+ static_cast<KMFolderCachedImap*>((*it).tqparent->storage())->setSilentUpload( false );
if ( job->error() && !silentUpload ) {
TQString myError = "<p><b>" + i18n("Error while uploading folder")
@@ -549,11 +549,11 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
return;
} else {
KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>( (*it).current->storage() );
- KMFolderCachedImap* parentStorage = static_cast<KMFolderCachedImap*>( (*it).parent->storage() );
+ KMFolderCachedImap* tqparentStorage = static_cast<KMFolderCachedImap*>( (*it).tqparent->storage() );
Q_ASSERT( storage );
- Q_ASSERT( parentStorage );
+ Q_ASSERT( tqparentStorage );
if ( storage->imapPath().isEmpty() ) {
- TQString path = mAccount->createImapPath( parentStorage->imapPath(), storage->folder()->name() );
+ TQString path = mAccount->createImapPath( tqparentStorage->imapPath(), storage->folder()->name() );
if ( !storage->imapPathForCreation().isEmpty() )
path = storage->imapPathForCreation();
storage->setImapPath( path );
@@ -581,9 +581,9 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
url.setPath( path );
if ( mAccount->groupwareType() != KMAcctCachedImap::GroupwareScalix ) {
- // Associate the jobData with the parent folder, not with the child
+ // Associate the jobData with the tqparent folder, not with the child
// This is necessary in case of an error while creating the subfolder,
- // so that folderComplete is called on the parent (and the sync resetted).
+ // so that folderComplete is called on the tqparent (and the sync resetted).
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
jd.items << folder->label(); // for the err msg
jd.current = folder->folder();
@@ -679,14 +679,14 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
if( job->error() ) {
mErrorCode = job->error();
- mAccount->handleJobError( job, i18n( "Error while reading folder %1 on the server: " ).arg( (*it).parent->label() ) + '\n' );
+ mAccount->handleJobError( job, i18n( "Error while reading folder %1 on the server: " ).arg( (*it).tqparent->label() ) + '\n' );
delete this;
return;
}
// Check the uidValidity
TQCString cstr((*it).data.data(), (*it).data.size() + 1);
- int a = cstr.find("X-uidValidity: ");
+ int a = cstr.tqfind("X-uidValidity: ");
if (a < 0) {
// Something is seriously rotten here!
// TODO: Tell the user that he has a problem
@@ -694,7 +694,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
<< mFolder->name() << endl;
}
else {
- int b = cstr.find("\r\n", a);
+ int b = cstr.tqfind("\r\n", a);
if ( (b - a - 15) >= 0 ) {
TQString uidv = cstr.mid(a + 15, b - a - 15);
// kdDebug(5006) << "New uidv = " << uidv << ", old uidv = "
@@ -711,11 +711,11 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
<< mFolder->name() << endl;
}
- a = cstr.find( "X-PermanentFlags: " );
+ a = cstr.tqfind( "X-PermanentFlags: " );
if ( a < 0 ) {
kdDebug(5006) << "no PERMANENTFLAGS response? assumming custom flags are not available" << endl;
} else {
- int b = cstr.find( "\r\n", a );
+ int b = cstr.tqfind( "\r\n", a );
if ( (b - a - 18) >= 0 ) {
int flags = cstr.mid( a + 18, b - a - 18 ).toInt();
emit permanentFlags( flags );
@@ -767,7 +767,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath,
static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage());
if ( !imapFolder->imapPath().isEmpty() )
// Only rename folders that have been accepted by the server
- if( imapFolder->imapPath().find( oldPath ) == 0 ) {
+ if( imapFolder->imapPath().tqfind( oldPath ) == 0 ) {
TQString p = imapFolder->imapPath();
p = p.mid( oldPath.length() );
p.prepend( newPath );
@@ -782,7 +782,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath,
void CachedImapJob::revertLabelChange()
{
- TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() );
+ TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().tqfind( mFolder->imapPath() );
Q_ASSERT( renit != mAccount->renamedFolders().end() );
if ( renit != mAccount->renamedFolders().end() ) {
mFolder->folder()->setLabel( (*renit).mOldLabel );
@@ -892,9 +892,9 @@ void CachedImapJob::slotListMessagesResult( KIO::Job * job )
}
//-----------------------------------------------------------------------------
-void CachedImapJob::setParentFolder( const KMFolderCachedImap* parent )
+void CachedImapJob::setParentFolder( const KMFolderCachedImap* tqparent )
{
- mParentFolder = const_cast<KMFolderCachedImap*>( parent );
+ mParentFolder = const_cast<KMFolderCachedImap*>( tqparent );
}
}