diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kmailcvt | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmailcvt')
32 files changed, 416 insertions, 416 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 { diff --git a/kmailcvt/filter_evolution.hxx b/kmailcvt/filter_evolution.hxx index 159332d29..1aa5184f1 100644 --- a/kmailcvt/filter_evolution.hxx +++ b/kmailcvt/filter_evolution.hxx @@ -36,10 +36,10 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - void importDirContents(FilterInfo*, const QString&, const QString&, const QString&); - void importMBox(FilterInfo*, const QString&, const QString&, const QString&); + void importDirContents(FilterInfo*, const TQString&, const TQString&, const TQString&); + void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&); }; #endif 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"); diff --git a/kmailcvt/filter_evolution_v2.hxx b/kmailcvt/filter_evolution_v2.hxx index a0e297959..da58b4fe2 100644 --- a/kmailcvt/filter_evolution_v2.hxx +++ b/kmailcvt/filter_evolution_v2.hxx @@ -34,10 +34,10 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - void importDirContents(FilterInfo*, bool, const QString&, const QString&, const QString&); - void importMBox(FilterInfo*, const QString&, const QString&, const QString&); + void importDirContents(FilterInfo*, bool, const TQString&, const TQString&, const TQString&); + void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&); }; #endif 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 )) { diff --git a/kmailcvt/filter_kmail_maildir.hxx b/kmailcvt/filter_kmail_maildir.hxx index 3ab082b4c..66f444907 100644 --- a/kmailcvt/filter_kmail_maildir.hxx +++ b/kmailcvt/filter_kmail_maildir.hxx @@ -32,12 +32,12 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - QString getMessageFlags(FilterInfo*, const QString&); + TQString getMessageFlags(FilterInfo*, const TQString&); - void importDirContents(FilterInfo*, const QString&); - void importFiles(FilterInfo*, const QString&); + void importDirContents(FilterInfo*, const TQString&); + void importFiles(FilterInfo*, const TQString&); }; #endif diff --git a/kmailcvt/filter_lnotes.cxx b/kmailcvt/filter_lnotes.cxx index 3ded11abf..69a48167a 100644 --- a/kmailcvt/filter_lnotes.cxx +++ b/kmailcvt/filter_lnotes.cxx @@ -21,7 +21,7 @@ #include <kfiledialog.h> #include <ktempfile.h> #include <kdebug.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "filter_lnotes.hxx" @@ -53,13 +53,13 @@ void FilterLNotes::import(FilterInfo *info) { currentFile = 1; totalFiles = 0; - QStringList filenames = KFileDialog::getOpenFileNames( QDir::homeDirPath(), "*|" + i18n("All Files (*)"), + TQStringList filenames = KFileDialog::getOpenFileNames( TQDir::homeDirPath(), "*|" + i18n("All Files (*)"), inf->parent() ); totalFiles = filenames.count(); inf->setOverall(0); // See filter_mbox.cxx for better reference. - for ( QStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename ) { + for ( TQStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename ) { ++currentFile; info->addLog( i18n("Importing emails from %1").arg(*filename) ); @@ -74,7 +74,7 @@ void FilterLNotes::import(FilterInfo *info) { * Import the files within a Folder. * @param file The name of the file to import. */ -void FilterLNotes::ImportLNotes(const QString& file) { +void FilterLNotes::ImportLNotes(const TQString& file) { // See Filter_pmail.cxx for better reference @@ -83,7 +83,7 @@ void FilterLNotes::ImportLNotes(const QString& file) { // The Message ends with a 0c character // open the message - QFile f(file); + TQFile f(file); if (! f.open( IO_ReadOnly ) ) { inf->alert( i18n("Unable to open %1, skipping").arg( file ) ); @@ -95,8 +95,8 @@ void FilterLNotes::ImportLNotes(const QString& file) { KTempFile *tempfile = 0; // Get folder name - QFileInfo filenameInfo( file ); - QString folder("LNotes-Import/" + filenameInfo.baseName(TRUE)); + TQFileInfo filenameInfo( file ); + TQString folder("LNotes-Import/" + filenameInfo.baseName(TRUE)); inf->setTo(folder); // State machine to read the data in. The fgetc usage is probably terribly slow ... diff --git a/kmailcvt/filter_lnotes.hxx b/kmailcvt/filter_lnotes.hxx index cb36273ea..709fa6ce2 100644 --- a/kmailcvt/filter_lnotes.hxx +++ b/kmailcvt/filter_lnotes.hxx @@ -34,7 +34,7 @@ public: private: /** the working directory */ - QDir dir; + TQDir dir; /** Our Filterinfo stuff... important methods for getting the email imported */ FilterInfo * inf; /** which file (of totalFiles) is now in the work? */ @@ -46,7 +46,7 @@ private: * This is were all the real action is gonna be handled. * Gets called once for EACH file imported */ - void ImportLNotes(const QString& file); + void ImportLNotes(const TQString& file); }; diff --git a/kmailcvt/filter_mailapp.cxx b/kmailcvt/filter_mailapp.cxx index c6f45ced0..2121badb0 100644 --- a/kmailcvt/filter_mailapp.cxx +++ b/kmailcvt/filter_mailapp.cxx @@ -46,7 +46,7 @@ void FilterMailApp::import(FilterInfo *info) int overall_status = 0; bool first_msg = true; - QString directory = KFileDialog::getExistingDirectory( QDir::homeDirPath(), info->parent() ); + TQString directory = KFileDialog::getExistingDirectory( TQDir::homeDirPath(), info->parent() ); //qDebug("starting by looking in directory: %s", directory.latin1()); if ( directory.isEmpty() ) { @@ -56,35 +56,35 @@ void FilterMailApp::import(FilterInfo *info) info->setOverall(0); traverseDirectory(info, directory); - for ( QStringList::Iterator filename = mMboxFiles.begin(); filename != mMboxFiles.end(); ++filename, ++currentFile) { + for ( TQStringList::Iterator filename = mMboxFiles.begin(); filename != mMboxFiles.end(); ++filename, ++currentFile) { if ( info->shouldTerminate() ) break; - QFile mbox( *filename ); + TQFile mbox( *filename ); if (! mbox.open( IO_ReadOnly ) ) { info->alert( i18n("Unable to open %1, skipping").arg( *filename ) ); } else { - QFileInfo filenameInfo( *filename ); + TQFileInfo filenameInfo( *filename ); kdDebug() << "importing filename " << *filename << endl; - QStringList name = QStringList::split("/", *filename); - QString folderName(name[name.count() - 2]); + TQStringList name = TQStringList::split("/", *filename); + TQString folderName(name[name.count() - 2]); info->setCurrent(0); info->addLog( i18n("Importing emails from %1...").arg( *filename ) ); info->setFrom( *filename ); info->setTo( folderName ); - 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 ); @@ -140,14 +140,14 @@ void FilterMailApp::import(FilterInfo *info) info->setOverall(100); } -void FilterMailApp::traverseDirectory(FilterInfo *info, const QString &dirName) +void FilterMailApp::traverseDirectory(FilterInfo *info, const TQString &dirName) { - QDir dir(dirName); - dir.setFilter(QDir::Dirs | QDir::Files); + TQDir dir(dirName); + dir.setFilter(TQDir::Dirs | TQDir::Files); const QFileInfoList *fileinfolist = dir.entryInfoList(); QFileInfoListIterator it(*fileinfolist); - QFileInfo *fi; + TQFileInfo *fi; if ( info->shouldTerminate() ) return; diff --git a/kmailcvt/filter_mailapp.hxx b/kmailcvt/filter_mailapp.hxx index 83ad1937c..571f77ff0 100644 --- a/kmailcvt/filter_mailapp.hxx +++ b/kmailcvt/filter_mailapp.hxx @@ -29,8 +29,8 @@ public: void import(FilterInfo *info); private: - QStringList mMboxFiles; - void traverseDirectory(FilterInfo *info, const QString &); + TQStringList mMboxFiles; + void traverseDirectory(FilterInfo *info, const TQString &); }; #endif diff --git a/kmailcvt/filter_mbox.cxx b/kmailcvt/filter_mbox.cxx index 4692f7fdc..3777cd7e9 100644 --- a/kmailcvt/filter_mbox.cxx +++ b/kmailcvt/filter_mbox.cxx @@ -46,16 +46,16 @@ void FilterMBox::import(FilterInfo *info) int overall_status = 0; bool first_msg = true; - QStringList filenames = KFileDialog::getOpenFileNames( QDir::homeDirPath(), "*|" + i18n("mbox Files (*)"), info->parent() ); + TQStringList filenames = KFileDialog::getOpenFileNames( TQDir::homeDirPath(), "*|" + i18n("mbox Files (*)"), info->parent() ); info->setOverall(0); - for ( QStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename, ++currentFile) { - QFile mbox( *filename ); + for ( TQStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename, ++currentFile) { + TQFile mbox( *filename ); if (! mbox.open( IO_ReadOnly ) ) { info->alert( i18n("Unable to open %1, skipping").arg( *filename ) ); } else { - QFileInfo filenameInfo( *filename ); - QString folderName( "MBOX-" + filenameInfo.baseName(TRUE) ); + TQFileInfo filenameInfo( *filename ); + TQString folderName( "MBOX-" + filenameInfo.baseName(TRUE) ); info->setCurrent(0); info->addLog( i18n("Importing emails from %1...").arg( *filename ) ); @@ -63,21 +63,21 @@ void FilterMBox::import(FilterInfo *info) info->setFrom( *filename ); info->setTo( folderName ); - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); long l = 0; while ( ! mbox.atEnd() ) { KTempFile tmp; - QIODevice::Offset filepos = 0; + TQIODevice::Offset filepos = 0; /* comment by Danny: - * Don't use QTextStream to read from mbox, better use QDataStream. QTextStream only + * Don't use TQTextStream to read from mbox, better 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; - QString x_status_flag = ""; + TQCString seperate; + TQString x_status_flag = ""; /* check if the first line start with "From " (and not "From: ") and discard the line * in this case because some IMAP servers (e.g. Cyrus) don't accept this header line */ diff --git a/kmailcvt/filter_oe.cxx b/kmailcvt/filter_oe.cxx index 8092b299d..e1465d141 100644 --- a/kmailcvt/filter_oe.cxx +++ b/kmailcvt/filter_oe.cxx @@ -56,14 +56,14 @@ FilterOE::~FilterOE() void FilterOE::import(FilterInfo *info) { // Select directory containing plain text emails - mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(),info->parent()); + mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->parent()); if (mailDir.isEmpty()) { // No directory selected info->alert(i18n("No directory selected.")); return; } - QDir dir (mailDir); - QStringList files = dir.entryList("*.[dDmM][bB][xX]", QDir::Files, QDir::Name); + TQDir dir (mailDir); + TQStringList files = dir.entryList("*.[dDmM][bB][xX]", TQDir::Files, TQDir::Name); if (files.isEmpty()) { info->alert(i18n("No Outlook Express mailboxes found in directory %1.").arg(mailDir)); return; @@ -78,12 +78,12 @@ void FilterOE::import(FilterInfo *info) info->setOverall(0); /** search the folderfile to recreate folder struct */ - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { if(*mailFile == "Folders.dbx") { info->addLog(i18n("Import folder structure...")); importMailBox(info, dir.filePath(*mailFile)); if(!folderStructure.isEmpty()) parsedFolder = true; - // remove file from QStringList::files, no longer needed + // remove file from TQStringList::files, no longer needed files.remove(mailFile); currentIsFolderFile = false; break; @@ -91,7 +91,7 @@ void FilterOE::import(FilterInfo *info) } int n=0; - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { if ( info->shouldTerminate() ) break; importMailBox(info, dir.filePath(*mailFile)); info->setOverall(100 * ++n / files.count()); @@ -107,11 +107,11 @@ void FilterOE::import(FilterInfo *info) kdDebug() << "0x04 Mails: " << count0x04 << endl; } -void FilterOE::importMailBox( FilterInfo *info, const QString& fileName) +void FilterOE::importMailBox( FilterInfo *info, const TQString& fileName) { - QFile mailfile(fileName); - QFileInfo mailfileinfo(fileName); - QString _nameOfFile = fileName; + TQFile mailfile(fileName); + TQFileInfo mailfileinfo(fileName); + TQString _nameOfFile = fileName; _nameOfFile.remove( mailDir ); _nameOfFile.remove( "/" ); info->setFrom(mailfileinfo.fileName()); @@ -120,8 +120,8 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName) info->addLog(i18n("Unable to open mailbox %1").arg(fileName)); return; } - QDataStream mailbox(&mailfile); - mailbox.setByteOrder(QDataStream::LittleEndian); + TQDataStream mailbox(&mailfile); + mailbox.setByteOrder(TQDataStream::LittleEndian); // Parse magic Q_UINT32 sig_block1, sig_block2; @@ -139,7 +139,7 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName) if (sig_block2 == OE5_EMAIL_SIG_2) { folderName = "OE-Import/" + mailfileinfo.baseName(TRUE); if(parsedFolder) { - QString _tmpFolder = getFolderName(_nameOfFile); + TQString _tmpFolder = getFolderName(_nameOfFile); if(!_tmpFolder.isEmpty()) folderName = "OE-Import/" + _tmpFolder; } info->addLog(i18n("Importing OE5+ Mailbox %1").arg( "../" + _nameOfFile)); @@ -162,7 +162,7 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName) /* ------------------- MBX support ------------------- */ -void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds) +void FilterOE::mbxImport( FilterInfo *info, TQDataStream& ds) { Q_UINT32 msgCount, lastMsgNum, fileSize; @@ -179,7 +179,7 @@ void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds) while (!ds.atEnd()) { Q_UINT32 msgNumber, msgSize, msgTextSize; KTempFile tmp; - tmp.dataStream()->setByteOrder(QDataStream::LittleEndian); + tmp.dataStream()->setByteOrder(TQDataStream::LittleEndian); // Read the messages ds >> msgNumber >> msgSize >> msgTextSize; // All seem to be lies...? @@ -209,7 +209,7 @@ void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds) /* ------------------- DBX support ------------------- */ -void FilterOE::dbxImport( FilterInfo *info, QDataStream& ds) +void FilterOE::dbxImport( FilterInfo *info, TQDataStream& ds) { // Get item count & offset of index Q_UINT32 itemCount, indexPtr; @@ -228,7 +228,7 @@ void FilterOE::dbxImport( FilterInfo *info, QDataStream& ds) dbxReadIndex(info, ds, indexPtr); } -void FilterOE::dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos) +void FilterOE::dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos) { if(info->shouldTerminate()) return; @@ -264,14 +264,14 @@ void FilterOE::dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos) ds.device()->at(wasAt); // Restore file position to same as when function called } -void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos) +void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos) { Q_UINT32 curOffset, blockSize; Q_UINT16 unknown; Q_UINT8 count, unknown2; int wasAt = ds.device()->at(); - QString folderEntry[4]; + TQString folderEntry[4]; ds.device()->at(filePos); @@ -314,11 +314,11 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos) } else if (type == 0x80) { // kdDebug() << "**** FOLDER: current ID ****" << endl; - folderEntry[2] = QString::number(value); + folderEntry[2] = TQString::number(value); } else if (type == 0x81) { // kdDebug() << "**** FOLDER: parent ID ****" << endl; - folderEntry[3] = QString::number(value); + folderEntry[3] = TQString::number(value); } } } @@ -328,7 +328,7 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos) ds.device()->at(wasAt); // Restore file position to same as when function called } -void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos) +void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos) { if(info->shouldTerminate()) return; Q_UINT32 self, nextAddressOffset, nextAddress=0; @@ -341,7 +341,7 @@ void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos) do { ds >> self >> nextAddressOffset >> blockSize >> intCount >> unknown >> nextAddress; // _dbx_block_hdrstruct - QByteArray blockBuffer(blockSize); + TQByteArray blockBuffer(blockSize); ds.readRawBytes(blockBuffer.data(), blockSize); tmp.dataStream()->writeRawBytes(blockBuffer.data(), blockSize); // to detect incomplete mails or corrupted archives. See Bug #86119 @@ -368,10 +368,10 @@ void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos) } /* ------------------- FolderFile support ------------------- */ -QString FilterOE::parseFolderString( QDataStream& ds, int filePos ) +TQString FilterOE::parseFolderString( TQDataStream& ds, int filePos ) { char tmp; - QString returnString; + TQString returnString; int wasAt = ds.device()->at(); ds.device()->at(filePos); @@ -388,36 +388,36 @@ QString FilterOE::parseFolderString( QDataStream& ds, int filePos ) } /** get the foldername for a given file ID from folderMatrix */ -QString FilterOE::getFolderName(QString filename) +TQString FilterOE::getFolderName(TQString filename) { bool found = false; bool foundFilename = false; - QString folder; + TQString folder; // we must do this because folder with more than one upper letter // at start have maybe not a file named like the folder !!! - QString search = filename.lower(); + TQString search = filename.lower(); while (!found) { for ( FolderStructureIterator it = folderStructure.begin(); it != folderStructure.end(); it++) { FolderStructure tmp = *it; if(foundFilename == false) { - QString _tmpFileName = tmp[1]; + TQString _tmpFileName = tmp[1]; _tmpFileName = _tmpFileName.lower(); if(_tmpFileName == search) { - folder.prepend( tmp[0] + QString::fromLatin1("/") ); + folder.prepend( tmp[0] + TQString::fromLatin1("/") ); search = tmp[3]; foundFilename = true; } } else { - QString _currentID = tmp[2]; - QString _parentID = tmp[3]; + TQString _currentID = tmp[2]; + TQString _parentID = tmp[3]; if(_currentID == search) { if(_parentID.isEmpty()) { // this is the root of the folder found = true; break; } else { - folder.prepend( tmp[0] + QString::fromLatin1("/") ); + folder.prepend( tmp[0] + TQString::fromLatin1("/") ); search = tmp[3]; } } diff --git a/kmailcvt/filter_oe.hxx b/kmailcvt/filter_oe.hxx index 348b29ff4..821aa5dfa 100644 --- a/kmailcvt/filter_oe.hxx +++ b/kmailcvt/filter_oe.hxx @@ -34,16 +34,16 @@ public: void import(FilterInfo *info); protected: - void importMailBox( FilterInfo *info, const QString& fileName); - void mbxImport( FilterInfo *info, QDataStream& ds); - void dbxImport( FilterInfo *info, QDataStream& ds); - void dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos); - void dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos); - void dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos); + void importMailBox( FilterInfo *info, const TQString& fileName); + void mbxImport( FilterInfo *info, TQDataStream& ds); + void dbxImport( FilterInfo *info, TQDataStream& ds); + void dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos); + void dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos); + void dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos); /** helperfunctions for folder structure support */ - QString parseFolderString( QDataStream& ds, int filePos); - QString getFolderName(QString filename); + TQString parseFolderString( TQDataStream& ds, int filePos); + TQString getFolderName(TQString filename); private: // Private methods /** which file (of totalFiles) is now in the work? */ @@ -72,13 +72,13 @@ private: // Private methods */ typedef FolderStructureBase<4> FolderStructure; /** matrix with information about the folder structure*/ - QValueList<FolderStructure> folderStructure; - typedef QValueList<FolderStructure>::Iterator FolderStructureIterator; + TQValueList<FolderStructure> folderStructure; + typedef TQValueList<FolderStructure>::Iterator FolderStructureIterator; /** name of the current folder */ - QString folderName; + TQString folderName; /** name of the chosen folder */ - QString mailDir; + TQString mailDir; }; #endif diff --git a/kmailcvt/filter_opera.cxx b/kmailcvt/filter_opera.cxx index 5d0882d9b..3b2fff176 100644 --- a/kmailcvt/filter_opera.cxx +++ b/kmailcvt/filter_opera.cxx @@ -43,18 +43,18 @@ FilterOpera::~FilterOpera() void FilterOpera::import(FilterInfo *info) { /** try to go to opera mailfolder in the home of the user */ - QString startdir = QDir::homeDirPath() + "/.opera/mail/store/"; - QDir d( startdir ); + TQString startdir = TQDir::homeDirPath() + "/.opera/mail/store/"; + TQDir d( startdir ); if ( !d.exists() ) { - startdir = QDir::homeDirPath(); + startdir = TQDir::homeDirPath(); } - //QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent()); + //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent()); KFileDialog *kfd; kfd = new KFileDialog( startdir, "", 0, "kfiledialog", true ); kfd->setMode(KFile::Directory | KFile::LocalOnly); kfd->exec(); - QString operaDir = kfd->selectedFile(); + TQString operaDir = kfd->selectedFile(); if (operaDir.isEmpty()) { info->alert(i18n("No directory selected.")); @@ -63,13 +63,13 @@ void FilterOpera::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 ( operaDir == QDir::homeDirPath() || operaDir == (QDir::homeDirPath() + "/")) { + else if ( operaDir == TQDir::homeDirPath() || operaDir == (TQDir::homeDirPath() + "/")) { info->addLog(i18n("No files found for import.")); } else { info->setOverall(0); - QDir importDir (operaDir); - QStringList files = importDir.entryList("*.[mM][bB][sS]", QDir::Files, QDir::Name); + TQDir importDir (operaDir); + TQStringList files = importDir.entryList("*.[mM][bB][sS]", TQDir::Files, TQDir::Name); // Count total number of files to be processed info->addLog(i18n("Counting files...")); @@ -80,33 +80,33 @@ void FilterOpera::import(FilterInfo *info) int overall_status = 0; info->addLog(i18n("Importing new mail files...")); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { info->setCurrent(0); - QFile operaArchiv( importDir.filePath(*mailFile) ); + TQFile operaArchiv( importDir.filePath(*mailFile) ); if (! operaArchiv.open( IO_ReadOnly ) ) { info->alert( i18n("Unable to open %1, skipping").arg( *mailFile ) ); } else { info->addLog( i18n("Importing emails from %1...").arg( *mailFile ) ); - QFileInfo filenameInfo( importDir.filePath(*mailFile) ); - QString folderName( "OPERA-" + importDir.dirName() ); + TQFileInfo filenameInfo( importDir.filePath(*mailFile) ); + TQString folderName( "OPERA-" + importDir.dirName() ); info->setFrom( *mailFile ); info->setTo( folderName ); - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); long l = 0; bool first_msg = true; while ( !operaArchiv.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 ); diff --git a/kmailcvt/filter_outlook.cxx b/kmailcvt/filter_outlook.cxx index e9c53a82c..0dad8fde7 100644 --- a/kmailcvt/filter_outlook.cxx +++ b/kmailcvt/filter_outlook.cxx @@ -50,11 +50,11 @@ void FilterOutlook::import(FilterInfo *info) info->addLog(i18n("Importing new mail files...")); info->addLog(i18n("No files found for import.")); - QString outlookDir; - outlookDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent()); - QDir importDir (outlookDir); - QStringList files = importDir.entryList("*.[pP][sS][tT]", QDir::Files, QDir::Name); - for ( QStringList::Iterator pstFile = files.begin(); pstFile != files.end(); ++pstFile) { + TQString outlookDir; + outlookDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent()); + TQDir importDir (outlookDir); + TQStringList files = importDir.entryList("*.[pP][sS][tT]", TQDir::Files, TQDir::Name); + for ( TQStringList::Iterator pstFile = files.begin(); pstFile != files.end(); ++pstFile) { info->addLog( i18n("Importing emails from %1...").arg( *pstFile ) ); info->addLog( i18n("1 duplicate message not imported", "%n duplicate messages not imported", count_duplicates)); info->alert( i18n("Unable to open %1, skipping").arg( *pstFile ) ); diff --git a/kmailcvt/filter_plain.cxx b/kmailcvt/filter_plain.cxx index 7dc0bda50..0246c8c63 100644 --- a/kmailcvt/filter_plain.cxx +++ b/kmailcvt/filter_plain.cxx @@ -40,13 +40,13 @@ FilterPlain::~FilterPlain() void FilterPlain::import(FilterInfo *info) { // Select directory containing plain text emails - QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(),info->parent()); + TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->parent()); if (mailDir.isEmpty()) { // No directory selected info->alert(i18n("No directory selected.")); return; } - QDir dir (mailDir); - QStringList files = dir.entryList("*.[eE][mM][lL]; *.[tT][xX][tT]; *.[mM][sS][gG]", QDir::Files, QDir::Name); + TQDir dir (mailDir); + TQStringList files = dir.entryList("*.[eE][mM][lL]; *.[tT][xX][tT]; *.[mM][sS][gG]", TQDir::Files, TQDir::Name); // Count total number of files to be processed info->addLog(i18n("Counting files...")); @@ -54,7 +54,7 @@ void FilterPlain::import(FilterInfo *info) int currentFile = 0; info->addLog(i18n("Importing new mail files...")); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { info->setFrom(*mailFile); info->setTo(dir.dirName()); info->setCurrent(0); diff --git a/kmailcvt/filter_pmail.cxx b/kmailcvt/filter_pmail.cxx index 2eafb7f7e..5fcc1256e 100644 --- a/kmailcvt/filter_pmail.cxx +++ b/kmailcvt/filter_pmail.cxx @@ -20,7 +20,7 @@ #include <config.h> #include <klocale.h> #include <kfiledialog.h> -#include <qregexp.h> +#include <tqregexp.h> #include <ktempfile.h> #include <kdebug.h> @@ -47,7 +47,7 @@ void FilterPMail::import(FilterInfo *info) // Select directory from where I have to import files KFileDialog *kfd; - kfd = new KFileDialog( QDir::homeDirPath(), "", 0, "kfiledialog", true ); + kfd = new KFileDialog( TQDir::homeDirPath(), "", 0, "kfiledialog", true ); kfd->setMode(KFile::Directory | KFile::LocalOnly); kfd->exec(); chosenDir = kfd->selectedFile(); @@ -60,7 +60,7 @@ void FilterPMail::import(FilterInfo *info) // Count total number of files to be processed info->addLog(i18n("Counting files...")); dir.setPath (chosenDir); - QStringList files = dir.entryList("*.[cC][nN][mM]; *.[pP][mM][mM]; *.[mM][bB][xX]", QDir::Files, QDir::Name); + TQStringList files = dir.entryList("*.[cC][nN][mM]; *.[pP][mM][mM]; *.[mM][bB][xX]", TQDir::Files, TQDir::Name); totalFiles = files.count(); currentFile = 0; kdDebug() << "Count is " << totalFiles << endl; @@ -82,20 +82,20 @@ void FilterPMail::import(FilterInfo *info) } /** this looks for all files with the filemask 'mask' and calls the 'workFunc' on each of them */ -void FilterPMail::processFiles(const QString& mask, void(FilterPMail::* workFunc)(const QString&) ) +void FilterPMail::processFiles(const TQString& mask, void(FilterPMail::* workFunc)(const TQString&) ) { if (inf->shouldTerminate()) return; - QStringList files = dir.entryList(mask, QDir::Files, QDir::Name); + TQStringList files = dir.entryList(mask, TQDir::Files, TQDir::Name); //kdDebug() << "Mask is " << mask << " count is " << files.count() << endl; - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) { // Notify current file - QFileInfo mailfileinfo(*mailFile); + TQFileInfo mailfileinfo(*mailFile); inf->setFrom(mailfileinfo.fileName()); // Clear the other fields - inf->setTo(QString::null); - inf->setCurrent(QString::null); + inf->setTo(TQString::null); + inf->setCurrent(TQString::null); inf->setCurrent(-1); // call worker function, increase progressbar @@ -109,9 +109,9 @@ void FilterPMail::processFiles(const QString& mask, void(FilterPMail::* workFunc /** this function imports one *.CNM message */ -void FilterPMail::importNewMessage(const QString& file) +void FilterPMail::importNewMessage(const TQString& file) { - QString destFolder("PegasusMail-Import/New Messages"); + TQString destFolder("PegasusMail-Import/New Messages"); inf->setTo(destFolder); /* comment by Danny Kukawka: @@ -126,7 +126,7 @@ void FilterPMail::importNewMessage(const QString& file) /** this function imports one mail folder file (*.PMM) */ -void FilterPMail::importMailFolder(const QString& file) +void FilterPMail::importMailFolder(const TQString& file) { // Format of a PMM file: // First comes a header with 128 bytes. At the beginning is the name of @@ -160,21 +160,21 @@ void FilterPMail::importMailFolder(const QString& file) } pmm_head; long l = 0; - QFile f(file); + TQFile f(file); if (!f.open(IO_ReadOnly)) { inf->alert(i18n("Unable to open %1, skipping").arg(file)); } else { // Get folder name l = f.readBlock((char *) &pmm_head, sizeof(pmm_head)); - QString folder("PegasusMail-Import/"); + TQString folder("PegasusMail-Import/"); if(folderParsed) - folder.append(getFolderName((QString)pmm_head.id)); + folder.append(getFolderName((TQString)pmm_head.id)); else folder.append(pmm_head.folder); inf->setTo(folder); - inf->addLog(i18n("Importing %1").arg("../" + QString(pmm_head.folder))); + inf->addLog(i18n("Importing %1").arg("../" + TQString(pmm_head.folder))); - QByteArray input(MAX_LINE); + TQByteArray input(MAX_LINE); bool first_msg = true; while (!f.atEnd()) { @@ -215,21 +215,21 @@ void FilterPMail::importMailFolder(const QString& file) /** imports a 'unix' format mail folder (*.MBX) */ -void FilterPMail::importUnixMailFolder(const QString& file) +void FilterPMail::importUnixMailFolder(const TQString& file) { struct { char folder[58]; char id[31]; } pmg_head; - QFile f; - QString folder("PegasusMail-Import/"), s(file), seperate; - QByteArray line(MAX_LINE); + TQFile f; + TQString folder("PegasusMail-Import/"), s(file), seperate; + TQByteArray line(MAX_LINE); int n = 0, l = 0; /** Get the folder name */ - s.replace( QRegExp("mbx$"), "pmg"); - s.replace( QRegExp("MBX$"), "PMG"); + s.replace( TQRegExp("mbx$"), "pmg"); + s.replace( TQRegExp("MBX$"), "PMG"); f.setName(s); if (! f.open( IO_ReadOnly ) ) { inf->alert( i18n("Unable to open %1, skipping").arg( s ) ); @@ -239,7 +239,7 @@ void FilterPMail::importUnixMailFolder(const QString& file) f.close(); if(folderParsed) - folder.append(getFolderName((QString)pmg_head.id)); + folder.append(getFolderName((TQString)pmg_head.id)); else folder.append(pmg_head.folder); @@ -252,7 +252,7 @@ void FilterPMail::importUnixMailFolder(const QString& file) if (! f.open( IO_ReadOnly ) ) { inf->alert( i18n("Unable to open %1, skipping").arg( s ) ); } else { - inf->addLog(i18n("Importing %1").arg("../" + QString(pmg_head.folder))); + inf->addLog(i18n("Importing %1").arg("../" + TQString(pmg_head.folder))); l = f.readLine( line.data(),MAX_LINE); // read the first line which is unneeded while ( ! f.atEnd() ) { KTempFile tempfile; @@ -289,20 +289,20 @@ bool FilterPMail::parseFolderMatrix() kdDebug() << "Start parsing the foldermatrix." << endl; inf->addLog(i18n("Parsing the folder structure...")); - QFile hierarch(chosenDir + "/hierarch.pm"); + TQFile hierarch(chosenDir + "/hierarch.pm"); if (! hierarch.open( IO_ReadOnly ) ) { inf->alert( i18n("Unable to open %1, skipping").arg( chosenDir + "hierarch.pm" ) ); return false; } else { - QStringList tmpList; - QString tmpRead; + TQStringList tmpList; + TQString tmpRead; while ( !hierarch.atEnd() && hierarch.readLine(tmpRead,100)) { - QString tmpArray[5]; + TQString tmpArray[5]; tmpRead.remove(tmpRead.length() -2,2); - QStringList tmpList = QStringList::split(",", tmpRead, false); + TQStringList tmpList = TQStringList::split(",", tmpRead, false); int i = 0; - for ( QStringList::Iterator it = tmpList.begin(); it != tmpList.end(); ++it, i++) { - QString _tmp = *it; + for ( TQStringList::Iterator it = tmpList.begin(); it != tmpList.end(); ++it, i++) { + TQString _tmp = *it; if(i < 5) tmpArray[i] = _tmp.remove("\""); else { hierarch.close(); @@ -317,20 +317,20 @@ bool FilterPMail::parseFolderMatrix() } /** get the foldername for a given file ID from folderMatrix */ -QString FilterPMail::getFolderName(QString ID) +TQString FilterPMail::getFolderName(TQString ID) { bool found = false; - QString folder; - QString search = ID; + TQString folder; + TQString search = ID; while (!found) { for ( FolderStructureIterator it = folderMatrix.begin(); it != folderMatrix.end(); it++) { FolderStructure tmp = *it; - QString _ID = tmp[2]; + TQString _ID = tmp[2]; if(_ID == search) { - QString _type = tmp[0] + tmp[1]; + TQString _type = tmp[0] + tmp[1]; if(( _type == "21")) { found = true; break; diff --git a/kmailcvt/filter_pmail.hxx b/kmailcvt/filter_pmail.hxx index 9db76d11f..664fdcc1b 100644 --- a/kmailcvt/filter_pmail.hxx +++ b/kmailcvt/filter_pmail.hxx @@ -18,8 +18,8 @@ #ifndef FILTER_PMAIL_HXX #define FILTER_PMAIL_HXX -#include <qdir.h> -#include <qvaluelist.h> +#include <tqdir.h> +#include <tqvaluelist.h> #include "filters.hxx" @@ -33,21 +33,21 @@ public: protected: /** this looks for all files with the filemask 'mask' and calls the 'workFunc' on each of them */ - void processFiles(const QString& mask, void(FilterPMail::* workFunc)(const QString&) ); + void processFiles(const TQString& mask, void(FilterPMail::* workFunc)(const TQString&) ); /** this function imports one *.CNM message */ - void importNewMessage(const QString& file); + void importNewMessage(const TQString& file); /** this function imports one mail folder file (*.PMM) */ - void importMailFolder(const QString& file); + void importMailFolder(const TQString& file); /** imports a 'unix' format mail folder (*.MBX) */ - void importUnixMailFolder(const QString& file); + void importUnixMailFolder(const TQString& file); /** this function recreate the folder structure */ bool parseFolderMatrix(); /** this function parse the folder structure */ - QString getFolderName(QString ID); + TQString getFolderName(TQString ID); private: /** the working directory */ - QDir dir; + TQDir dir; /** pointer to the info */ FilterInfo * inf; @@ -60,12 +60,12 @@ private: 4. "ID:name" of parent folder 5. name of folder/archiv */ - QValueList<FolderStructure> folderMatrix; - typedef QValueList<FolderStructure>::Iterator FolderStructureIterator; + TQValueList<FolderStructure> folderMatrix; + typedef TQValueList<FolderStructure>::Iterator FolderStructureIterator; bool folderParsed; - QString chosenDir; + TQString chosenDir; /** which file (of totalFiles) is now in the work? */ int currentFile; diff --git a/kmailcvt/filter_sylpheed.cxx b/kmailcvt/filter_sylpheed.cxx index 5edda926e..fcf53f74a 100644 --- a/kmailcvt/filter_sylpheed.cxx +++ b/kmailcvt/filter_sylpheed.cxx @@ -44,7 +44,7 @@ FilterSylpheed::~FilterSylpheed( void ) void FilterSylpheed::import( FilterInfo *info ) { - QString _homeDir = QDir::homeDirPath(); + TQString _homeDir = TQDir::homeDirPath(); KFileDialog *kfd; kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true ); @@ -59,16 +59,16 @@ void FilterSylpheed::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 MailFolders */ - QDir dir(mailDir); - QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs , QDir::Name); + TQDir dir(mailDir); + TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs , 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; importDirContents(info, dir.filePath(*filename)); info->setOverall((int) ((float) currentDir / numSubDirs * 100)); @@ -90,7 +90,7 @@ void FilterSylpheed::import( FilterInfo *info ) * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName) +void FilterSylpheed::importDirContents( FilterInfo *info, const TQString& dirName) { if(info->shouldTerminate()) return; @@ -98,9 +98,9 @@ void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName importFiles(info, dirName); /** 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) { + TQDir subfolders(dirName); + TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name); + for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { if(info->shouldTerminate()) return; importDirContents(info, subfolders.filePath(*filename)); } @@ -112,31 +112,31 @@ void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName) +void FilterSylpheed::importFiles( FilterInfo *info, const TQString& dirName) { - QDir dir(dirName); - QString _path; + TQDir dir(dirName); + TQString _path; bool generatedPath = false; - QDict<unsigned long> msgflags; + TQDict<unsigned long> msgflags; msgflags.setAutoDelete(true); - 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(); readMarkFile(info, dir.filePath(".sylpheed_mark"), msgflags); - 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 _mfile = *mailFile; + TQString _mfile = *mailFile; if (!(_mfile.endsWith(".sylpheed_cache") || _mfile.endsWith(".sylpheed_mark") || _mfile.endsWith(".mh_sequences") )) { if(!generatedPath) { _path = "Sylpheed-Import/"; - QString _tmp = dir.filePath(*mailFile); + TQString _tmp = dir.filePath(*mailFile); _tmp = _tmp.remove(_tmp.length() - _mfile.length() -1, _mfile.length()+1); _path += _tmp.remove( mailDir ,TRUE); - QString _info = _path; + TQString _info = _path; info->addLog(i18n("Import folder %1...").arg(_info.remove(0,15))); info->setFrom(_info); @@ -144,7 +144,7 @@ void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName) generatedPath = true; } - QString flags; + TQString flags; if (msgflags[_mfile]) flags = msgFlagsToString(*(msgflags[_mfile])); @@ -164,7 +164,7 @@ void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName) } -void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict<unsigned long> &dict ) +void FilterSylpheed::readMarkFile( FilterInfo *info, const TQString &path, TQDict<unsigned long> &dict ) { /* Each sylpheed mail directory contains a .sylpheed_mark file which * contains all the flags for each messages. The layout of this file @@ -180,15 +180,15 @@ void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict< * and the second one with the actual message flags */ Q_UINT32 in, flags; - QFile file(path); + TQFile file(path); if (!file.open(IO_ReadOnly)) return; - QDataStream stream(&file); + TQDataStream stream(&file); if (Q_BYTE_ORDER == Q_LITTLE_ENDIAN) - stream.setByteOrder(QDataStream::LittleEndian); + stream.setByteOrder(TQDataStream::LittleEndian); @@ -206,15 +206,15 @@ void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict< } stream >> in; stream >> flags; - QString s; + TQString s; s.setNum((uint) in); dict.insert(s, new unsigned long(flags)); } } -QString FilterSylpheed::msgFlagsToString(unsigned long flags) +TQString FilterSylpheed::msgFlagsToString(unsigned long flags) { - QString status; + TQString status; /* see sylpheed's procmsg.h */ if (flags & 1UL) status += 'N'; diff --git a/kmailcvt/filter_sylpheed.hxx b/kmailcvt/filter_sylpheed.hxx index c18f8bd8f..fcc3af851 100644 --- a/kmailcvt/filter_sylpheed.hxx +++ b/kmailcvt/filter_sylpheed.hxx @@ -17,7 +17,7 @@ #ifndef FILTER_SYLPHEED_HXX #define FILTER_SYLPHEED_HXX -#include <qdict.h> +#include <tqdict.h> #include "filters.hxx" @@ -35,13 +35,13 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - void importDirContents(FilterInfo*, const QString&); - void importFiles(FilterInfo*, const QString&); + void importDirContents(FilterInfo*, const TQString&); + void importFiles(FilterInfo*, const TQString&); - void readMarkFile( FilterInfo*, const QString&, QDict<unsigned long>&); - QString msgFlagsToString(unsigned long); + void readMarkFile( FilterInfo*, const TQString&, TQDict<unsigned long>&); + TQString msgFlagsToString(unsigned long); }; #endif diff --git a/kmailcvt/filter_thebat.cxx b/kmailcvt/filter_thebat.cxx index 0e634e784..fa00b915d 100644 --- a/kmailcvt/filter_thebat.cxx +++ b/kmailcvt/filter_thebat.cxx @@ -19,8 +19,8 @@ #include <config.h> -#include <qregexp.h> -#include <qvaluelist.h> +#include <tqregexp.h> +#include <tqvaluelist.h> #include <klocale.h> #include <kfiledialog.h> @@ -50,7 +50,7 @@ FilterTheBat::~FilterTheBat( void ) /** Recursive import of The Bat! maildir. */ void FilterTheBat::import( FilterInfo *info ) { - QString _homeDir = QDir::homeDirPath(); + TQString _homeDir = TQDir::homeDirPath(); KFileDialog *kfd; kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true ); @@ -65,16 +65,16 @@ void FilterTheBat::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 MailFolders */ - QDir dir(mailDir); - QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs , QDir::Name); + TQDir dir(mailDir); + TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs , 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) { importDirContents(info, dir.filePath(*filename)); info->setOverall((int) ((float) currentDir / numSubDirs * 100)); if(info->shouldTerminate()) break; @@ -97,24 +97,24 @@ void FilterTheBat::import( FilterInfo *info ) * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterTheBat::importDirContents( FilterInfo *info, const QString& dirName) +void FilterTheBat::importDirContents( FilterInfo *info, const TQString& dirName) { if(info->shouldTerminate()) return; /** Here Import all archives in the current dir */ - QDir dir(dirName); - QDir importDir (dirName); - QStringList files = importDir.entryList("*.[tT][bB][bB]", QDir::Files, QDir::Name); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { - QString temp_mailfile = *mailFile; + TQDir dir(dirName); + TQDir importDir (dirName); + TQStringList files = importDir.entryList("*.[tT][bB][bB]", TQDir::Files, TQDir::Name); + for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { + TQString temp_mailfile = *mailFile; importFiles(info, (dirName + "/" + temp_mailfile)); if(info->shouldTerminate()) return; } /** 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) { + TQDir subfolders(dirName); + TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name); + for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { importDirContents(info, subfolders.filePath(*filename)); if(info->shouldTerminate()) return; } @@ -125,7 +125,7 @@ void FilterTheBat::importDirContents( FilterInfo *info, const QString& dirName) * @param info Information storage for the operation. * @param dirName The name of the directory to import. */ -void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName) +void FilterTheBat::importFiles( FilterInfo *info, const TQString& FileName) { // Format of a tbb-file from The Bat! 3.x @@ -139,13 +139,13 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName) // ---------------------------------------- long l = 0; - QByteArray input(50); - QRegExp regexp("!.p.0"); - QFile tbb(FileName); + TQByteArray input(50); + TQRegExp regexp("!.p.0"); + TQFile tbb(FileName); int iFound = 0; int count = 0; long endOfEmail = 0; - QValueList<long> offsets; + TQValueList<long> offsets; if (!tbb.open(IO_ReadOnly)) { info->alert(i18n("Unable to open %1, skipping").arg(FileName)); @@ -155,8 +155,8 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName) // does not work correct. Maybe in come in a continuous loop !!! // Reason: // if you use readLine() to read from a file with binary data - // QFile::at() and QFile::atEnd() return wrong value. So we - // never get QFile::atEnd() == true in some cases. This looks + // TQFile::at() and TQFile::atEnd() return wrong value. So we + // never get TQFile::atEnd() == true in some cases. This looks // like a bug in Qt3 maybe fixed in Qt4. // while((l = tbb.readBlock(input.data(),50)) ) { @@ -164,7 +164,7 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName) tbb.close(); return; } - QString _tmp = input.data(); + TQString _tmp = input.data(); if (tbb.atEnd()) break; @@ -191,22 +191,22 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName) long lastPos = 3128; long endPos = 0; - QString _path = "TheBat-Import/"; - QString _tmp = FileName; + TQString _path = "TheBat-Import/"; + TQString _tmp = FileName; _tmp = _tmp.remove(_tmp.length() - 13, 13); _path += _tmp.remove( mailDir ,TRUE); - QString _info = _path; + TQString _info = _path; info->addLog(i18n("Import folder %1...").arg(_info.remove(0,14))); info->setTo(_path); info->setFrom("../" + _info + "/messages.tbb"); - for(QValueList<long>::Iterator it = offsets.begin() ; it != offsets.end() ; ++it) { + for(TQValueList<long>::Iterator it = offsets.begin() ; it != offsets.end() ; ++it) { if(info->shouldTerminate()) { tbb.close(); return; } endPos = *it; - QByteArray input(endPos-lastPos); + TQByteArray input(endPos-lastPos); tbb.readBlock(input.data(), endPos-lastPos); KTempFile tmp; diff --git a/kmailcvt/filter_thebat.hxx b/kmailcvt/filter_thebat.hxx index 4dd80fa3f..7d62018d4 100644 --- a/kmailcvt/filter_thebat.hxx +++ b/kmailcvt/filter_thebat.hxx @@ -33,10 +33,10 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - void importDirContents(FilterInfo*, const QString&); - void importFiles(FilterInfo*, const QString&); + void importDirContents(FilterInfo*, const TQString&); + void importFiles(FilterInfo*, const TQString&); }; #endif diff --git a/kmailcvt/filter_thunderbird.cxx b/kmailcvt/filter_thunderbird.cxx index e5d71564c..a9e091d9b 100644 --- a/kmailcvt/filter_thunderbird.cxx +++ b/kmailcvt/filter_thunderbird.cxx @@ -49,10 +49,10 @@ void FilterThunderbird::import(FilterInfo *info) * We ask the user to choose Evolution's root directory. * This should be usually ~/.thunderbird/xxxx.default/Mail/Local Folders/ */ - QString thunderDir = QDir::homeDirPath() + "/.thunderbird/"; - QDir d( thunderDir ); + TQString thunderDir = TQDir::homeDirPath() + "/.thunderbird/"; + TQDir d( thunderDir ); if ( !d.exists() ) { - thunderDir = QDir::homeDirPath(); + thunderDir = TQDir::homeDirPath(); } KFileDialog *kfd; @@ -68,31 +68,31 @@ void FilterThunderbird::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 filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { + for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) { if(info->shouldTerminate()) break; importDirContents(info, dir.filePath(*filename), *filename, *filename); info->setOverall((int) ((float) currentDir / numSubDirs * 100)); } /** import last but not least all archives from the root-dir */ - QDir importDir (mailDir); - QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name); - for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) { + TQDir importDir (mailDir); + 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(".msf") || temp_mailfile.endsWith("msgFilterRules.dat")) {} else { info->addLog( i18n("Start import file %1...").arg( temp_mailfile ) ); - importMBox(info, mailDir + temp_mailfile , temp_mailfile, QString::null); + importMBox(info, mailDir + temp_mailfile , temp_mailfile, TQString::null); } } @@ -113,17 +113,17 @@ void FilterThunderbird::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 FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir) +void FilterThunderbird::importDirContents(FilterInfo *info, 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(".msf") || temp_mailfile.endsWith("msgFilterRules.dat")) {} else { info->addLog( i18n("Start import file %1...").arg( temp_mailfile ) ); @@ -132,11 +132,11 @@ void FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirNa } /** 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) { + TQDir subfolders(dirName); + TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); + for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) { if(info->shouldTerminate()) break; - QString kSubDir; + TQString kSubDir; if(!KMailSubDir.isNull()) { kSubDir = KMailSubDir + "/" + *filename; } else { @@ -153,18 +153,18 @@ void FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirNa * @param KMailRootDir The directory's root directory in KMail's folder structure. * @param KMailSubDir The directory's equivalent in KMail's folder structure. * */ -void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir) +void FilterThunderbird::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"); @@ -172,26 +172,26 @@ void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, co } 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 ); @@ -204,8 +204,8 @@ void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, co 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"); diff --git a/kmailcvt/filter_thunderbird.hxx b/kmailcvt/filter_thunderbird.hxx index 438089b91..d3bcd7f96 100644 --- a/kmailcvt/filter_thunderbird.hxx +++ b/kmailcvt/filter_thunderbird.hxx @@ -33,10 +33,10 @@ public: void import(FilterInfo *info); private: - QString mailDir; + TQString mailDir; - void importDirContents(FilterInfo*, const QString&, const QString&, const QString&); - void importMBox(FilterInfo*, const QString&, const QString&, const QString&); + void importDirContents(FilterInfo*, const TQString&, const TQString&, const TQString&); + void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&); }; #endif diff --git a/kmailcvt/filters.cxx b/kmailcvt/filters.cxx index 02f869853..5e163e191 100644 --- a/kmailcvt/filters.cxx +++ b/kmailcvt/filters.cxx @@ -35,7 +35,7 @@ bool FilterInfo::s_terminateASAP = false; -FilterInfo::FilterInfo( KImportPageDlg* dlg, QWidget* parent , bool _removeDupMsg) +FilterInfo::FilterInfo( KImportPageDlg* dlg, TQWidget* parent , bool _removeDupMsg) : m_dlg( dlg ), m_parent( parent ) { @@ -47,22 +47,22 @@ FilterInfo::~FilterInfo() { } -void FilterInfo::setStatusMsg( const QString& status ) +void FilterInfo::setStatusMsg( const TQString& status ) { m_dlg->_textStatus->setText( status ); } -void FilterInfo::setFrom( const QString& from ) +void FilterInfo::setFrom( const TQString& from ) { m_dlg->_from->setText( from ); } -void FilterInfo::setTo( const QString& to ) +void FilterInfo::setTo( const TQString& to ) { m_dlg->_to->setText( to ); } -void FilterInfo::setCurrent( const QString& current ) +void FilterInfo::setCurrent( const TQString& current ) { m_dlg->_current->setText( current ); kapp->processEvents(); @@ -79,7 +79,7 @@ void FilterInfo::setOverall( int percent ) m_dlg->_done_overall->setProgress( percent ); } -void FilterInfo::addLog( const QString& log ) +void FilterInfo::addLog( const TQString& log ) { m_dlg->_log->insertItem( log ); m_dlg->_log->setCurrentItem( m_dlg->_log->count() - 1 ); @@ -92,12 +92,12 @@ void FilterInfo::clear() m_dlg->_log->clear(); setCurrent(); setOverall(); - setCurrent( QString::null ); - setFrom( QString::null ); - setTo( QString::null ); + setCurrent( TQString::null ); + setFrom( TQString::null ); + setTo( TQString::null ); } -void FilterInfo::alert( const QString& message ) +void FilterInfo::alert( const TQString& message ) { KMessageBox::information( m_parent, message ); } @@ -119,8 +119,8 @@ bool FilterInfo::shouldTerminate() ////////////////////////////////////////////////////////////////////////////////// -Filter::Filter( const QString& name, const QString& author, - const QString& info ) +Filter::Filter( const TQString& name, const TQString& author, + const TQString& info ) : m_name( name ), m_author( author ), m_info( info ) @@ -129,14 +129,14 @@ Filter::Filter( const QString& name, const QString& author, count_duplicates = 0; } -bool Filter::addMessage( FilterInfo* info, const QString& folderName, - const QString& msgPath, const QString & msgStatusFlags) +bool Filter::addMessage( FilterInfo* info, const TQString& folderName, + const TQString& msgPath, const TQString & msgStatusFlags) { KURL msgURL; msgURL.setPath( msgPath ); if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) ) - KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started + KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", folderName, msgURL, msgStatusFlags ); @@ -165,14 +165,14 @@ bool Filter::addMessage( FilterInfo* info, const QString& folderName, return true; } -bool Filter::addMessage_fastImport( FilterInfo* info, const QString& folderName, - const QString& msgPath, const QString& msgStatusFlags ) +bool Filter::addMessage_fastImport( FilterInfo* info, const TQString& folderName, + const TQString& msgPath, const TQString& msgStatusFlags ) { KURL msgURL; msgURL.setPath( msgPath ); if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) ) - KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started + KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage_fastImport", folderName, msgURL, msgStatusFlags ); if ( !reply.isValid() ) @@ -200,9 +200,9 @@ bool Filter::addMessage_fastImport( FilterInfo* info, const QString& folderName, bool Filter::endImport() { if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) ) - KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started + KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started - DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", QString::null, QString::null); + DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", TQString::null, TQString::null); if ( !reply.isValid() ) return false; reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopResetAddMessage" ); diff --git a/kmailcvt/filters.hxx b/kmailcvt/filters.hxx index 10bb5c30b..203f3d7bb 100644 --- a/kmailcvt/filters.hxx +++ b/kmailcvt/filters.hxx @@ -22,68 +22,68 @@ #define MAX_LINE 4096 #endif -#include <qcombobox.h> -#include <qprogressbar.h> -#include <qptrlist.h> -#include <qlistbox.h> -#include <qlabel.h> +#include <tqcombobox.h> +#include <tqprogressbar.h> +#include <tqptrlist.h> +#include <tqlistbox.h> +#include <tqlabel.h> #include "kimportpagedlg.h" class FilterInfo { public: - FilterInfo(KImportPageDlg *dlg, QWidget *parent, bool _removeDupMsg); + FilterInfo(KImportPageDlg *dlg, TQWidget *parent, bool _removeDupMsg); ~FilterInfo(); - void setStatusMsg( const QString& status ); - void setFrom( const QString& from ); - void setTo( const QString& to ); - void setCurrent( const QString& current ); + void setStatusMsg( const TQString& status ); + void setFrom( const TQString& from ); + void setTo( const TQString& to ); + void setCurrent( const TQString& current ); void setCurrent( int percent = 0 ); void setOverall( int percent = 0 ); - void addLog( const QString& log ); + void addLog( const TQString& log ); void clear(); - void alert( const QString& message ); + void alert( const TQString& message ); static void terminateASAP(); bool shouldTerminate(); - QWidget *parent() { return m_parent; } + TQWidget *parent() { return m_parent; } bool removeDupMsg; private: KImportPageDlg *m_dlg; - QWidget *m_parent; + TQWidget *m_parent; static bool s_terminateASAP; }; class Filter { public: - Filter( const QString& name, const QString& author, - const QString& info = QString::null ); + Filter( const TQString& name, const TQString& author, + const TQString& info = TQString::null ); virtual ~Filter() {} virtual void import( FilterInfo* ) = 0; - QString author() const { return m_author; } - QString name() const { return m_name; } - QString info() const { return m_info; } + TQString author() const { return m_author; } + TQString name() const { return m_name; } + TQString info() const { return m_info; } int count_duplicates; //to count all duplicate messages protected: bool addMessage( FilterInfo* info, - const QString& folder, - const QString& msgFile, - const QString& msgStatusFlags = QString()); + const TQString& folder, + const TQString& msgFile, + const TQString& msgStatusFlags = TQString()); bool addMessage_fastImport( FilterInfo* info, - const QString& folder, - const QString& msgFile, - const QString& msgStatusFlags = QString()); + const TQString& folder, + const TQString& msgFile, + const TQString& msgStatusFlags = TQString()); bool endImport(); private: - QString m_name; - QString m_author; - QString m_info; + TQString m_name; + TQString m_author; + TQString m_info; }; @@ -94,8 +94,8 @@ class Filter template <unsigned int size> class FolderStructureBase { public: - typedef QString NString[size]; - /** Constructor. Need a default constructor for QValueList. */ + typedef TQString NString[size]; + /** Constructor. Need a default constructor for TQValueList. */ FolderStructureBase() {} ; /** Constructor. Turn N QStrings into a folder structure @@ -124,19 +124,19 @@ public: /** Access the different fields. There doesn't seem to * be a real semantics for the fields. */ - const QString operator [](unsigned int i) const + const TQString operator [](unsigned int i) const { - if (i<size) return d[i]; else return QString::null; + if (i<size) return d[i]; else return TQString::null; } ; /** Access the different fields, for writing. */ - QString &operator [](unsigned int i) + TQString &operator [](unsigned int i) { Q_ASSERT(i<size); if (i<size) return d[i]; else return d[0]; } ; private: - QString d[size]; + TQString d[size]; } ; #endif diff --git a/kmailcvt/kimportpage.cpp b/kmailcvt/kimportpage.cpp index d82571769..62e5b7de7 100644 --- a/kmailcvt/kimportpage.cpp +++ b/kmailcvt/kimportpage.cpp @@ -17,11 +17,11 @@ #include <kapplication.h> #include <kstandarddirs.h> -#include <qlabel.h> +#include <tqlabel.h> #include "kimportpage.h" -KImportPage::KImportPage(QWidget *parent, const char *name ) : KImportPageDlg(parent,name) { +KImportPage::KImportPage(TQWidget *parent, const char *name ) : KImportPageDlg(parent,name) { mIntroSidebar->setPixmap(locate("data", "kmailcvt/pics/step1.png")); } diff --git a/kmailcvt/kimportpage.h b/kmailcvt/kimportpage.h index 9ab402f8e..0b014824f 100644 --- a/kmailcvt/kimportpage.h +++ b/kmailcvt/kimportpage.h @@ -23,7 +23,7 @@ class KImportPage : public KImportPageDlg { Q_OBJECT public: - KImportPage(QWidget *parent=0, const char *name=0); + KImportPage(TQWidget *parent=0, const char *name=0); ~KImportPage(); }; diff --git a/kmailcvt/kmailcvt.cpp b/kmailcvt/kmailcvt.cpp index 840715de0..08dabe830 100644 --- a/kmailcvt/kmailcvt.cpp +++ b/kmailcvt/kmailcvt.cpp @@ -16,11 +16,11 @@ #include "kmailcvt.h" #include <kaboutapplication.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "filters.hxx" -KMailCVT::KMailCVT(QWidget *parent, const char *name) +KMailCVT::KMailCVT(TQWidget *parent, const char *name) : KWizard(parent, name, true) { setCaption( i18n( "KMailCVT Import Tool" ) ); diff --git a/kmailcvt/kmailcvt.h b/kmailcvt/kmailcvt.h index 1875fa5fc..b4ff16ac5 100644 --- a/kmailcvt/kmailcvt.h +++ b/kmailcvt/kmailcvt.h @@ -28,7 +28,7 @@ class KMailCVT : public KWizard { Q_OBJECT public: - KMailCVT(QWidget* parent=0, const char *name=0); + KMailCVT(TQWidget* parent=0, const char *name=0); ~KMailCVT(); virtual void next(); diff --git a/kmailcvt/kselfilterpage.cpp b/kmailcvt/kselfilterpage.cpp index 1fa13b139..a3f1a9b9d 100644 --- a/kmailcvt/kselfilterpage.cpp +++ b/kmailcvt/kselfilterpage.cpp @@ -16,8 +16,8 @@ ***************************************************************************/ #include <kstandarddirs.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <klocale.h> #include "filters.hxx" @@ -38,11 +38,11 @@ #include "kselfilterpage.h" -KSelFilterPage::KSelFilterPage(QWidget *parent, const char *name ) : KSelFilterPageDlg(parent,name) { +KSelFilterPage::KSelFilterPage(TQWidget *parent, const char *name ) : KSelFilterPageDlg(parent,name) { mIntroSidebar->setPixmap(locate("data", "kmailcvt/pics/step1.png")); mFilterList.setAutoDelete( TRUE ); - connect(mFilterCombo, SIGNAL(activated(int)), SLOT(filterSelected(int))); + connect(mFilterCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(filterSelected(int))); // Add new filters below. If this annoys you, please rewrite the stuff to use a factory. // The former approach was overengineered and only worked around problems in the design @@ -70,8 +70,8 @@ KSelFilterPage::~KSelFilterPage() { void KSelFilterPage::filterSelected(int i) { - QString info = mFilterList.at(i)->info(); - QString author = mFilterList.at(i)->author(); + TQString info = mFilterList.at(i)->info(); + TQString author = mFilterList.at(i)->author(); if(!author.isEmpty()) info += i18n("<p><i>Written by %1.</i></p>").arg(author); mDesc->setText(info); diff --git a/kmailcvt/kselfilterpage.h b/kmailcvt/kselfilterpage.h index a91360d5f..17e5958e7 100644 --- a/kmailcvt/kselfilterpage.h +++ b/kmailcvt/kselfilterpage.h @@ -26,14 +26,14 @@ template <class T> class QPtrList; class KSelFilterPage : public KSelFilterPageDlg { Q_OBJECT public: - KSelFilterPage(QWidget *parent=0, const char *name=0); + KSelFilterPage(TQWidget *parent=0, const char *name=0); ~KSelFilterPage(); public: void addFilter(Filter *f); Filter *getSelectedFilter(void); bool removeDupMsg_checked(); private: - QPtrList<Filter> mFilterList; + TQPtrList<Filter> mFilterList; private slots: void filterSelected(int i); }; |