bool Evolutionv1ImportData::importMails() { MailImporter::FilterInfo *info = initializeInfo(); MailImporter::FilterEvolution evolution; evolution.setFilterInfo( info ); info->setStatusMessage(i18n("Import in progress")); const QString mailsPath = mPath; QDir directory(mailsPath); if(directory.exists()) evolution.importMails(mailsPath); else evolution.import(); info->setStatusMessage(i18n("Import finished")); delete info; return true; }
bool TheBatImportData::importMails() { MailImporter::FilterInfo *info = initializeInfo(); MailImporter::FilterTheBat thebat; thebat.setFilterInfo(info); info->setStatusMessage(i18n("Import in progress")); QDir directory(mPath); if (directory.exists()) { thebat.importMails(mPath); } else { thebat.import(); } info->setStatusMessage(i18n("Import finished")); delete info; return true; }