diff options
Diffstat (limited to 'kmailcvt/filter_kmail_maildir.cxx')
-rw-r--r-- | kmailcvt/filter_kmail_maildir.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kmailcvt/filter_kmail_maildir.cxx b/kmailcvt/filter_kmail_maildir.cxx index 02b21f600..5ea7d4fc7 100644 --- a/kmailcvt/filter_kmail_maildir.cxx +++ b/kmailcvt/filter_kmail_maildir.cxx @@ -45,7 +45,7 @@ FilterKMail_maildir::~FilterKMail_maildir( void ) void FilterKMail_maildir::import( FilterInfo *info ) { - QString _homeDir = QDir::homeDirPath(); + TQString _homeDir = TQDir::homeDirPath(); KFileDialog *kfd; kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true ); @@ -60,16 +60,16 @@ void FilterKMail_maildir::import( FilterInfo *info ) * If the user only select homedir no import needed because * there should be no files and we surely import wrong files. */ - else if ( mailDir == QDir::homeDirPath() || mailDir == ( QDir::homeDirPath() + "/" ) ) { + else if ( mailDir == TQDir::homeDirPath() || mailDir == ( TQDir::homeDirPath() + "/" ) ) { info->addLog( i18n( "No files found for import." ) ); } else { info->setOverall(0); /** Recursive import of the MailArchives */ - QDir dir(mailDir); - QStringList rootSubDirs = dir.entryList("*", QDir::Dirs | QDir::Hidden, QDir::Name); + TQDir dir(mailDir); + TQStringList rootSubDirs = dir.entryList("*", TQDir::Dirs | TQDir::Hidden, TQDir::Name); int currentDir = 1, numSubDirs = rootSubDirs.size(); - for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { + for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { if(info->shouldTerminate()) break; if(!(*filename == "." || *filename == "..")) { info->setCurrent(0); @@ -95,7 +95,7 @@ void FilterKMail_maildir::import( FilterInfo *info ) * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& dirName) +void FilterKMail_maildir::importDirContents( FilterInfo *info, const TQString& dirName) { /** Here Import all archives in the current dir */ @@ -103,9 +103,9 @@ void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& di /** If there are subfolders, we import them one by one */ - QDir subfolders(dirName); - QStringList subDirs = subfolders.entryList("*", QDir::Dirs | QDir::Hidden, QDir::Name); - for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { + TQDir subfolders(dirName); + TQStringList subDirs = subfolders.entryList("*", TQDir::Dirs | TQDir::Hidden, TQDir::Name); + for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { if(info->shouldTerminate()) return; if(!(*filename == "." || *filename == "..")) { importDirContents(info, subfolders.filePath(*filename)); @@ -119,20 +119,20 @@ void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& di * @param info Information storage for the operation. * @param fileName The full path to the file to import */ -QString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const QString& fileName ) { +TQString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const TQString& fileName ) { - QString status_flag = ""; + TQString status_flag = ""; - QFile mailfile( fileName ); + TQFile mailfile( fileName ); if (! mailfile.open( IO_ReadOnly ) ) { info->alert( i18n("Unable to open %1, skipping").arg( fileName ) ); return status_flag; } else { - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); while ( !mailfile.atEnd() && status_flag.isEmpty()) { - QCString seperate; + TQCString seperate; while ( ! mailfile.atEnd() && mailfile.readLine(input.data(),MAX_LINE) ) { @@ -156,30 +156,30 @@ QString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const QString& f * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterKMail_maildir::importFiles( FilterInfo *info, const QString& dirName) +void FilterKMail_maildir::importFiles( FilterInfo *info, const TQString& dirName) { - QDir dir(dirName); - QString _path; + TQDir dir(dirName); + TQString _path; bool generatedPath = false; - QDir importDir (dirName); - QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name); + TQDir importDir (dirName); + TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name); int currentFile = 1, numFiles = files.size(); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) { if(info->shouldTerminate()) return; - QString temp_mailfile = *mailFile; + TQString temp_mailfile = *mailFile; if (!(temp_mailfile.endsWith(".index") || temp_mailfile.endsWith(".index.ids") || temp_mailfile.endsWith(".index.sorted") || temp_mailfile.endsWith(".uidcache") )) { if(!generatedPath) { _path = "KMail-Import"; - QString _tmp = dir.filePath(*mailFile); + TQString _tmp = dir.filePath(*mailFile); _tmp = _tmp.remove( mailDir ,TRUE); - QStringList subFList = QStringList::split("/",_tmp,FALSE); - for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { - QString _cat = *it; + TQStringList subFList = TQStringList::split("/",_tmp,FALSE); + for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { + TQString _cat = *it; if(!(_cat == *mailFile)) { if(_cat.startsWith(".") && _cat.endsWith(".directory")) { _cat.remove(0,1); @@ -192,14 +192,14 @@ void FilterKMail_maildir::importFiles( FilterInfo *info, const QString& dirName) } if(_path.endsWith("cur")) _path.remove(_path.length() - 4 , 4); - QString _info = _path; + TQString _info = _path; info->addLog(i18n("Import folder %1...").arg(_info.remove(0,12))); info->setFrom(_info); info->setTo(_path); generatedPath = true; } - QString msg_flag = getMessageFlags(info, dir.filePath(*mailFile)); + TQString msg_flag = getMessageFlags(info, dir.filePath(*mailFile)); if(info->removeDupMsg) { if(! addMessage( info, _path, dir.filePath(*mailFile), msg_flag )) { |