summaryrefslogtreecommitdiffstats
path: root/kmail/kmfolderimap.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmail/kmfolderimap.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfolderimap.cpp')
-rw-r--r--kmail/kmfolderimap.cpp468
1 files changed, 234 insertions, 234 deletions
diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp
index f30e11b6..f32162f8 100644
--- a/kmail/kmfolderimap.cpp
+++ b/kmail/kmfolderimap.cpp
@@ -54,9 +54,9 @@ using KMail::RenameJob;
#include <kio/scheduler.h>
#include <kconfig.h>
-#include <qbuffer.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqbuffer.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <assert.h>
@@ -80,8 +80,8 @@ KMFolderImap::KMFolderImap(KMFolder* folder, const char* aName)
mAddMessageProgressItem = 0;
mReadOnly = false;
- connect (this, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotCompleteMailCheckProgress()) );
+ connect (this, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotCompleteMailCheckProgress()) );
}
KMFolderImap::~KMFolderImap()
@@ -130,7 +130,7 @@ void KMFolderImap::reallyDoClose(const char* owner)
KMFolder* KMFolderImap::trashFolder() const
{
- QString trashStr = account()->trash();
+ TQString trashStr = account()->trash();
return kmkernel->imapFolderMgr()->findIdString( trashStr );
}
@@ -198,7 +198,7 @@ void KMFolderImap::readConfig()
if ( mImapPath.isEmpty() ) {
setImapPath( config->readEntry("ImapPath") );
}
- if (QString(name()).upper() == "INBOX" && mImapPath == "/INBOX/")
+ if (TQString(name()).upper() == "INBOX" && mImapPath == "/INBOX/")
{
folder()->setSystemFolder( true );
folder()->setLabel( i18n("inbox") );
@@ -249,12 +249,12 @@ void KMFolderImap::remove()
jd.progressItem = ProgressManager::createProgressItem(
"ImapFolderRemove" + ProgressManager::getUniqueID(),
i18n("Removing folder"),
- i18n( "URL: %1" ).arg( QStyleSheet::escape( folder()->prettyURL() ) ),
+ i18n( "URL: %1" ).arg( TQStyleSheet::escape( folder()->prettyURL() ) ),
false,
account()->useSSL() || account()->useTLS() );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotRemoveFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotRemoveFolderResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
@@ -289,7 +289,7 @@ void KMFolderImap::removeMsg(int idx, bool quiet)
KMFolderMbox::removeMsg(idx);
}
-void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
+void KMFolderImap::removeMsg( const TQPtrList<KMMessage>& msgList, bool quiet )
{
if ( msgList.isEmpty() ) return;
if (!quiet)
@@ -298,11 +298,11 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
mLastUid = 0;
/* Remove the messages from the local store as well.
- We don't call KMFolderInherited::removeMsg(QPtrList<KMMessage>) but
+ We don't call KMFolderInherited::removeMsg(TQPtrList<KMMessage>) but
iterate ourselves, as that would call KMFolderImap::removeMsg(int)
and not the one from the store we want to be used. */
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 ) {
++it;
@@ -314,7 +314,7 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
}
//-----------------------------------------------------------------------------
-int KMFolderImap::rename( const QString& newName, KMFolderDir *aParent )
+int KMFolderImap::rename( const TQString& newName, KMFolderDir *aParent )
{
if ( !aParent )
KMFolderMbox::rename( newName );
@@ -350,7 +350,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg)
}
//-----------------------------------------------------------------------------
-void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList)
+void KMFolderImap::addMsgQuiet(TQPtrList<KMMessage> msgList)
{
if ( mAddMessageProgressItem )
{
@@ -387,15 +387,15 @@ void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList)
//-----------------------------------------------------------------------------
int KMFolderImap::addMsg(KMMessage* aMsg, int* aIndex_ret)
{
- QPtrList<KMMessage> list;
+ TQPtrList<KMMessage> list;
list.append(aMsg);
- QValueList<int> index;
+ TQValueList<int> index;
int ret = addMsg(list, index);
aIndex_ret = &index.first();
return ret;
}
-int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_ret)
+int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex_ret)
{
KMMessage *aMsg = msgList.getFirst();
KMFolder *msgParent = aMsg->parent();
@@ -423,32 +423,32 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
msg = msgParent->getMsg(idx);
}
imapJob = new ImapJob(msg, ImapJob::tPutMessage, this);
- connect(imapJob, SIGNAL(messageStored(KMMessage*)),
- SLOT(addMsgQuiet(KMMessage*)));
- connect(imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(imapJob, TQT_SIGNAL(messageStored(KMMessage*)),
+ TQT_SLOT(addMsgQuiet(KMMessage*)));
+ connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
imapJob->start();
}
} else {
// get the messages and the uids
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
// get the sets (do not sort the uids)
- QStringList sets = makeSets(uids, false);
+ TQStringList sets = makeSets(uids, false);
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
// we need the messages that belong to the current set to pass them to the ImapJob
- QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
+ TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
if ( temp_msgs.isEmpty() ) kdDebug(5006) << "Wow! KMFolderImap::splitMessageList() returned an empty list!" << endl;
imapJob = new ImapJob(temp_msgs, *it, ImapJob::tMoveMessage, this);
- connect(imapJob, SIGNAL(messageCopied(QPtrList<KMMessage>)),
- SLOT(addMsgQuiet(QPtrList<KMMessage>)));
- connect(imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(imapJob, TQT_SIGNAL(messageCopied(TQPtrList<KMMessage>)),
+ TQT_SLOT(addMsgQuiet(TQPtrList<KMMessage>)));
+ connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
imapJob->start();
}
}
@@ -457,7 +457,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
else
{
// different account, check if messages can be added
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 )
{
@@ -478,7 +478,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
if ( !msgList.isEmpty() )
{
// transfer from local folders or other accounts
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage* msg;
while ( ( msg = it.current() ) != 0 )
{
@@ -486,7 +486,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
if ( !msg->transferInProgress() )
msg->setTransferInProgress( true );
}
- imapJob = new ImapJob( msgList, QString::null, ImapJob::tPutMessage, this );
+ imapJob = new ImapJob( msgList, TQString::null, ImapJob::tPutMessage, this );
if ( !mAddMessageProgressItem && msgList.count() > 1 )
{
// use a parent progress if we have more than 1 message
@@ -494,18 +494,18 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
mAddMessageProgressItem = ProgressManager::createProgressItem(
"Uploading"+ProgressManager::getUniqueID(),
i18n("Uploading message data"),
- i18n("Destination folder: %1").arg( QStyleSheet::escape( folder()->prettyURL() ) ),
+ i18n("Destination folder: %1").arg( TQStyleSheet::escape( folder()->prettyURL() ) ),
true,
account()->useSSL() || account()->useTLS() );
mAddMessageProgressItem->setTotalItems( msgList.count() );
- connect ( mAddMessageProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
- account(), SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ connect ( mAddMessageProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
+ account(), TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
imapJob->setParentProgressItem( mAddMessageProgressItem );
}
- connect( imapJob, SIGNAL( messageCopied(QPtrList<KMMessage>) ),
- SLOT( addMsgQuiet(QPtrList<KMMessage>) ) );
- connect( imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)) );
+ connect( imapJob, TQT_SIGNAL( messageCopied(TQPtrList<KMMessage>) ),
+ TQT_SLOT( addMsgQuiet(TQPtrList<KMMessage>) ) );
+ connect( imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)) );
imapJob->start();
}
@@ -521,7 +521,7 @@ void KMFolderImap::slotCopyMsgResult( KMail::FolderJob* job )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList)
+void KMFolderImap::copyMsg(TQPtrList<KMMessage>& msgList)
{
if ( !account()->hasCapability("uidplus") ) {
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
@@ -531,24 +531,24 @@ void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList)
}
}
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
- QStringList sets = makeSets(uids, false);
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ TQStringList sets = makeSets(uids, false);
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
// we need the messages that belong to the current set to pass them to the ImapJob
- QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
+ TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
ImapJob *job = new ImapJob(temp_msgs, *it, ImapJob::tCopyMessage, this);
- connect(job, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(job, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
job->start();
}
}
//-----------------------------------------------------------------------------
-QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set,
- QPtrList<KMMessage>& msgList)
+TQPtrList<KMMessage> KMFolderImap::splitMessageList(const TQString& set,
+ TQPtrList<KMMessage>& msgList)
{
int lastcomma = set.findRev(",");
int lastdub = set.findRev(":");
@@ -558,12 +558,12 @@ QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set,
last++;
if (last < 0) last = set.length();
// the last uid of the current set
- const QString last_uid = set.right(set.length() - last);
- QPtrList<KMMessage> temp_msgs;
- QString uid;
+ const TQString last_uid = set.right(set.length() - last);
+ TQPtrList<KMMessage> temp_msgs;
+ TQString uid;
if (!last_uid.isEmpty())
{
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage* msg = 0;
while ( (msg = it.current()) != 0 )
{
@@ -598,7 +598,7 @@ KMMessage* KMFolderImap::take(int idx)
return KMFolderMbox::take(idx);
}
-void KMFolderImap::take(QPtrList<KMMessage> msgList)
+void KMFolderImap::take(TQPtrList<KMMessage> msgList)
{
deleteMessage(msgList);
@@ -609,8 +609,8 @@ void KMFolderImap::take(QPtrList<KMMessage> msgList)
//-----------------------------------------------------------------------------
void KMFolderImap::slotListNamespaces()
{
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotListNamespaces() ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotListNamespaces() ) );
if ( account()->makeConnection() == ImapAccountBase::Error )
{
kdWarning(5006) << "slotListNamespaces - got no connection" << endl;
@@ -619,8 +619,8 @@ void KMFolderImap::slotListNamespaces()
{
// wait for the connectionResult
kdDebug(5006) << "slotListNamespaces - waiting for connection" << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotListNamespaces() ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotListNamespaces() ) );
return;
}
kdDebug(5006) << "slotListNamespaces" << endl;
@@ -634,48 +634,48 @@ void KMFolderImap::slotListNamespaces()
type = ImapAccountBase::ListSubscribed;
ImapAccountBase::nsMap map = account()->namespaces();
- QStringList personal = map[ImapAccountBase::PersonalNS];
+ TQStringList personal = map[ImapAccountBase::PersonalNS];
// start personal namespace listing and send it directly to slotListResult
- for ( QStringList::Iterator it = personal.begin(); it != personal.end(); ++it )
+ for ( TQStringList::Iterator it = personal.begin(); it != personal.end(); ++it )
{
KMail::ListJob* job = new KMail::ListJob( account(), type, this,
account()->addPathToNamespace( *it ) );
job->setNamespace( *it );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
// and now we list all other namespaces and check them ourself
- QStringList ns = map[ImapAccountBase::OtherUsersNS];
+ TQStringList ns = map[ImapAccountBase::OtherUsersNS];
ns += map[ImapAccountBase::SharedNS];
- for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
+ for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
{
KMail::ListJob* job = new KMail::ListJob( account(), type, this, account()->addPathToNamespace( *it ) );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotCheckNamespace(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotCheckNamespace(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotCheckNamespace( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void KMFolderImap::slotCheckNamespace( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
kdDebug(5006) << "slotCheckNamespace - " << subfolderNames.join(",") << endl;
// get a correct foldername:
// strip / and make sure it does not contain the delimiter
- QString name = jobData.path.mid( 1, jobData.path.length()-2 );
+ TQString name = jobData.path.mid( 1, jobData.path.length()-2 );
name.remove( account()->delimiterForNamespace( name ) );
if ( name.isEmpty() ) {
// happens when an empty namespace is defined
@@ -760,10 +760,10 @@ bool KMFolderImap::listDirectory()
KMail::ListJob* job = new KMail::ListJob( account(), type, this );
job->setParentProgressItem( account()->listDirProgressItem() );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
return true;
@@ -771,10 +771,10 @@ bool KMFolderImap::listDirectory()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotListResult( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void KMFolderImap::slotListResult( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
mSubfolderState = imapFinished;
@@ -805,7 +805,7 @@ void KMFolderImap::slotListResult( const QStringList& subfolderNames,
parent->slotListResult( subfolderNames, subfolderPaths,
subfolderMimeTypes, subfolderAttributes, jobData );
// cleanup
- QStringList list;
+ TQStringList list;
checkFolders( list, jobData.curNamespace );
// finish
emit directoryListingFinished( this );
@@ -911,16 +911,16 @@ void KMFolderImap::initInbox()
}
if ( f ) {
f->initializeFrom( this, "/INBOX/", "message/directory" );
- f->setChildrenState( QString::null );
+ f->setChildrenState( TQString::null );
}
// so we have an INBOX
account()->setHasInbox( true );
}
//-----------------------------------------------------------------------------
-KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name )
+KMFolderImap* KMFolderImap::findParent( const TQString& path, const TQString& name )
{
- QString parent = path.left( path.length() - name.length() - 2 );
+ TQString parent = path.left( path.length() - name.length() - 2 );
if ( parent.length() > 1 )
{
// extract name of the parent
@@ -945,10 +945,10 @@ KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name
}
//-----------------------------------------------------------------------------
-void KMFolderImap::checkFolders( const QStringList& subfolderNames,
- const QString& myNamespace )
+void KMFolderImap::checkFolders( const TQStringList& subfolderNames,
+ const TQString& myNamespace )
{
- QPtrList<KMFolder> toRemove;
+ TQPtrList<KMFolder> toRemove;
KMFolderNode *node = folder()->child()->first();
while ( node )
{
@@ -963,7 +963,7 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames,
kdDebug(5006) << node->name() << " in namespace " << myNamespace << ":" <<
isInNamespace << endl;
// ignore some cases
- QString name = node->name();
+ TQString name = node->name();
bool ignore = ( ( this == account()->rootFolder() ) &&
( imapFld->imapPath() == "/INBOX/" ||
account()->isNamespaceFolder( name ) ||
@@ -990,8 +990,8 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames,
}
//-----------------------------------------------------------------------------
-void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath,
- QString mimeType )
+void KMFolderImap::initializeFrom( KMFolderImap* parent, TQString folderPath,
+ TQString mimeType )
{
setAccount( parent->account() );
setImapPath( folderPath );
@@ -1000,7 +1000,7 @@ void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath,
}
//-----------------------------------------------------------------------------
-void KMFolderImap::setChildrenState( QString attributes )
+void KMFolderImap::setChildrenState( TQString attributes )
{
// update children state
if ( attributes.find( "haschildren", 0, false ) != -1 )
@@ -1033,8 +1033,8 @@ void KMFolderImap::checkValidity()
kdDebug(5006) << "KMFolderImap::checkValidity of: " << imapPath() << endl;
// Start with a clean slate
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( checkValidity() ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( checkValidity() ) );
KMAcctImap::ConnectionState connectionState = account()->makeConnection();
if ( connectionState == ImapAccountBase::Error ) {
@@ -1047,8 +1047,8 @@ void KMFolderImap::checkValidity()
// We'll wait for the connectionResult signal from the account. If it
// errors, the above will catch it.
kdDebug(5006) << "CheckValidity - waiting for connection" << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( checkValidity() ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( checkValidity() ) );
return;
}
// Only check once at a time.
@@ -1064,7 +1064,7 @@ void KMFolderImap::checkValidity()
mMailCheckProgressItem = ProgressManager::createProgressItem(
parent,
"MailCheck" + folder()->prettyURL(),
- QStyleSheet::escape( folder()->prettyURL() ),
+ TQStyleSheet::escape( folder()->prettyURL() ),
i18n("checking"),
false,
account()->useSSL() || account()->useTLS() );
@@ -1078,10 +1078,10 @@ void KMFolderImap::checkValidity()
KIO::SimpleJob *job = KIO::get(url, false, false);
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotCheckValidityResult(KIO::Job *)));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotSimpleData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotCheckValidityResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)));
// Only check once at a time.
mCheckingValidity = true;
}
@@ -1121,15 +1121,15 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
emit folderComplete(this, false);
close("checkvalidity");
} else {
- QCString cstr((*it).data.data(), (*it).data.size() + 1);
+ TQCString cstr((*it).data.data(), (*it).data.size() + 1);
int a = cstr.find("X-uidValidity: ");
int b = cstr.find("\r\n", a);
- QString uidv;
+ 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);
- QString access;
+ TQString access;
if ( (b - a - 10) >= 0 )
access = cstr.mid(a + 10, b - a - 10);
mReadOnly = access == "Read only";
@@ -1145,7 +1145,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
if ( a >= 0 && (b - a - 18) >= 0 )
mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok);
if ( !ok ) mPermanentFlags = 0;
- QString startUid;
+ TQString startUid;
if (uidValidity() != uidv)
{
// uidValidity changed
@@ -1161,7 +1161,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
writeConfig();
} else {
if (!mCheckFlags)
- startUid = QString::number(lastUid() + 1);
+ startUid = TQString::number(lastUid() + 1);
}
account()->removeJob(it);
if ( mMailCheckProgressItem )
@@ -1216,7 +1216,7 @@ void KMFolderImap::getFolder(bool force)
//-----------------------------------------------------------------------------
-void KMFolderImap::reallyGetFolder(const QString &startUid)
+void KMFolderImap::reallyGetFolder(const TQString &startUid)
{
KURL url = account()->getUrl();
if ( account()->makeConnection() != ImapAccountBase::Connected )
@@ -1237,10 +1237,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid)
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotListFolderResult(KIO::Job *)));
- connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
- this, SLOT(slotListFolderEntries(KIO::Job *,
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotListFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
+ this, TQT_SLOT(slotListFolderEntries(KIO::Job *,
const KIO::UDSEntryList &)));
} else {
mContentState = imapDownloadInProgress;
@@ -1253,10 +1253,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid)
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(newJob, jd);
- connect(newJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotGetLastMessagesResult(KIO::Job *)));
- connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &)));
+ connect(newJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotGetLastMessagesResult(KIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &)));
}
}
@@ -1266,7 +1266,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString uids;
+ TQString uids;
if (job->error())
{
account()->handleJobError( job,
@@ -1276,7 +1276,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
return;
}
mCheckFlags = false;
- QStringList::Iterator uid;
+ TQStringList::Iterator uid;
/*
The code below does the following:
- for each mail in the local store and each entry we got from the server,
@@ -1326,7 +1326,7 @@ 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( QString::null, (*it).parent );
+ ImapAccountBase::jobData jd( TQString::null, (*it).parent );
jd.total = (*it).items.count();
if (jd.total == 0)
{
@@ -1343,14 +1343,14 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
mMailCheckProgressItem->setStatus( i18n("Retrieving messages") );
}
- QStringList sets;
+ TQStringList sets;
uid = (*it).items.begin();
if (jd.total == 1) sets.append(*uid + ":" + *uid);
else sets = makeSets( (*it).items );
account()->removeJob(it); // don't use *it below
// Now kick off the getting of envelopes for the new mails in the folder
- for (QStringList::Iterator i = sets.begin(); i != sets.end(); ++i)
+ for (TQStringList::Iterator i = sets.begin(); i != sets.end(); ++i)
{
mContentState = imapDownloadInProgress;
KURL url = account()->getUrl();
@@ -1359,12 +1359,12 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
jd.url = url.url();
KIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
account()->insertJob(newJob, jd);
- connect(newJob, SIGNAL(result(KIO::Job *)),
+ connect(newJob, TQT_SIGNAL(result(KIO::Job *)),
this, (i == sets.at(sets.count() - 1))
- ? SLOT(slotGetLastMessagesResult(KIO::Job *))
- : SLOT(slotGetMessagesResult(KIO::Job *)));
- connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &)));
+ ? TQT_SLOT(slotGetLastMessagesResult(KIO::Job *))
+ : TQT_SLOT(slotGetMessagesResult(KIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &)));
}
}
@@ -1375,7 +1375,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString mimeType, name;
+ TQString mimeType, name;
long int flags = 0;
for (KIO::UDSEntryList::ConstIterator udsIt = uds.begin();
udsIt != uds.end(); udsIt++)
@@ -1392,7 +1392,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
}
if ((mimeType == "message/rfc822-imap" || mimeType == "message/rfc822") &&
!(flags & 8)) {
- (*it).items.append(name + "," + QString::number(flags));
+ (*it).items.append(name + "," + TQString::number(flags));
if ( mMailCheckProgressItem ) {
mMailCheckProgressItem->incCompletedItems();
mMailCheckProgressItem->updateProgress();
@@ -1403,9 +1403,9 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
// debugging helper
-//X static QString flagsToString( int flags )
+//X static TQString flagsToString( int flags )
//X {
-//X QString str("(");
+//X TQString str("(");
//X if ( flags & 4 ) {
//X str += "\\Flagged ";
//X }
@@ -1477,9 +1477,9 @@ void KMFolderImap::seenFlagToStatus(KMMsgBase * msg, int flags, bool newMsg)
//-----------------------------------------------------------------------------
-QString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags)
+TQString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags)
{
- QString flags;
+ TQString flags;
if (status & KMMsgStatusDeleted)
flags = "\\DELETED";
else {
@@ -1518,12 +1518,12 @@ KMFolderImap::ignoreJobsForMessage( KMMessage* msg )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
+void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- (*it).cdata += QCString(data, data.size() + 1);
+ (*it).cdata += TQCString(data, data.size() + 1);
int pos = (*it).cdata.find("\r\n--IMAPDIGEST");
if ( pos == -1 ) {
// if we do not find the pattern in the complete string we will not find
@@ -1545,7 +1545,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" <<
exists << ") then folder (" << count() << "), so reload" << endl;
open("getMessage");
- reallyGetFolder( QString::null );
+ reallyGetFolder( TQString::null );
(*it).cdata.remove(0, pos);
return;
} else if ( ok ) {
@@ -1599,7 +1599,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
} else if ( !account()->hasCapability("uidplus") ) {
// see if we have cached the msgIdMD5 and get the status +
// serial number from there
- QString id = msg->msgIdMD5();
+ TQString id = msg->msgIdMD5();
if ( mMetaDataMap.find( id ) ) {
md = mMetaDataMap[id];
msg->setStatus( md->status() );
@@ -1643,7 +1643,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
//-------------------------------------------------------------
FolderJob*
KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const
{
KMFolderImap* kmfi = folder? dynamic_cast<KMFolderImap*>(folder->storage()) : 0;
@@ -1666,7 +1666,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
} else {
// download complete message or part (attachment)
if ( partSpecifier == "STRUCTURE" ) // hide from outside
- partSpecifier = QString::null;
+ partSpecifier = TQString::null;
ImapJob *job = new ImapJob( msg, jt, kmfi, partSpecifier );
job->setParentFolder( this );
@@ -1676,7 +1676,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
//-------------------------------------------------------------
FolderJob*
-KMFolderImap::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+KMFolderImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
KMFolderImap* kmfi = dynamic_cast<KMFolderImap*>(folder->storage());
@@ -1717,7 +1717,7 @@ void KMFolderImap::slotGetMessagesResult(KIO::Job * job)
//-----------------------------------------------------------------------------
-void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
+void KMFolderImap::createFolder(const TQString &name, const TQString& parentPath,
bool askUser)
{
kdDebug(5006) << "KMFolderImap::createFolder - name=" << name << ",parent=" <<
@@ -1727,8 +1727,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
return;
}
KURL url = account()->getUrl();
- QString parent = ( parentPath.isEmpty() ? imapPath() : parentPath );
- QString path = account()->createImapPath( parent, name );
+ TQString parent = ( parentPath.isEmpty() ? imapPath() : parentPath );
+ TQString path = account()->createImapPath( parent, name );
if ( askUser ) {
path += "/;INFO=ASKUSER";
}
@@ -1739,8 +1739,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
ImapAccountBase::jobData jd( url.url(), folder() );
jd.items = name;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotCreateFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotCreateFolderResult(KIO::Job *)));
}
@@ -1750,7 +1750,7 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString name;
+ TQString name;
if ( it.data().items.count() > 0 )
name = it.data().items.first();
@@ -1771,27 +1771,27 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
//-----------------------------------------------------------------------------
-static QTextCodec *sUtf7Codec = 0;
+static TQTextCodec *sUtf7Codec = 0;
-QTextCodec * KMFolderImap::utf7Codec()
+TQTextCodec * KMFolderImap::utf7Codec()
{
- if (!sUtf7Codec) sUtf7Codec = QTextCodec::codecForName("utf-7");
+ if (!sUtf7Codec) sUtf7Codec = TQTextCodec::codecForName("utf-7");
return sUtf7Codec;
}
//-----------------------------------------------------------------------------
-QString KMFolderImap::encodeFileName(const QString &name)
+TQString KMFolderImap::encodeFileName(const TQString &name)
{
- QString result = utf7Codec()->fromUnicode(name);
+ TQString result = utf7Codec()->fromUnicode(name);
return KURL::encode_string_no_slash(result);
}
//-----------------------------------------------------------------------------
-QString KMFolderImap::decodeFileName(const QString &name)
+TQString KMFolderImap::decodeFileName(const TQString &name)
{
- QString result = KURL::decode_string(name);
+ TQString result = KURL::decode_string(name);
return utf7Codec()->toUnicode(result.latin1());
}
@@ -1806,12 +1806,12 @@ bool KMFolderImap::autoExpunge()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotSimpleData(KIO::Job * job, const QByteArray & data)
+void KMFolderImap::slotSimpleData(KIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QBuffer buff((*it).data);
+ TQBuffer buff((*it).data);
buff.open(IO_WriteOnly | IO_Append);
buff.writeBlock(data.data(), data.size());
buff.close();
@@ -1833,20 +1833,20 @@ void KMFolderImap::deleteMessage(KMMessage * msg)
"an empty UID. Aborting." << endl;
return;
}
- url.setPath(msg_parent->imapPath() + ";UID=" + QString::number(uid) );
+ url.setPath(msg_parent->imapPath() + ";UID=" + TQString::number(uid) );
if ( account()->makeConnection() != ImapAccountBase::Connected )
return;
KIO::SimpleJob *job = KIO::file_delete(url, false);
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
-void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
+void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList)
{
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 ) {
++it;
@@ -1854,15 +1854,15 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
mMetaDataMap.remove( msg->msgIdMD5() );
}
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
- QStringList sets = makeSets(uids);
+ TQStringList sets = makeSets(uids);
KURL url = account()->getUrl();
KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.getFirst()->storage());
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
- QString uid = *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;
@@ -1873,22 +1873,22 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
}
//-----------------------------------------------------------------------------
void KMFolderImap::setStatus(int idx, KMMsgStatus status, bool toggle)
{
- QValueList<int> ids; ids.append(idx);
+ TQValueList<int> ids; ids.append(idx);
setStatus(ids, status, toggle);
}
-void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool toggle)
+void KMFolderImap::setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle)
{
FolderStorage::setStatus(_ids, status, toggle);
- QValueList<int> ids;
+ TQValueList<int> ids;
if ( mUploadAllFlags ) {
kdDebug(5006) << k_funcinfo << "Migrating all flags to the server" << endl;
ids.clear();
@@ -1912,8 +1912,8 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
if ( mReadOnly ) { // mUserRights is not available here
// FIXME duplicated code in KMFolderCachedImap
- QValueList<ulong> seenUids, unseenUids;
- for ( QValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) {
+ TQValueList<ulong> seenUids, unseenUids;
+ for ( TQValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) {
KMMessage *msg = 0;
bool unget = !isMessage(*it);
msg = getMsg(*it);
@@ -1925,40 +1925,40 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
if (unget) unGetMsg(*it);
}
if ( !seenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( seenUids, true );
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ 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 );
}
}
if ( !unseenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( unseenUids, true );
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ 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 );
}
}
return;
}
- QMap< QString, QStringList > groups;
- for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) {
+ TQMap< TQString, TQStringList > groups;
+ for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) {
KMMessage *msg = 0;
bool unget = !isMessage(*it);
msg = getMsg(*it);
if (!msg) continue;
- QString flags = statusToFlags(msg->status(), mPermanentFlags);
+ TQString flags = statusToFlags(msg->status(), mPermanentFlags);
// Collect uids for each type of flags.
- groups[flags].append(QString::number(msg->UID()));
+ groups[flags].append(TQString::number(msg->UID()));
if (unget) unGetMsg(*it);
}
- QMapIterator< QString, QStringList > dit;
+ TQMapIterator< TQString, TQStringList > dit;
for ( dit = groups.begin(); dit != groups.end(); ++dit ) {
- QCString flags = dit.key().latin1();
- QStringList sets = makeSets( (*dit), true );
+ TQCString flags = dit.key().latin1();
+ TQStringList sets = makeSets( (*dit), true );
// Send off a status setting job for each set.
- for ( QStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
- QString imappath = imapPath() + ";UID=" + ( *slit );
+ for ( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
+ TQString imappath = imapPath() + ";UID=" + ( *slit );
account()->setImapStatus(folder(), imappath, flags);
}
}
@@ -1967,29 +1967,29 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
// to make sure that we get the latest flags abort the current listing and
// create a new one
kdDebug(5006) << "Set status during folder listing, restarting listing." << endl;
- disconnect(this, SLOT(slotListFolderResult(KIO::Job *)));
+ disconnect(this, TQT_SLOT(slotListFolderResult(KIO::Job *)));
quiet( false );
- reallyGetFolder( QString::null );
+ reallyGetFolder( TQString::null );
}
}
//-----------------------------------------------------------------------------
-QStringList KMFolderImap::makeSets(const QStringList& uids, bool sort)
+TQStringList KMFolderImap::makeSets(const TQStringList& uids, bool sort)
{
- QValueList<ulong> tmp;
- for ( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it )
+ TQValueList<ulong> tmp;
+ for ( TQStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it )
tmp.append( (*it).toInt() );
return makeSets(tmp, sort);
}
-QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
+TQStringList KMFolderImap::makeSets( TQValueList<ulong>& uids, bool sort )
{
- QStringList sets;
- QString set;
+ TQStringList sets;
+ TQString set;
if (uids.size() == 1)
{
- sets.append(QString::number(uids.first()));
+ sets.append(TQString::number(uids.first()));
return sets;
}
@@ -1999,10 +1999,10 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
// needed to make a uid like 124 instead of 124:124
bool inserted = false;
/* iterate over uids and build sets like 120:122,124,126:150 */
- for ( QValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it )
+ for ( TQValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it )
{
if (it == uids.begin() || set.isEmpty()) {
- set = QString::number(*it);
+ set = TQString::number(*it);
inserted = true;
} else
{
@@ -2010,9 +2010,9 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
{
// end this range
if (inserted)
- set += ',' + QString::number(*it);
+ set += ',' + TQString::number(*it);
else
- set += ':' + QString::number(last) + ',' + QString::number(*it);
+ set += ':' + TQString::number(last) + ',' + TQString::number(*it);
inserted = true;
if (set.length() > 100)
{
@@ -2028,7 +2028,7 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
}
// last element
if (!inserted)
- set += ':' + QString::number(uids.last());
+ set += ':' + TQString::number(uids.last());
if (!set.isEmpty()) sets.append(set);
@@ -2036,11 +2036,11 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids)
+void KMFolderImap::getUids(TQValueList<int>& ids, TQValueList<ulong>& uids)
{
KMMsgBase *msg = 0;
// get the uids
- for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
+ for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
{
msg = getMsgBase(*it);
if (!msg) continue;
@@ -2048,11 +2048,11 @@ void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids)
}
}
-void KMFolderImap::getUids(const QPtrList<KMMessage>& msgList, QValueList<ulong>& uids)
+void KMFolderImap::getUids(const TQPtrList<KMMessage>& msgList, TQValueList<ulong>& uids)
{
KMMessage *msg = 0;
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
while ( (msg = it.current()) != 0 ) {
++it;
if ( msg->UID() > 0 ) {
@@ -2074,16 +2074,16 @@ void KMFolderImap::expungeFolder(KMFolderImap * aFolder, bool quiet)
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = quiet;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotProcessNewMail( int errorCode, const QString &errorMsg )
+void KMFolderImap::slotProcessNewMail( int errorCode, const TQString &errorMsg )
{
Q_UNUSED( errorMsg );
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotProcessNewMail(int, const QString&) ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) );
if ( !errorCode )
processNewMail( false );
else
@@ -2113,8 +2113,8 @@ bool KMFolderImap::processNewMail(bool)
{
// wait
kdDebug(5006) << "KMFolderImap::processNewMail - waiting for connection: " << label() << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotProcessNewMail(int, const QString&) ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) );
return true;
}
KURL url = account()->getUrl();
@@ -2126,7 +2126,7 @@ bool KMFolderImap::processNewMail(bool)
mMailCheckProgressItem = ProgressManager::createProgressItem(
"MailCheckAccount" + account()->name(),
"MailCheck" + folder()->prettyURL(),
- QStyleSheet::escape( folder()->prettyURL() ),
+ TQStyleSheet::escape( folder()->prettyURL() ),
i18n("updating message counts"),
false,
account()->useSSL() || account()->useTLS() );
@@ -2136,8 +2136,8 @@ bool KMFolderImap::processNewMail(bool)
ImapAccountBase::jobData jd(url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotStatResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotStatResult(KIO::Job *)));
return true;
}
@@ -2179,17 +2179,17 @@ int KMFolderImap::create()
return KMFolderMbox::create();
}
-QValueList<ulong> KMFolderImap::splitSets(const QString uids)
+TQValueList<ulong> KMFolderImap::splitSets(const TQString uids)
{
- QValueList<ulong> uidlist;
+ TQValueList<ulong> uidlist;
// ex: 1205,1204,1203,1202,1236:1238
- QString buffer = QString::null;
+ TQString buffer = TQString::null;
int setstart = -1;
// iterate over the uids
for (uint i = 0; i < uids.length(); i++)
{
- QChar chr = uids[i];
+ TQChar chr = uids[i];
if (chr == ',')
{
if (setstart > -1)
@@ -2209,7 +2209,7 @@ QValueList<ulong> KMFolderImap::splitSets(const QString uids)
// remember the start of the range
setstart = buffer.toInt();
buffer = "";
- } else if (chr.category() == QChar::Number_DecimalDigit) {
+ } else if (chr.category() == TQChar::Number_DecimalDigit) {
// digit
buffer += chr;
} else {
@@ -2246,8 +2246,8 @@ int KMFolderImap::expungeContents()
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
/* Is the below correct? If we are expunging (in the folder sense, not the imap sense),
why delete but not (imap-)expunge? Since the folder is not active there is no concept
@@ -2285,7 +2285,7 @@ void KMFolderImap::setSubfolderState( imapState state )
{
// pass through to children
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it( *folder()->child() );
+ TQPtrListIterator<KMFolderNode> it( *folder()->child() );
for ( ; (node = it.current()); )
{
++it;
@@ -2313,7 +2313,7 @@ void KMFolderImap::setAlreadyRemoved( bool removed )
{
// pass through to childs
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it( *folder()->child() );
+ TQPtrListIterator<KMFolderNode> it( *folder()->child() );
for ( ; (node = it.current()); )
{
++it;
@@ -2324,13 +2324,13 @@ void KMFolderImap::setAlreadyRemoved( bool removed )
}
}
-void KMFolderImap::slotCreatePendingFolders( int errorCode, const QString& errorMsg )
+void KMFolderImap::slotCreatePendingFolders( int errorCode, const TQString& errorMsg )
{
Q_UNUSED( errorMsg );
- disconnect( account(), SIGNAL( connectionResult( int, const QString& ) ),
- this, SLOT( slotCreatePendingFolders( int, const QString& ) ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult( int, const TQString& ) ),
+ this, TQT_SLOT( slotCreatePendingFolders( int, const TQString& ) ) );
if ( !errorCode ) {
- QStringList::Iterator it = mFoldersPendingCreation.begin();
+ TQStringList::Iterator it = mFoldersPendingCreation.begin();
for ( ; it != mFoldersPendingCreation.end(); ++it ) {
createFolder( *it );
}
@@ -2344,18 +2344,18 @@ void KMFolderImap::search( const KMSearchPattern* pattern )
if ( !pattern || pattern->isEmpty() )
{
// not much to do here
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchResult( folder(), serNums, pattern, true );
return;
}
SearchJob* job = new SearchJob( this, account(), pattern );
- connect( job, SIGNAL( searchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
- this, SLOT( slotSearchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
+ connect( job, TQT_SIGNAL( searchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
+ this, TQT_SLOT( slotSearchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
job->start();
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotSearchDone( QValueList<Q_UINT32> serNums,
+void KMFolderImap::slotSearchDone( TQValueList<Q_UINT32> serNums,
const KMSearchPattern* pattern,
bool complete )
{
@@ -2372,8 +2372,8 @@ void KMFolderImap::search( const KMSearchPattern* pattern, Q_UINT32 serNum )
return;
}
SearchJob* job = new SearchJob( this, account(), pattern, serNum );
- connect( job, SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ),
- this, SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) );
+ connect( job, TQT_SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ),
+ this, TQT_SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) );
job->start();
}
@@ -2414,7 +2414,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::setImapPath( const QString& path )
+void KMFolderImap::setImapPath( const TQString& path )
{
if ( path.isEmpty() ) {
kdWarning(5006) << k_funcinfo << "ignoring empty path" << endl;