summaryrefslogtreecommitdiffstats
path: root/kmail/kmfolderimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmfolderimap.cpp')
-rw-r--r--kmail/kmfolderimap.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp
index 6d3d468ec..07a52c5c6 100644
--- a/kmail/kmfolderimap.cpp
+++ b/kmail/kmfolderimap.cpp
@@ -186,8 +186,8 @@ void KMFolderImap::setAccount(KMAcctImap *aAccount)
//-----------------------------------------------------------------------------
void KMFolderImap::readConfig()
{
- KConfig* config = KMKernel::config();
- KConfigGroupSaver saver(config, "Folder-" + folder()->idString());
+ TDEConfig* config = KMKernel::config();
+ TDEConfigGroupSaver saver(config, "Folder-" + folder()->idString());
mCheckMail = config->readBoolEntry("checkmail", true);
mUidValidity = config->readEntry("UidValidity");
@@ -210,8 +210,8 @@ void KMFolderImap::readConfig()
//-----------------------------------------------------------------------------
void KMFolderImap::writeConfig()
{
- KConfig* config = KMKernel::config();
- KConfigGroupSaver saver(config, "Folder-" + folder()->idString());
+ TDEConfig* config = KMKernel::config();
+ TDEConfigGroupSaver saver(config, "Folder-" + folder()->idString());
config->writeEntry("checkmail", mCheckMail);
config->writeEntry("UidValidity", mUidValidity);
config->writeEntry("ImapPath", mImapPath);
@@ -239,8 +239,8 @@ void KMFolderImap::remove()
emit removed(folder(), false);
return;
}
- KIO::SimpleJob *job = KIO::file_delete(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::file_delete(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd(url.url());
jd.progressItem = ProgressManager::createProgressItem(
"ImapFolderRemove" + ProgressManager::getUniqueID(),
@@ -249,12 +249,12 @@ void KMFolderImap::remove()
false,
account()->useSSL() || account()->useTLS() );
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- this, TQT_SLOT(slotRemoveFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ this, TQT_SLOT(slotRemoveFolderResult(TDEIO::Job *)));
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotRemoveFolderResult(KIO::Job *job)
+void KMFolderImap::slotRemoveFolderResult(TDEIO::Job *job)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
@@ -1076,13 +1076,13 @@ void KMFolderImap::checkValidity()
account()->mailCheckProgressItem()->setStatus( folder()->prettyURL() );
}
ImapAccountBase::jobData jd( url.url() );
- KIO::SimpleJob *job = KIO::get(url, false, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::get(url, false, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
account()->insertJob(job, jd);
- 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 &)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ TQT_SLOT(slotCheckValidityResult(TDEIO::Job *)));
+ connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotSimpleData(TDEIO::Job *, const TQByteArray &)));
// Only check once at a time.
mCheckingValidity = true;
}
@@ -1105,14 +1105,14 @@ ulong KMFolderImap::lastUid()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
+void KMFolderImap::slotCheckValidityResult(TDEIO::Job * job)
{
kdDebug(5006) << "KMFolderImap::slotCheckValidityResult of: " << fileName() << endl;
mCheckingValidity = false;
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
if (job->error()) {
- if ( job->error() != KIO::ERR_ACCESS_DENIED ) {
+ if ( job->error() != TDEIO::ERR_ACCESS_DENIED ) {
// we suppress access denied messages because they are normally a result of
// explicitely set ACLs. Do not save this information (e.g. setNoContent) so that
// we notice when this changes
@@ -1233,37 +1233,37 @@ void KMFolderImap::reallyGetFolder(const TQString &startUid)
if ( mMailCheckProgressItem )
mMailCheckProgressItem->setStatus( i18n("Retrieving message status") );
url.setPath(imapPath() + ";SECTION=UID FLAGS");
- KIO::SimpleJob *job = KIO::listDir(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::listDir(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- 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 &)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ this, TQT_SLOT(slotListFolderResult(TDEIO::Job *)));
+ connect(job, TQT_SIGNAL(entries(TDEIO::Job *, const TDEIO::UDSEntryList &)),
+ this, TQT_SLOT(slotListFolderEntries(TDEIO::Job *,
+ const TDEIO::UDSEntryList &)));
} else {
mContentState = imapDownloadInProgress;
if ( mMailCheckProgressItem )
mMailCheckProgressItem->setStatus( i18n("Retrieving messages") );
url.setPath(imapPath() + ";UID=" + startUid
+ ":*;SECTION=ENVELOPE");
- KIO::SimpleJob *newJob = KIO::get(url, false, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
+ TDEIO::SimpleJob *newJob = TDEIO::get(url, false, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(newJob, jd);
- 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 &)));
+ connect(newJob, TQT_SIGNAL(result(TDEIO::Job *)),
+ this, TQT_SLOT(slotGetLastMessagesResult(TDEIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(TDEIO::Job *, const TQByteArray &)));
}
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotListFolderResult(KIO::Job * job)
+void KMFolderImap::slotListFolderResult(TDEIO::Job * job)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
@@ -1356,39 +1356,39 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
mContentState = imapDownloadInProgress;
KURL url = account()->getUrl();
url.setPath(imapPath() + ";UID=" + *i + ";SECTION=ENVELOPE");
- KIO::SimpleJob *newJob = KIO::get(url, false, false);
+ TDEIO::SimpleJob *newJob = TDEIO::get(url, false, false);
jd.url = url.url();
- KIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
account()->insertJob(newJob, jd);
- connect(newJob, TQT_SIGNAL(result(KIO::Job *)),
+ connect(newJob, TQT_SIGNAL(result(TDEIO::Job *)),
this, (i == sets.at(sets.count() - 1))
- ? 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 &)));
+ ? TQT_SLOT(slotGetLastMessagesResult(TDEIO::Job *))
+ : TQT_SLOT(slotGetMessagesResult(TDEIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(TDEIO::Job *, const TQByteArray &)));
}
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotListFolderEntries(KIO::Job * job,
- const KIO::UDSEntryList & uds)
+void KMFolderImap::slotListFolderEntries(TDEIO::Job * job,
+ const TDEIO::UDSEntryList & uds)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
TQString mimeType, name;
long int flags = 0;
- for (KIO::UDSEntryList::ConstIterator udsIt = uds.begin();
+ for (TDEIO::UDSEntryList::ConstIterator udsIt = uds.begin();
udsIt != uds.end(); udsIt++)
{
- for (KIO::UDSEntry::ConstIterator eIt = (*udsIt).begin();
+ for (TDEIO::UDSEntry::ConstIterator eIt = (*udsIt).begin();
eIt != (*udsIt).end(); eIt++)
{
- if ((*eIt).m_uds == KIO::UDS_NAME)
+ if ((*eIt).m_uds == TDEIO::UDS_NAME)
name = (*eIt).m_str;
- else if ((*eIt).m_uds == KIO::UDS_MIME_TYPE)
+ else if ((*eIt).m_uds == TDEIO::UDS_MIME_TYPE)
mimeType = (*eIt).m_str;
- else if ((*eIt).m_uds == KIO::UDS_ACCESS)
+ else if ((*eIt).m_uds == TDEIO::UDS_ACCESS)
flags = (*eIt).m_long;
}
if ((mimeType == "message/rfc822-imap" || mimeType == "message/rfc822") &&
@@ -1519,7 +1519,7 @@ KMFolderImap::ignoreJobsForMessage( KMMessage* msg )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
+void KMFolderImap::slotGetMessagesData(TDEIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
@@ -1687,7 +1687,7 @@ KMFolderImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
}
//-----------------------------------------------------------------------------
-void KMFolderImap::getMessagesResult(KIO::Job * job, bool lastSet)
+void KMFolderImap::getMessagesResult(TDEIO::Job * job, bool lastSet)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
@@ -1704,14 +1704,14 @@ void KMFolderImap::getMessagesResult(KIO::Job * job, bool lastSet)
//-----------------------------------------------------------------------------
-void KMFolderImap::slotGetLastMessagesResult(KIO::Job * job)
+void KMFolderImap::slotGetLastMessagesResult(TDEIO::Job * job)
{
getMessagesResult(job, true);
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotGetMessagesResult(KIO::Job * job)
+void KMFolderImap::slotGetMessagesResult(TDEIO::Job * job)
{
getMessagesResult(job, false);
}
@@ -1735,18 +1735,18 @@ void KMFolderImap::createFolder(const TQString &name, const TQString& parentPath
}
url.setPath( path );
- KIO::SimpleJob *job = KIO::mkdir(url);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::mkdir(url);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), folder() );
jd.items = name;
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- this, TQT_SLOT(slotCreateFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ this, TQT_SLOT(slotCreateFolderResult(TDEIO::Job *)));
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
+void KMFolderImap::slotCreateFolderResult(TDEIO::Job * job)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
@@ -1757,7 +1757,7 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
if (job->error())
{
- if ( job->error() == KIO::ERR_COULD_NOT_MKDIR ) {
+ if ( job->error() == TDEIO::ERR_COULD_NOT_MKDIR ) {
// Creating a folder failed, remove it from the tree.
account()->listDirectory( );
}
@@ -1807,7 +1807,7 @@ bool KMFolderImap::autoExpunge()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotSimpleData(KIO::Job * job, const TQByteArray & data)
+void KMFolderImap::slotSimpleData(TDEIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
@@ -1837,12 +1837,12 @@ void KMFolderImap::deleteMessage(KMMessage * msg)
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);
+ TDEIO::SimpleJob *job = TDEIO::file_delete(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(TDEIO::Job *)));
}
void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList)
@@ -1870,12 +1870,12 @@ void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList)
url.setPath(msg_parent->imapPath() + ";UID=" + uid);
if ( account()->makeConnection() != ImapAccountBase::Connected )
return;
- KIO::SimpleJob *job = KIO::file_delete(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::file_delete(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(TDEIO::Job *)));
}
}
@@ -1968,7 +1968,7 @@ void KMFolderImap::setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool to
// 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, TQT_SLOT(slotListFolderResult(KIO::Job *)));
+ disconnect(this, TQT_SLOT(slotListFolderResult(TDEIO::Job *)));
quiet( false );
reallyGetFolder( TQString() );
}
@@ -2070,13 +2070,13 @@ void KMFolderImap::expungeFolder(KMFolderImap * aFolder, bool quiet)
url.setPath(aFolder->imapPath() + ";UID=*");
if ( account()->makeConnection() != ImapAccountBase::Connected )
return;
- KIO::SimpleJob *job = KIO::file_delete(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::file_delete(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = quiet;
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(TDEIO::Job *)));
}
//-----------------------------------------------------------------------------
@@ -2132,19 +2132,19 @@ bool KMFolderImap::processNewMail(bool)
false,
account()->useSSL() || account()->useTLS() );
- KIO::SimpleJob *job = KIO::stat(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::stat(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd(url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- TQT_SLOT(slotStatResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ TQT_SLOT(slotStatResult(TDEIO::Job *)));
return true;
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotStatResult(KIO::Job * job)
+void KMFolderImap::slotStatResult(TDEIO::Job * job)
{
slotCompleteMailCheckProgress();
ImapAccountBase::JobIterator it = account()->findJob(job);
@@ -2154,10 +2154,10 @@ void KMFolderImap::slotStatResult(KIO::Job * job)
{
account()->handleJobError( job, i18n("Error while getting folder information.") );
} else {
- KIO::UDSEntry uds = static_cast<KIO::StatJob*>(job)->statResult();
- for (KIO::UDSEntry::ConstIterator it = uds.begin(); it != uds.end(); it++)
+ TDEIO::UDSEntry uds = static_cast<TDEIO::StatJob*>(job)->statResult();
+ for (TDEIO::UDSEntry::ConstIterator it = uds.begin(); it != uds.end(); it++)
{
- if ((*it).m_uds == KIO::UDS_SIZE)
+ if ((*it).m_uds == TDEIO::UDS_SIZE)
{
if (mReadOnly)
{
@@ -2242,13 +2242,13 @@ int KMFolderImap::expungeContents()
url.setPath( imapPath() + ";UID=1:*");
if ( account()->makeConnection() == ImapAccountBase::Connected )
{
- KIO::SimpleJob *job = KIO::file_delete(url, false);
- KIO::Scheduler::assignJobToSlave(account()->slave(), job);
+ TDEIO::SimpleJob *job = TDEIO::file_delete(url, false);
+ TDEIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = true;
account()->insertJob(job, jd);
- connect(job, TQT_SIGNAL(result(KIO::Job *)),
- account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(TDEIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(TDEIO::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