summaryrefslogtreecommitdiffstats
path: root/kmail/kmacctcachedimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmacctcachedimap.cpp')
-rw-r--r--kmail/kmacctcachedimap.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp
index fbdc79252..2305b0809 100644
--- a/kmail/kmacctcachedimap.cpp
+++ b/kmail/kmacctcachedimap.cpp
@@ -53,10 +53,10 @@ using KMail::AccountManager;
#include <kapplication.h>
#include <kconfig.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
KMAcctCachedImap::KMAcctCachedImap( AccountManager* aOwner,
- const QString& aAccountName, uint id )
+ const TQString& aAccountName, uint id )
: KMail::ImapAccountBase( aOwner, aAccountName, id ), mFolder( 0 ),
mAnnotationCheckPassed(false),
mGroupwareType( GroupwareKolab ),
@@ -75,7 +75,7 @@ KMAcctCachedImap::~KMAcctCachedImap()
//-----------------------------------------------------------------------------
-QString KMAcctCachedImap::type() const
+TQString KMAcctCachedImap::type() const
{
return "cachedimap";
}
@@ -115,8 +115,8 @@ void KMAcctCachedImap::setAutoExpunge( bool /*aAutoExpunge*/ )
void KMAcctCachedImap::killAllJobs( bool disconnectSlave )
{
//kdDebug(5006) << "killAllJobs: disconnectSlave=" << disconnectSlave << " " << mapJobData.count() << " jobs in map." << endl;
- QValueList<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave );
- for( QValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
+ TQValueList<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave );
+ for( TQValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
KMFolderCachedImap *fld = *it;
fld->resetSyncState();
fld->setContentState(KMFolderCachedImap::imapNoInformation);
@@ -127,12 +127,12 @@ void KMAcctCachedImap::killAllJobs( bool disconnectSlave )
//-----------------------------------------------------------------------------
// Common between killAllJobs and the destructor - which shouldn't call sendFolderComplete
-QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave )
+TQValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave )
{
// Make list of folders to reset. This must be done last, since folderComplete
// can trigger the next queued mail check already.
- QValueList<KMFolderCachedImap*> folderList;
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQValueList<KMFolderCachedImap*> folderList;
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for (; it != mapJobData.end(); ++it) {
if ((*it).parent)
folderList << static_cast<KMFolderCachedImap*>((*it).parent->storage());
@@ -145,7 +145,7 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc
mapJobData.clear();
// Clear the joblist. Make SURE to stop the job emitting "finished"
- for( QPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it )
+ for( TQPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it )
it.current()->setPassiveDestructor( true );
KMAccount::deleteFolderJobs();
@@ -160,8 +160,8 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc
void KMAcctCachedImap::cancelMailCheck()
{
// Make list of folders to reset, like in killAllJobs
- QValueList<KMFolderCachedImap*> folderList;
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQValueList<KMFolderCachedImap*> folderList;
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for (; it != mapJobData.end(); ++it) {
if ( (*it).cancellable && (*it).parent )
folderList << static_cast<KMFolderCachedImap*>((*it).parent->storage());
@@ -170,7 +170,7 @@ void KMAcctCachedImap::cancelMailCheck()
ImapAccountBase::cancelMailCheck();
// Reset sync states and emit folderComplete, this is important for
// KMAccount::checkingMail() to be reset, in case we restart checking mail later.
- for( QValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
+ for( TQValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
KMFolderCachedImap *fld = *it;
fld->resetSyncState();
fld->setContentState(KMFolderCachedImap::imapNoInformation);
@@ -182,7 +182,7 @@ void KMAcctCachedImap::cancelMailCheck()
//-----------------------------------------------------------------------------
void KMAcctCachedImap::killJobsForItem(KMFolderTreeItem * fti)
{
- QMap<KIO::Job *, jobData>::Iterator it = mapJobData.begin();
+ TQMap<KIO::Job *, jobData>::Iterator it = mapJobData.begin();
while (it != mapJobData.end())
{
if (it.data().parent == fti->folder())
@@ -201,8 +201,8 @@ void KMAcctCachedImap::slotCheckQueuedFolders()
mMailCheckFolders.append( mFoldersQueuedForChecking.front() );
mFoldersQueuedForChecking.pop_front();
if ( mFoldersQueuedForChecking.isEmpty() )
- disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckQueuedFolders() ) );
+ disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckQueuedFolders() ) );
kmkernel->acctMgr()->singleCheckMail(this, true);
mMailCheckFolders.clear();
@@ -235,10 +235,10 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder,
// reset namespace todo
if ( folder == mFolder ) {
- QStringList nsToList = namespaces()[PersonalNS];
- QStringList otherNSToCheck = namespaces()[OtherUsersNS];
+ TQStringList nsToList = namespaces()[PersonalNS];
+ TQStringList otherNSToCheck = namespaces()[OtherUsersNS];
otherNSToCheck += namespaces()[SharedNS];
- for ( QStringList::Iterator it = otherNSToCheck.begin();
+ for ( TQStringList::Iterator it = otherNSToCheck.begin();
it != otherNSToCheck.end(); ++it ) {
if ( (*it).isEmpty() ) {
// empty namespaces are included in the "normal" listing
@@ -251,25 +251,25 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder,
Q_ASSERT( !mMailCheckProgressItem );
mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem(
- "MailCheck" + QString::number( id() ),
- QStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway
- QString::null,
+ "MailCheck" + TQString::number( id() ),
+ TQStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway
+ TQString::null,
true, // can be cancelled
useSSL() || useTLS() );
- connect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) );
+ connect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) );
folder->setAccount(this);
- connect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
+ connect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
folder->serverSync( recurse );
}
void KMAcctCachedImap::postProcessNewMail( KMFolderCachedImap* folder, bool )
{
mNoopTimer.start( 60000 ); // send a noop every minute to avoid "connection broken" errors
- disconnect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
+ disconnect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
mMailCheckProgressItem->setComplete();
mMailCheckProgressItem = 0;
@@ -295,7 +295,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder,
if ( folder->imapPath() != "/INBOX/" ) {
// new mail in INBOX is processed with KMAccount::processNewMsg() and
// therefore doesn't need to be counted here
- const QString folderId = folder->folder()->idString();
+ const TQString folderId = folder->folder()->idString();
int newInFolder = countUnread;
if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() )
newInFolder -= mUnreadBeforeCheck[folderId];
@@ -323,12 +323,12 @@ void KMAcctCachedImap::readConfig( /*const*/ KConfig/*Base*/ & config ) {
// Apparently this method is only ever called once (from KMKernel::init) so this is ok
mPreviouslyDeletedFolders = config.readListEntry( "deleted-folders" );
mDeletedFolders.clear(); // but just in case...
- const QStringList oldPaths = config.readListEntry( "renamed-folders-paths" );
- const QStringList newNames = config.readListEntry( "renamed-folders-names" );
- QStringList::const_iterator it = oldPaths.begin();
- QStringList::const_iterator nameit = newNames.begin();
+ const TQStringList oldPaths = config.readListEntry( "renamed-folders-paths" );
+ const TQStringList newNames = config.readListEntry( "renamed-folders-names" );
+ TQStringList::const_iterator it = oldPaths.begin();
+ TQStringList::const_iterator nameit = newNames.begin();
for( ; it != oldPaths.end() && nameit != newNames.end(); ++it, ++nameit ) {
- addRenamedFolder( *it, QString::null, *nameit );
+ addRenamedFolder( *it, TQString::null, *nameit );
}
mGroupwareType = (GroupwareType)config.readNumEntry( "groupwareType", GroupwareKolab );
}
@@ -337,9 +337,9 @@ void KMAcctCachedImap::writeConfig( KConfig/*Base*/ & config ) /*const*/ {
ImapAccountBase::writeConfig( config );
config.writeEntry( "deleted-folders", mDeletedFolders + mPreviouslyDeletedFolders );
config.writeEntry( "renamed-folders-paths", mRenamedFolders.keys() );
- const QValueList<RenamedFolder> values = mRenamedFolders.values();
- QStringList lstNames;
- QValueList<RenamedFolder>::const_iterator it = values.begin();
+ const TQValueList<RenamedFolder> values = mRenamedFolders.values();
+ TQStringList lstNames;
+ TQValueList<RenamedFolder>::const_iterator it = values.begin();
for ( ; it != values.end() ; ++it )
lstNames.append( (*it).mNewName );
config.writeEntry( "renamed-folders-names", lstNames );
@@ -358,12 +358,12 @@ void KMAcctCachedImap::invalidateIMAPFolders( KMFolderCachedImap* folder )
folder->setAccount(this);
- QStringList strList;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList strList;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList( &strList, &folderList,
- folder->folder()->child(), QString::null,
+ folder->folder()->child(), TQString::null,
false );
- QValueList<QGuardedPtr<KMFolder> >::Iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::Iterator it;
mCountLastUnread = 0;
mUnreadBeforeCheck.clear();
@@ -404,20 +404,20 @@ void KMAcctCachedImap::addDeletedFolder( KMFolder* folder )
}
}
-void KMAcctCachedImap::addDeletedFolder( const QString& imapPath )
+void KMAcctCachedImap::addDeletedFolder( const TQString& imapPath )
{
mDeletedFolders << imapPath;
}
-QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath ) const
+TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath ) const
{
- QStringList lst;
- for ( QStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) {
+ TQStringList lst;
+ for ( TQStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) {
if ( (*it).startsWith( subFolderPath ) )
// We must reverse the order, so that sub sub sub folders are deleted first
lst.prepend( *it );
}
- for ( QStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) {
+ for ( TQStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) {
if ( (*it).startsWith( subFolderPath ) )
lst.prepend( *it );
}
@@ -426,28 +426,28 @@ QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath )
return lst;
}
-bool KMAcctCachedImap::isDeletedFolder( const QString& subFolderPath ) const
+bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const
{
return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end();
}
-bool KMAcctCachedImap::isPreviouslyDeletedFolder( const QString& subFolderPath ) const
+bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const
{
return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end();
}
-void KMAcctCachedImap::removeDeletedFolder( const QString& subFolderPath )
+void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath )
{
mDeletedFolders.remove( subFolderPath );
mPreviouslyDeletedFolders.remove( subFolderPath );
}
-void KMAcctCachedImap::addRenamedFolder( const QString& subFolderPath, const QString& oldLabel, const QString& newName )
+void KMAcctCachedImap::addRenamedFolder( const TQString& subFolderPath, const TQString& oldLabel, const TQString& newName )
{
mRenamedFolders.insert( subFolderPath, RenamedFolder( oldLabel, newName ) );
}
-void KMAcctCachedImap::removeRenamedFolder( const QString& subFolderPath )
+void KMAcctCachedImap::removeRenamedFolder( const TQString& subFolderPath )
{
mRenamedFolders.remove( subFolderPath );
}
@@ -458,7 +458,7 @@ void KMAcctCachedImap::slotProgressItemCanceled( ProgressItem* )
killAllJobs( abortConnection );
if ( abortConnection ) {
// If we were trying to connect, tell kmfoldercachedimap so that it moves on
- emit connectionResult( KIO::ERR_USER_CANCELED, QString::null );
+ emit connectionResult( KIO::ERR_USER_CANCELED, TQString::null );
}
}
@@ -468,12 +468,12 @@ FolderStorage* const KMAcctCachedImap::rootFolder() const
}
-QString KMAcctCachedImap::renamedFolder( const QString& imapPath ) const
+TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const
{
- QMap<QString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath );
+ TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath );
if ( renit != mRenamedFolders.end() )
return (*renit).mNewName;
- return QString::null;
+ return TQString::null;
}
#include "kmacctcachedimap.moc"