diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/folderutil.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-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/folderutil.cpp')
-rw-r--r-- | kmail/folderutil.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kmail/folderutil.cpp b/kmail/folderutil.cpp index 8e65fff27..e5a604b8b 100644 --- a/kmail/folderutil.cpp +++ b/kmail/folderutil.cpp @@ -28,39 +28,39 @@ using namespace KMail; using namespace FolderUtil; -KMFolder *KMail::FolderUtil::createSubFolder( KMFolder *parentFolder, KMFolderDir *parentDir, +KMFolder *KMail::FolderUtil::createSubFolder( KMFolder *tqparentFolder, KMFolderDir *tqparentDir, const TQString &folderName, const TQString &namespaceName, KMFolderType localFolderType ) { KMFolder *newFolder = 0; - if ( parentFolder && parentFolder->folderType() == KMFolderTypeImap ) { - KMFolderImap* selectedStorage = static_cast<KMFolderImap*>( parentFolder->storage() ); + if ( tqparentFolder && tqparentFolder->folderType() == KMFolderTypeImap ) { + KMFolderImap* selectedStorage = static_cast<KMFolderImap*>( tqparentFolder->storage() ); KMAcctImap *anAccount = selectedStorage->account(); // check if a connection is available BEFORE creating the folder if (anAccount->makeConnection() == ImapAccountBase::Connected) { - newFolder = kmkernel->imapFolderMgr()->createFolder( folderName, false, KMFolderTypeImap, parentDir ); + newFolder = kmkernel->imapFolderMgr()->createFolder( folderName, false, KMFolderTypeImap, tqparentDir ); if ( newFolder ) { - TQString imapPath, parent; + TQString imapPath, tqparent; if ( !namespaceName.isEmpty() ) { // create folder with namespace - parent = anAccount->addPathToNamespace( namespaceName ); - imapPath = anAccount->createImapPath( parent, folderName ); + tqparent = anAccount->addPathToNamespace( namespaceName ); + imapPath = anAccount->createImapPath( tqparent, folderName ); } else { imapPath = anAccount->createImapPath( selectedStorage->imapPath(), folderName ); } KMFolderImap* newStorage = static_cast<KMFolderImap*>( newFolder->storage() ); - selectedStorage->createFolder(folderName, parent); // create it on the server - newStorage->initializeFrom( selectedStorage, imapPath, TQString::null ); - static_cast<KMFolderImap*>(parentFolder->storage())->setAccount( selectedStorage->account() ); + selectedStorage->createFolder(folderName, tqparent); // create it on the server + newStorage->initializeFrom( selectedStorage, imapPath, TQString() ); + static_cast<KMFolderImap*>(tqparentFolder->storage())->setAccount( selectedStorage->account() ); return newFolder; } } - } else if ( parentFolder && parentFolder->folderType() == KMFolderTypeCachedImap ) { + } else if ( tqparentFolder && tqparentFolder->folderType() == KMFolderTypeCachedImap ) { newFolder = kmkernel->dimapFolderMgr()->createFolder( folderName, false, KMFolderTypeCachedImap, - parentDir ); + tqparentDir ); if ( newFolder ) { - KMFolderCachedImap* selectedStorage = static_cast<KMFolderCachedImap*>( parentFolder->storage() ); + KMFolderCachedImap* selectedStorage = static_cast<KMFolderCachedImap*>( tqparentFolder->storage() ); KMFolderCachedImap* newStorage = static_cast<KMFolderCachedImap*>( newFolder->storage() ); newStorage->initializeFrom( selectedStorage ); if ( !namespaceName.isEmpty() ) { @@ -75,21 +75,21 @@ KMFolder *KMail::FolderUtil::createSubFolder( KMFolder *parentFolder, KMFolderDi // local folder Q_ASSERT( localFolderType == KMFolderTypeMaildir || localFolderType == KMFolderTypeMbox ); newFolder = kmkernel->folderMgr()->createFolder( folderName, false, localFolderType, - parentDir ); + tqparentDir ); return newFolder; } return newFolder; } -void KMail::FolderUtil::deleteFolder( KMFolder *folderToDelete, TQWidget *parent ) +void KMail::FolderUtil::deleteFolder( KMFolder *folderToDelete, TQWidget *tqparent ) { if ( folderToDelete->hasAccounts() ) { // this folder has an account, so we need to change that to the inbox for ( AccountList::Iterator it (folderToDelete->acctList()->begin() ), end( folderToDelete->acctList()->end() ); it != end; ++it ) { (*it)->setFolder( kmkernel->inboxFolder() ); - KMessageBox::information(parent, + KMessageBox::information(tqparent, i18n("<qt>The folder you deleted was associated with the account " "<b>%1</b> which delivered mail into it. The folder the account " "delivers new mail into was reset to the main Inbox folder.</qt>").arg( (*it)->name())); |