From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmailcvt/filter_sylpheed.cxx | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kmailcvt/filter_sylpheed.cxx') 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 msgflags; + TQDict 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 &dict ) +void FilterSylpheed::readMarkFile( FilterInfo *info, const TQString &path, TQDict &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'; -- cgit v1.2.1