summaryrefslogtreecommitdiffstats
path: root/kmailcvt/filter_sylpheed.cxx
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmailcvt/filter_sylpheed.cxx
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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/filter_sylpheed.cxx')
-rw-r--r--kmailcvt/filter_sylpheed.cxx54
1 files changed, 27 insertions, 27 deletions
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';