diff options
Diffstat (limited to 'kmailcvt/filter_opera.cxx')
-rw-r--r-- | kmailcvt/filter_opera.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
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 ); |