diff options
Diffstat (limited to 'kmailcvt/filter_oe.cxx')
-rw-r--r-- | kmailcvt/filter_oe.cxx | 66 |
1 files changed, 33 insertions, 33 deletions
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]; } } |