summaryrefslogtreecommitdiffstats
path: root/kmail/kmfoldermgr.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/kmfoldermgr.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfoldermgr.cpp')
-rw-r--r--kmail/kmfoldermgr.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp
index 81b6ca973..3d42a2d38 100644
--- a/kmail/kmfoldermgr.cpp
+++ b/kmail/kmfoldermgr.cpp
@@ -39,7 +39,7 @@ using KMail::CopyFolderJob;
//-----------------------------------------------------------------------------
KMFolderMgr::KMFolderMgr(const TQString& aBasePath, KMFolderDirType dirType):
- TQObject(), mDir(this, TQString::null, dirType)
+ TQObject(), mDir(this, TQString(), dirType)
{
if ( dirType == KMStandardDir )
mDir.setBaseURL( I18N_NOOP("Local Folders") );
@@ -53,7 +53,7 @@ KMFolderMgr::KMFolderMgr(const TQString& aBasePath, KMFolderDirType dirType):
//-----------------------------------------------------------------------------
KMFolderMgr::~KMFolderMgr()
{
- mBasePath = TQString::null;
+ mBasePath = TQString();
}
@@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr,
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly)
+KMFolder* KMFolderMgr::tqfind(const TQString& folderName, bool foldersOnly)
{
KMFolderNode* node;
@@ -234,7 +234,7 @@ KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly)
//-----------------------------------------------------------------------------
KMFolder* KMFolderMgr::findById(const uint id)
{
- return findIdString( TQString::null, id );
+ return findIdString( TQString(), id );
}
//-----------------------------------------------------------------------------
@@ -303,7 +303,7 @@ KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr,
{
KMFolder* folder = 0;
if ( id == 0 )
- folder = find(aFolderName);
+ folder = tqfind(aFolderName);
else
folder = findById(id);
@@ -366,20 +366,20 @@ void KMFolderMgr::removeFolder(KMFolder* aFolder)
aFolder->remove();
}
-KMFolder* KMFolderMgr::parentFolder( KMFolder* folder )
+KMFolder* KMFolderMgr::tqparentFolder( KMFolder* folder )
{
- // find the parent folder by stripping "." and ".directory" from the name
- KMFolderDir* fdir = folder->parent();
- 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
- parent = fdir->parent()->hasNamedFolder( parentName );
+ // find the tqparent folder by stripping "." and ".directory" from the name
+ KMFolderDir* fdir = folder->tqparent();
+ TQString tqparentName = fdir->name();
+ tqparentName = tqparentName.mid( 1, tqparentName.length()-11 );
+ KMFolderNode* tqparent = fdir->hasNamedFolder( tqparentName );
+ if ( !tqparent && fdir->tqparent() ) // dimap obviously has a different structure
+ tqparent = fdir->tqparent()->hasNamedFolder( tqparentName );
- KMFolder* parentF = 0;
- if ( parent )
- parentF = dynamic_cast<KMFolder*>( parent );
- return parentF;
+ KMFolder* tqparentF = 0;
+ if ( tqparent )
+ tqparentF = dynamic_cast<KMFolder*>( tqparent );
+ return tqparentF;
}
void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success)
@@ -389,7 +389,7 @@ void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success)
return;
}
- KMFolderDir* fdir = aFolder->parent();
+ KMFolderDir* fdir = aFolder->tqparent();
KMFolderNode* fN;
for (fN = fdir->first(); fN != 0; fN = fdir->next()) {
if (fN->isDir() && (fN->name() == "." + aFolder->fileName() + ".directory")) {
@@ -397,24 +397,24 @@ void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success)
break;
}
}
- KMFolder* parentF = parentFolder( aFolder );
+ KMFolder* tqparentF = tqparentFolder( aFolder );
// aFolder will be deleted by the next call!
- aFolder->parent()->remove(aFolder);
+ aFolder->tqparent()->remove(aFolder);
- // update the children state
- if ( parentF )
+ // update the tqchildren state
+ if ( tqparentF )
{
- if ( parentF != aFolder )
+ if ( tqparentF != aFolder )
{
- parentF->storage()->updateChildrenState();
+ tqparentF->storage()->updateChildrenState();
}
}
else
- kdWarning(5006) << "Can not find parent folder" << endl;
+ kdWarning(5006) << "Can not find tqparent folder" << endl;
if (aFolder == mRemoveOrig) {
- // call only if we're removing the original parent folder
+ // call only if we're removing the original tqparent folder
contentsChanged();
mRemoveOrig = 0;
}
@@ -425,7 +425,7 @@ void KMFolderMgr::removeDirAux(KMFolderDir* aFolderDir)
TQDir dir;
TQString folderDirLocation = aFolderDir->path();
aFolderDir->clear();
- aFolderDir->parent()->remove(aFolderDir);
+ aFolderDir->tqparent()->remove(aFolderDir);
dir.rmdir(folderDirLocation);
}
@@ -460,7 +460,7 @@ void KMFolderMgr::createFolderList(TQStringList *str,
void KMFolderMgr::createI18nFolderList(TQStringList *str,
TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
- createFolderList( str, folders, 0, TQString::null, true );
+ createFolderList( str, folders, 0, TQString(), true );
}
//-----------------------------------------------------------------------------