diff options
Diffstat (limited to 'kmailcvt/filter_evolution_v2.cxx')
-rw-r--r-- | kmailcvt/filter_evolution_v2.cxx | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kmailcvt/filter_evolution_v2.cxx b/kmailcvt/filter_evolution_v2.cxx index 51ae798f2..16c3093a6 100644 --- a/kmailcvt/filter_evolution_v2.cxx +++ b/kmailcvt/filter_evolution_v2.cxx @@ -49,13 +49,13 @@ void FilterEvolution_v2::import(FilterInfo *info) * We ask the user to choose Evolution's root directory. * This should be usually ~/.evolution/mail/local/ */ - QString evolDir = QDir::homeDirPath() + "/.evolution/mail/local"; - QDir d( evolDir ); + TQString evolDir = TQDir::homeDirPath() + "/.evolution/mail/local"; + TQDir d( evolDir ); if ( !d.exists() ) { - evolDir = QDir::homeDirPath(); + evolDir = TQDir::homeDirPath(); } - //QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent()); + //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent()); KFileDialog *kfd; kfd = new KFileDialog( evolDir, "", 0, "kfiledialog", true ); kfd->setMode(KFile::Directory | KFile::LocalOnly); @@ -69,23 +69,23 @@ void FilterEvolution_v2::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::Name); // Removal of . and .. + TQDir dir(mailDir); + TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); // Removal of . and .. int currentDir = 1, numSubDirs = rootSubDirs.size(); - for(QStringList::Iterator dirname = rootSubDirs.begin() ; dirname != rootSubDirs.end() ; ++dirname, ++currentDir) { + for(TQStringList::Iterator dirname = rootSubDirs.begin() ; dirname != rootSubDirs.end() ; ++dirname, ++currentDir) { if (info->shouldTerminate()) break; importDirContents(info, false, dir.filePath(*dirname), *dirname, *dirname); info->setOverall((int) ((float) currentDir / numSubDirs * 100)); } /** import last but not least all archives from the root-dir */ - importDirContents(info, true, mailDir, QString::null, QString::null); + importDirContents(info, true, mailDir, TQString::null, TQString::null); info->addLog( i18n("Finished importing emails from %1").arg( mailDir )); if(count_duplicates > 0) { @@ -106,18 +106,18 @@ void FilterEvolution_v2::import(FilterInfo *info) * @param KMailSubDir The directory's direct ancestor in KMail's folder structure. */ void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root, - const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir) + const TQString& dirName, const TQString& KMailRootDir, const TQString& KMailSubDir) { if (info->shouldTerminate()) return; /** Here Import all archives in the current dir */ - QDir dir(dirName); + TQDir dir(dirName); - QDir importDir (dirName); - QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { + TQDir importDir (dirName); + TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name); + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { if (info->shouldTerminate()) break; - QString temp_mailfile = *mailFile; + TQString temp_mailfile = *mailFile; if (temp_mailfile.endsWith(".cmeta") || temp_mailfile.endsWith(".ev-summary") || temp_mailfile.endsWith(".ev-summary-meta") || temp_mailfile.endsWith(".ibex.index") || temp_mailfile.endsWith(".ibex.index.data") ) {} else { @@ -125,16 +125,16 @@ void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root, if (!root) importMBox(info, (dirName + "/" + temp_mailfile) , KMailRootDir, KMailSubDir); else - importMBox(info, dirName + temp_mailfile , temp_mailfile, QString::null); + importMBox(info, dirName + temp_mailfile , temp_mailfile, TQString::null); } } if (!root) { /** If there are subfolders, we import them one by one */ - QDir subfolders(dirName); - QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs, QDir::Name); - for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { - QString kSubDir; + TQDir subfolders(dirName); + TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); + for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { + TQString kSubDir; if(!KMailSubDir.isNull()) { kSubDir = KMailSubDir + "/" + *filename; } else { @@ -152,18 +152,18 @@ void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root, * @param KMailRootDir The directory's root directory in KMail's folder structure. * @param KMailSubDir The directory's equivalent in KMail's folder structure. * */ -void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir) +void FilterEvolution_v2::importMBox(FilterInfo *info, const TQString& mboxName, const TQString& rootDir, const TQString& targetDir) { - QFile mbox(mboxName); + TQFile mbox(mboxName); bool first_msg = true; if (!mbox.open(IO_ReadOnly)) { info->alert(i18n("Unable to open %1, skipping").arg(mboxName)); } else { - QFileInfo filenameInfo(mboxName); + TQFileInfo filenameInfo(mboxName); info->setCurrent(0); if( mboxName.length() > 20 ) { - QString tmp_info = mboxName; + TQString tmp_info = mboxName; tmp_info = tmp_info.replace( mailDir, "../" ); if (tmp_info.contains(".sbd")) tmp_info.remove(".sbd"); @@ -171,26 +171,26 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, c } else info->setFrom(mboxName); if(targetDir.contains(".sbd")) { - QString tmp_info = targetDir; + TQString tmp_info = targetDir; tmp_info.remove(".sbd"); info->setTo(tmp_info); } else info->setTo(targetDir); - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); long l = 0; while (!mbox.atEnd()) { KTempFile tmp; /** @todo check if the file is really a mbox, maybe search for 'from' string at start */ /* comment by Danny: - * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only + * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only * support Unicode/Latin1/Locale. So you lost information from emails with * charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64 - * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you + * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you * get Unicode/UTF-email but KMail can't detect the correct charset. */ - QCString seperate; + TQCString seperate; if(!first_msg) tmp.file()->writeBlock( input, l ); @@ -203,8 +203,8 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, c tmp.close(); first_msg = false; - QString destFolder; - QString _targetDir = targetDir; + TQString destFolder; + TQString _targetDir = targetDir; if(!targetDir.isNull()) { if(_targetDir.contains(".sbd")) _targetDir.remove(".sbd"); |