diff options
Diffstat (limited to 'kmailcvt/filter_evolution.cxx')
-rw-r--r-- | kmailcvt/filter_evolution.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kmailcvt/filter_evolution.cxx b/kmailcvt/filter_evolution.cxx index 20a68d0b4..abc602a21 100644 --- a/kmailcvt/filter_evolution.cxx +++ b/kmailcvt/filter_evolution.cxx @@ -46,10 +46,10 @@ FilterEvolution::~FilterEvolution(void) void FilterEvolution::import(FilterInfo *info) { // We ask the user to choose Evolution's root directory. - QString evolDir = QDir::homeDirPath() + "/evolution/local"; - QDir d( evolDir ); + TQString evolDir = TQDir::homeDirPath() + "/evolution/local"; + TQDir d( evolDir ); if ( !d.exists() ) { - evolDir = QDir::homeDirPath(); + evolDir = TQDir::homeDirPath(); } mailDir = KFileDialog::getExistingDirectory(evolDir, info->parent()); @@ -61,16 +61,16 @@ void FilterEvolution::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 MBoxes. - 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 filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { - importDirContents(info, dir.filePath(*filename), *filename, QString::null); + for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { + importDirContents(info, dir.filePath(*filename), *filename, TQString::null); info->setOverall((int) ((float) currentDir / numSubDirs * 100)); } } @@ -86,19 +86,19 @@ void FilterEvolution::import(FilterInfo *info) * @param KMailRootDir The directory's root directory in KMail's folder structure. * @param KMailSubDir The directory's direct ancestor in KMail's folder structure. */ -void FilterEvolution::importDirContents(FilterInfo *info, const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir) +void FilterEvolution::importDirContents(FilterInfo *info, const TQString& dirName, const TQString& KMailRootDir, const TQString& KMailSubDir) { // If there is a mbox, we import it - QDir dir(dirName); + TQDir dir(dirName); if(dir.exists("mbox")) { importMBox(info, dirName + "/mbox", KMailRootDir, KMailSubDir); } // If there are subfolders, we import them one by one if(dir.exists("subfolders")) { - QDir subfolders(dirName + "/subfolders"); - QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs, QDir::Name); - for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { - QString kSubDir; + TQDir subfolders(dirName + "/subfolders"); + 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 { @@ -116,19 +116,19 @@ void FilterEvolution::importDirContents(FilterInfo *info, const QString& dirName * @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::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir) +void FilterEvolution::importMBox(FilterInfo *info, const TQString& mboxName, const TQString& rootDir, const TQString& targetDir) { - QFile mbox(mboxName); + TQFile mbox(mboxName); bool first_msg = true; - QString tmp_from = mboxName; + TQString tmp_from = mboxName; 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("subfolders/")) tmp_info.remove("subfolders/"); @@ -137,7 +137,7 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons } else info->setFrom(mboxName); if(targetDir.contains("subfolders/")) { - QString tmp_info = targetDir; + TQString tmp_info = targetDir; tmp_info.remove("subfolders/"); info->setTo(tmp_info); } else @@ -145,19 +145,19 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons info->addLog(i18n("Importing emails from %1...").arg(tmp_from)); - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); long l = 0; while (!mbox.atEnd()) { KTempFile tmp; /* 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 ); @@ -170,7 +170,7 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons tmp.close(); first_msg = false; - QString destFolder = rootDir; + TQString destFolder = rootDir; if(!targetDir.isNull()) { destFolder = "Evolution-Import/" + destFolder + "/" + targetDir; } else { |