summaryrefslogtreecommitdiffstats
path: root/kmail/kmfoldermgr.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/kmfoldermgr.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/kmfoldermgr.cpp')
-rw-r--r--kmail/kmfoldermgr.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp
index ece90c239..81b6ca973 100644
--- a/kmail/kmfoldermgr.cpp
+++ b/kmail/kmfoldermgr.cpp
@@ -16,7 +16,7 @@
#include <unistd.h>
#include <time.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,8 +38,8 @@ using KMail::RenameJob;
using KMail::CopyFolderJob;
//-----------------------------------------------------------------------------
-KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType):
- QObject(), mDir(this, QString::null, dirType)
+KMFolderMgr::KMFolderMgr(const TQString& aBasePath, KMFolderDirType dirType):
+ TQObject(), mDir(this, TQString::null, dirType)
{
if ( dirType == KMStandardDir )
mDir.setBaseURL( I18N_NOOP("Local Folders") );
@@ -53,7 +53,7 @@ KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType):
//-----------------------------------------------------------------------------
KMFolderMgr::~KMFolderMgr()
{
- mBasePath = QString::null;
+ mBasePath = TQString::null;
}
@@ -77,7 +77,7 @@ void KMFolderMgr::expireAll() {
#define DO_FOR_ALL(function, folder_code) \
KMFolderNode* node; \
- QPtrListIterator<KMFolderNode> it(*dir); \
+ TQPtrListIterator<KMFolderNode> it(*dir); \
for ( ; (node = it.current()); ) { \
++it; \
if (node->isDir()) continue; \
@@ -125,20 +125,20 @@ void KMFolderMgr::compactAllFolders(bool immediate, KMFolderDir* dir)
//-----------------------------------------------------------------------------
-void KMFolderMgr::setBasePath(const QString& aBasePath)
+void KMFolderMgr::setBasePath(const TQString& aBasePath)
{
assert(!aBasePath.isNull());
if (aBasePath[0] == '~')
{
- mBasePath = QDir::homeDirPath();
+ mBasePath = TQDir::homeDirPath();
mBasePath.append("/");
mBasePath.append(aBasePath.mid(1));
}
else
mBasePath = aBasePath;
- QFileInfo info( mBasePath );
+ TQFileInfo info( mBasePath );
// FIXME We should ask for an alternative dir, rather than bailing out,
// I guess - till
@@ -159,11 +159,11 @@ void KMFolderMgr::setBasePath(const QString& aBasePath)
}
} else {
// ~/Mail (or whatever the user specified) doesn't exist, create it
- if ( ::mkdir( QFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) {
+ if ( ::mkdir( TQFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) {
KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n"
"please make sure that you can view and "
"modify the content of the folder '%2'.")
- .arg( mBasePath ).arg( QDir::homeDirPath() ) );
+ .arg( mBasePath ).arg( TQDir::homeDirPath() ) );
::exit(-1);
}
}
@@ -174,7 +174,7 @@ void KMFolderMgr::setBasePath(const QString& aBasePath)
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
+KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr,
KMFolderType aFolderType,
KMFolderDir *aFolderDir)
{
@@ -190,7 +190,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
KMFolderCachedImap *storage = static_cast<KMFolderCachedImap*>( fldDir->owner()->storage() );
KMAcctCachedImap *account = storage->account();
// guess imap path
- QString imapPath = storage->imapPath();
+ TQString imapPath = storage->imapPath();
if ( !imapPath.endsWith( "/" ) )
imapPath += "/";
imapPath += fName;
@@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly)
+KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly)
{
KMFolderNode* node;
@@ -234,11 +234,11 @@ KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly)
//-----------------------------------------------------------------------------
KMFolder* KMFolderMgr::findById(const uint id)
{
- return findIdString( QString::null, id );
+ return findIdString( TQString::null, id );
}
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::findIdString( const QString& folderId,
+KMFolder* KMFolderMgr::findIdString( const TQString& folderId,
const uint id,
KMFolderDir *dir )
{
@@ -261,7 +261,7 @@ KMFolder* KMFolderMgr::findIdString( const QString& folderId,
return 0;
}
-void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix,
+void KMFolderMgr::getFolderURLS( TQStringList& flist, const TQString& prefix,
KMFolderDir *adir )
{
KMFolderDir* dir = adir ? adir : &mDir;
@@ -276,20 +276,20 @@ void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix,
)
}
-KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath,
- const QString& prefix,
+KMFolder* KMFolderMgr::getFolderByURL( const TQString& vpath,
+ const TQString& prefix,
KMFolderDir *adir )
{
KMFolderDir* dir = adir ? adir : &mDir;
DO_FOR_ALL(
{
- QString a = prefix + "/" + folder->name();
+ TQString a = prefix + "/" + folder->name();
KMFolder * mfolder = getFolderByURL( vpath, a,child );
if ( mfolder )
return mfolder;
},
{
- QString comp = prefix + "/" + folder->name();
+ TQString comp = prefix + "/" + folder->name();
if ( comp == vpath )
return folder;
}
@@ -298,7 +298,7 @@ KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath,
}
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::findOrCreate(const QString& aFolderName, bool sysFldr,
+KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr,
const uint id)
{
KMFolder* folder = 0;
@@ -346,7 +346,7 @@ void KMFolderMgr::remove(KMFolder* aFolder)
{
// call remove for every child
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it(*aFolder->child());
+ TQPtrListIterator<KMFolderNode> it(*aFolder->child());
for ( ; (node = it.current()); )
{
++it;
@@ -361,8 +361,8 @@ void KMFolderMgr::remove(KMFolder* aFolder)
void KMFolderMgr::removeFolder(KMFolder* aFolder)
{
- connect(aFolder, SIGNAL(removed(KMFolder*, bool)),
- this, SLOT(removeFolderAux(KMFolder*, bool)));
+ connect(aFolder, TQT_SIGNAL(removed(KMFolder*, bool)),
+ this, TQT_SLOT(removeFolderAux(KMFolder*, bool)));
aFolder->remove();
}
@@ -370,7 +370,7 @@ KMFolder* KMFolderMgr::parentFolder( KMFolder* folder )
{
// find the parent folder by stripping "." and ".directory" from the name
KMFolderDir* fdir = folder->parent();
- QString parentName = fdir->name();
+ TQString parentName = fdir->name();
parentName = parentName.mid( 1, parentName.length()-11 );
KMFolderNode* parent = fdir->hasNamedFolder( parentName );
if ( !parent && fdir->parent() ) // dimap obviously has a different structure
@@ -422,8 +422,8 @@ void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success)
void KMFolderMgr::removeDirAux(KMFolderDir* aFolderDir)
{
- QDir dir;
- QString folderDirLocation = aFolderDir->path();
+ TQDir dir;
+ TQString folderDirLocation = aFolderDir->path();
aFolderDir->clear();
aFolderDir->parent()->remove(aFolderDir);
dir.rmdir(folderDirLocation);
@@ -450,24 +450,24 @@ void KMFolderMgr::reload(void)
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders)
+void KMFolderMgr::createFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
createFolderList( str, folders, 0, "" );
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createI18nFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders)
+void KMFolderMgr::createI18nFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
- createFolderList( str, folders, 0, QString::null, true );
+ createFolderList( str, folders, 0, TQString::null, true );
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders,
+void KMFolderMgr::createFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders,
KMFolderDir *adir,
- const QString& prefix,
+ const TQString& prefix,
bool i18nized)
{
KMFolderDir* dir = adir ? adir : &mDir;
@@ -574,14 +574,14 @@ void KMFolderMgr::moveFolder( KMFolder* folder, KMFolderDir *newParent )
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::renameFolder( KMFolder* folder, const QString& newName,
+void KMFolderMgr::renameFolder( KMFolder* folder, const TQString& newName,
KMFolderDir *newParent )
{
RenameJob* job = new RenameJob( folder->storage(), newName, newParent );
- connect( job, SIGNAL( renameDone( QString, bool ) ),
- this, SLOT( slotRenameDone( QString, bool ) ) );
- connect( job, SIGNAL( renameDone( QString, bool ) ),
- this, SIGNAL( folderMoveOrCopyOperationFinished() ) );
+ connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ),
+ this, TQT_SLOT( slotRenameDone( TQString, bool ) ) );
+ connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ),
+ this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) );
job->start();
}
@@ -590,13 +590,13 @@ void KMFolderMgr::copyFolder( KMFolder* folder, KMFolderDir *newParent )
{
kdDebug(5006) << "Copy folder: " << folder->prettyURL() << endl;
CopyFolderJob* job = new CopyFolderJob( folder->storage(), newParent );
- connect( job, SIGNAL( folderCopyComplete( bool ) ),
- this, SIGNAL( folderMoveOrCopyOperationFinished() ) );
+ connect( job, TQT_SIGNAL( folderCopyComplete( bool ) ),
+ this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) );
job->start();
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::slotRenameDone( QString, bool success )
+void KMFolderMgr::slotRenameDone( TQString, bool success )
{
kdDebug(5006) << k_funcinfo << success << endl;
}