summaryrefslogtreecommitdiffstats
path: root/kmail/importjob.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/importjob.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/importjob.cpp')
-rw-r--r--kmail/importjob.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kmail/importjob.cpp b/kmail/importjob.cpp
index cddf6a65e..f7c44d19d 100644
--- a/kmail/importjob.cpp
+++ b/kmail/importjob.cpp
@@ -106,12 +106,12 @@ void KMail::ImportJob::abort( const TQString &errorMessage )
deleteLater();
}
-KMFolder * KMail::ImportJob::createSubFolder( KMFolder *parent, const TQString &folderName, mode_t permissions )
+KMFolder * KMail::ImportJob::createSubFolder( KMFolder *tqparent, const TQString &folderName, mode_t permissions )
{
- KMFolder *newFolder = FolderUtil::createSubFolder( parent, parent->child(), folderName, TQString(),
+ KMFolder *newFolder = FolderUtil::createSubFolder( tqparent, tqparent->child(), folderName, TQString(),
KMFolderTypeMaildir );
if ( !newFolder ) {
- abort( i18n( "Unable to create subfolder for folder '%1'." ).arg( parent->name() ) );
+ abort( i18n( "Unable to create subfolder for folder '%1'." ).arg( tqparent->name() ) );
return 0;
}
else {
@@ -131,7 +131,7 @@ void KMail::ImportJob::enqueueMessages( const KArchiveDirectory *dir, KMFolder *
const KArchiveDirectory *messageDir = dynamic_cast<const KArchiveDirectory*>( dir->entry( "cur" ) );
if ( messageDir ) {
Messages messagesToQueue;
- messagesToQueue.parent = folder;
+ messagesToQueue.tqparent = folder;
const TQStringList entries = messageDir->entries();
for ( uint i = 0; i < entries.size(); i++ ) {
const KArchiveEntry *entry = messageDir->entry( entries[i] );
@@ -199,7 +199,7 @@ void KMail::ImportJob::importNextMessage()
return;
}
- KMFolder *folder = messages.parent;
+ KMFolder *folder = messages.tqparent;
if ( folder != mCurrentFolder ) {
kdDebug(5006) << "importNextMessage(): Processed all messages in the current folder of the queue." << endl;
if ( mCurrentFolder ) {
@@ -211,7 +211,7 @@ void KMail::ImportJob::importNextMessage()
return;
}
kdDebug(5006) << "importNextMessage(): Current folder of queue is now: " << mCurrentFolder->name() << endl;
- mProgressItem->seStatus( i18n( "Importing folder %1" ).arg( mCurrentFolder->name() ) );
+ mProgressItem->setqStatus( i18n( "Importing folder %1" ).arg( mCurrentFolder->name() ) );
}
mProgressItem->setProgress( ( mProgressItem->progress() + 5 ) );
@@ -221,7 +221,7 @@ void KMail::ImportJob::importNextMessage()
messages.files.removeFirst();
mCurrentMessage = new KMMessage();
- mCurrentMessage->fromByteArray( mCurrentMessageFile->data(), true /* seStatus */ );
+ mCurrentMessage->fromByteArray( mCurrentMessageFile->data(), true /* setqStatus */ );
int retIndex;
// If this is not an IMAP folder, we can add the message directly. Otherwise, the whole thing is
@@ -273,26 +273,26 @@ static TQString folderNameForDirectoryName( const TQString &dirName )
Q_ASSERT( dirName.startsWith( "." ) );
const TQString end = ".directory";
const int expectedIndex = dirName.length() - end.length();
- if ( dirName.lower().find( end ) != expectedIndex )
+ if ( dirName.lower().tqfind( end ) != expectedIndex )
return TQString();
TQString returnName = dirName.left( dirName.length() - end.length() );
returnName = returnName.right( returnName.length() - 1 );
return returnName;
}
-KMFolder* KMail::ImportJob::getOrCreateSubFolder( KMFolder *parentFolder, const TQString &subFolderName,
+KMFolder* KMail::ImportJob::getOrCreateSubFolder( KMFolder *tqparentFolder, const TQString &subFolderName,
mode_t subFolderPermissions )
{
- if ( !parentFolder->createChildFolder() ) {
- abort( i18n( "Unable to create subfolder for folder '%1'." ).arg( parentFolder->name() ) );
+ if ( !tqparentFolder->createChildFolder() ) {
+ abort( i18n( "Unable to create subfolder for folder '%1'." ).arg( tqparentFolder->name() ) );
return 0;
}
KMFolder *subFolder = 0;
- subFolder = dynamic_cast<KMFolder*>( parentFolder->child()->hasNamedFolder( subFolderName ) );
+ subFolder = dynamic_cast<KMFolder*>( tqparentFolder->child()->hasNamedFolder( subFolderName ) );
if ( !subFolder ) {
- subFolder = createSubFolder( parentFolder, subFolderName, subFolderPermissions );
+ subFolder = createSubFolder( tqparentFolder, subFolderName, subFolderPermissions );
}
return subFolder;
}
@@ -308,7 +308,7 @@ void KMail::ImportJob::importNextDirectory()
}
Folder folder = mQueuedDirectories.first();
- KMFolder *currentFolder = folder.parent;
+ KMFolder *currentFolder = folder.tqparent;
mQueuedDirectories.pop_front();
kdDebug(5006) << "importNextDirectory(): Working on directory " << folder.archiveDir->name() << endl;
@@ -343,7 +343,7 @@ void KMail::ImportJob::importNextDirectory()
Folder newFolder;
newFolder.archiveDir = dir;
- newFolder.parent = subFolder;
+ newFolder.tqparent = subFolder;
kdDebug(5006) << "Enqueueing directory " << entry->name() << endl;
mQueuedDirectories.push_back( newFolder );
}
@@ -388,7 +388,7 @@ void KMail::ImportJob::start()
Folder nextFolder;
nextFolder.archiveDir = mArchive->directory();
- nextFolder.parent = mRootFolder;
+ nextFolder.tqparent = mRootFolder;
mQueuedDirectories.push_back( nextFolder );
importNextDirectory();
}