diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /knode/knfoldermanager.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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 'knode/knfoldermanager.cpp')
-rw-r--r-- | knode/knfoldermanager.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/knode/knfoldermanager.cpp b/knode/knfoldermanager.cpp index 5acb41866..7e3465bff 100644 --- a/knode/knfoldermanager.cpp +++ b/knode/knfoldermanager.cpp @@ -12,7 +12,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ -#include <qdir.h> +#include <tqdir.h> #include <klocale.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ KNFolderManager::KNFolderManager(KNArticleManager *a) : a_rtManager(a) { //standard folders - QString dir(locateLocal("data","knode/")+"folders/"); + TQString dir(locateLocal("data","knode/")+"folders/"); if (dir.isNull()) { KNHelper::displayInternalFileError(); return; @@ -68,7 +68,7 @@ KNFolderManager::KNFolderManager(KNArticleManager *a) : a_rtManager(a) KNFolderManager::~KNFolderManager() { - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) delete (*it); } @@ -128,7 +128,7 @@ bool KNFolderManager::unloadHeaders(KNFolder *f, bool force) KNFolder* KNFolderManager::folder(int i) { - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) if ( (*it)->id() == i ) return (*it); return 0; @@ -151,11 +151,11 @@ bool KNFolderManager::deleteFolder(KNFolder *f) if(!f || f->isRootFolder() || f->isStandardFolder() || f->lockedArticles()>0) return false; - QValueList<KNFolder*> del; + TQValueList<KNFolder*> del; KNCollection *p; // find all subfolders of the folder we want to delete - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { p = (*it)->parent(); while ( p ) { if ( p == f ) { @@ -171,7 +171,7 @@ bool KNFolderManager::deleteFolder(KNFolder *f) emit folderRemoved(f); del.append(f); - for ( QValueList<KNFolder*>::Iterator it = del.begin(); it != del.end(); ++it ) { + for ( TQValueList<KNFolder*>::Iterator it = del.begin(); it != del.end(); ++it ) { if ( c_urrentFolder == (*it) ) c_urrentFolder = 0; @@ -231,7 +231,7 @@ int KNFolderManager::unsentForAccount(int accId) { int cnt=0; - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { for ( int idx = 0; idx < (*it)->length(); ++idx ) { KNLocalArticle *a = (*it)->at( idx ); if ( a->serverId() == accId && a->doPost() && !a->posted() ) @@ -255,7 +255,7 @@ void KNFolderManager::compactFolder(KNFolder *f) void KNFolderManager::compactAll(KNCleanUp *cup) { - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) if ( !(*it)->isRootFolder() && (*it)->lockedArticles() == 0 ) cup->appendCollection( (*it) ); } @@ -288,7 +288,7 @@ void KNFolderManager::importFromMBox(KNFolder *f) KNFile *file = helper.getFile(i18n("Import MBox Folder")); KNLocalArticle::List list; KNLocalArticle *art; - QString s; + TQString s; int artStart=0, artEnd=0; bool done=true; @@ -322,7 +322,7 @@ void KNFolderManager::importFromMBox(KNFolder *f) if (artEnd != -1) { file->at(artStart); // seek the first character of the article int size=artEnd-artStart; - QCString buff(size+10); + TQCString buff(size+10); int readBytes=file->readBlock(buff.data(), size); if (readBytes != -1) { @@ -341,7 +341,7 @@ void KNFolderManager::importFromMBox(KNFolder *f) if ((int)file->size() > artStart) { file->at(artStart); // seek the first character of the article int size=file->size()-artStart; - QCString buff(size+10); + TQCString buff(size+10); int readBytes=file->readBlock(buff.data(), size); if (readBytes != -1) { @@ -366,7 +366,7 @@ void KNFolderManager::importFromMBox(KNFolder *f) if (!list.isEmpty()) knGlobals.articleManager()->moveIntoFolder(list, f); - knGlobals.setStatusMsg(QString::null); + knGlobals.setStatusMsg(TQString::null); knGlobals.top->setCursorBusy(false); } @@ -387,15 +387,15 @@ void KNFolderManager::exportToMBox(KNFolder *f) } KNSaveHelper helper(f->name()+".mbox", knGlobals.topWidget); - QFile *file = helper.getFile(i18n("Export Folder")); + TQFile *file = helper.getFile(i18n("Export Folder")); if (file) { knGlobals.top->setCursorBusy(true); knGlobals.setStatusMsg(i18n(" Exporting articles...")); knGlobals.top->secureProcessEvents(); - QTextStream ts(file); - ts.setEncoding(QTextStream::Latin1); + TQTextStream ts(file); + ts.setEncoding(TQTextStream::Latin1); KNLocalArticle *a; for(int idx=0; idx<f->length(); idx++) { @@ -415,7 +415,7 @@ void KNFolderManager::exportToMBox(KNFolder *f) knGlobals.top->secureProcessEvents(); } - knGlobals.setStatusMsg(QString::null); + knGlobals.setStatusMsg(TQString::null); knGlobals.top->setCursorBusy(false); } } @@ -423,14 +423,14 @@ void KNFolderManager::exportToMBox(KNFolder *f) void KNFolderManager::syncFolders() { - QString dir(locateLocal("data","knode/")+"folders/"); + TQString dir(locateLocal("data","knode/")+"folders/"); if (dir.isNull()) { KNHelper::displayInternalFileError(); return; } //sync - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { if ( !(*it)->isRootFolder() ) (*it)->syncIndex(); (*it)->saveInfo(); @@ -441,7 +441,7 @@ void KNFolderManager::syncFolders() int KNFolderManager::loadCustomFolders() { int cnt=0; - QString dir(locateLocal("data","knode/")+"folders/"); + TQString dir(locateLocal("data","knode/")+"folders/"); KNFolder *f; if (dir.isNull()) { @@ -449,9 +449,9 @@ int KNFolderManager::loadCustomFolders() return 0; } - QDir d(dir); - QStringList entries(d.entryList("custom_*.info")); // ignore info files of standard folders - for(QStringList::Iterator it=entries.begin(); it != entries.end(); ++it) { + TQDir d(dir); + TQStringList entries(d.entryList("custom_*.info")); // ignore info files of standard folders + for(TQStringList::Iterator it=entries.begin(); it != entries.end(); ++it) { f=new KNFolder(); if(f->readInfo(d.absFilePath(*it))) { if(f->id()>l_astId) @@ -465,7 +465,7 @@ int KNFolderManager::loadCustomFolders() // set parents if(cnt>0) { - for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { + for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) { if ( !(*it)->isRootFolder() ) { // the root folder has no parent KNFolder *par = folder( (*it)->parentId() ); if ( !par ) |