From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: 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 --- kmail/folderutil.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'kmail/folderutil.cpp') 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( parentFolder->storage() ); + if ( tqparentFolder && tqparentFolder->folderType() == KMFolderTypeImap ) { + KMFolderImap* selectedStorage = static_cast( 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( newFolder->storage() ); - selectedStorage->createFolder(folderName, parent); // create it on the server - newStorage->initializeFrom( selectedStorage, imapPath, TQString::null ); - static_cast(parentFolder->storage())->setAccount( selectedStorage->account() ); + selectedStorage->createFolder(folderName, tqparent); // create it on the server + newStorage->initializeFrom( selectedStorage, imapPath, TQString() ); + static_cast(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( parentFolder->storage() ); + KMFolderCachedImap* selectedStorage = static_cast( tqparentFolder->storage() ); KMFolderCachedImap* newStorage = static_cast( 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("The folder you deleted was associated with the account " "%1 which delivered mail into it. The folder the account " "delivers new mail into was reset to the main Inbox folder.").arg( (*it)->name())); -- cgit v1.2.1