Commit 8137364a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

run git clang-format

parent 3ce79d55
......@@ -5,8 +5,8 @@
*/
#include "filterbalsamailtest.h"
#include <MailImporter/FilterBalsa>
#include "filterimportertest.h"
#include <MailImporter/FilterBalsa>
#include <QTest>
FilterBalsaMailTest::FilterBalsaMailTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filterclawsmailtest.h"
#include <MailImporter/FilterClawsMail>
#include "filterimportertest.h"
#include <MailImporter/FilterClawsMail>
#include <QTest>
FilterClawsMailTest::FilterClawsMailTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filtericedovetest.h"
#include "filters/filtericedove.h"
#include "filterimportertest.h"
#include "filters/filtericedove.h"
#include <QTest>
class FilterIcecoveAbstract : public MailImporter::FilterIcedove
......
......@@ -13,6 +13,6 @@ FilterImporterTestUtil::FilterImporterTestUtil(const QString &filename)
QString FilterImporterTestUtil::extractData()
{
//TODO
// TODO
return {};
}
......@@ -14,6 +14,7 @@ class FilterImporterTestUtil
public:
explicit FilterImporterTestUtil(const QString &filename);
QString extractData();
private:
QString mFileName;
};
......
......@@ -5,8 +5,8 @@
*/
#include "filterlnotestest.h"
#include "filters/filterlnotes.h"
#include "filterimportertest.h"
#include "filters/filterlnotes.h"
#include <QTest>
FilterLnotesTest::FilterLnotesTest(QObject *parent)
......@@ -29,9 +29,9 @@ void FilterLnotesTest::canNotImportDataEmptyPath()
auto *importerTest = new FilterImporterTest(&info);
filter.setFilterImporter(importerTest);
filter.setFilterInfo(&info);
//TODO implement it
//filter.importMail(QString());
//QVERIFY(importerTest->filterImporterDataList().isEmpty());
// TODO implement it
// filter.importMail(QString());
// QVERIFY(importerTest->filterImporterDataList().isEmpty());
delete importerTest;
}
......@@ -42,8 +42,8 @@ void FilterLnotesTest::canNotImportDataUnknowPath()
auto *importerTest = new FilterImporterTest(&info);
filter.setFilterImporter(importerTest);
filter.setFilterInfo(&info);
//filter.importMails(QStringLiteral("/foo/kde/bla/toto/"));
//QVERIFY(importerTest->filterImporterDataList().isEmpty());
// filter.importMails(QStringLiteral("/foo/kde/bla/toto/"));
// QVERIFY(importerTest->filterImporterDataList().isEmpty());
delete importerTest;
}
......
......@@ -5,8 +5,8 @@
*/
#include "filtermailapptest.h"
#include <MailImporter/FilterMailApp>
#include "filterimportertest.h"
#include <MailImporter/FilterMailApp>
#include <QTest>
FilterMailAppTest::FilterMailAppTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filtermailmangziptest.h"
#include <MailImporter/FilterMailmanGzip>
#include "filterimportertest.h"
#include <MailImporter/FilterMailmanGzip>
#include <QTest>
FilterMAilmangzipTest::FilterMAilmangzipTest(QObject *parent)
......@@ -36,7 +36,7 @@ void FilterMAilmangzipTest::canNotImportDataEmptyPath()
void FilterMAilmangzipTest::canNotImportDataUnknowPath()
{
//VERIFY it.
// VERIFY it.
#if 0
MailImporter::FilterMailmanGzip filter;
MailImporter::FilterInfo *info = new MailImporter::FilterInfo;
......
......@@ -5,8 +5,8 @@
*/
#include "filtermboxtest.h"
#include <MailImporter/FilterMBox>
#include "filterimportertest.h"
#include <MailImporter/FilterMBox>
#include <QTest>
FilterMBoxTest::FilterMBoxTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filterplaintest.h"
#include <MailImporter/FilterPlain>
#include "filterimportertest.h"
#include <MailImporter/FilterPlain>
#include <QTest>
FilterPlainTest::FilterPlainTest(QObject *parent)
......
......@@ -5,9 +5,9 @@
*/
#include "filtersylpheedtest.h"
#include "filterimportertest.h"
#include "filterimportertestutil.h"
#include <MailImporter/FilterSylpheed>
#include "filterimportertest.h"
#include <QTest>
FilterSylpheedTest::FilterSylpheedTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filterthebattest.h"
#include <MailImporter/FilterTheBat>
#include "filterimportertest.h"
#include <MailImporter/FilterTheBat>
#include <QTest>
FilterTheBatTest::FilterTheBatTest(QObject *parent)
......
......@@ -5,8 +5,8 @@
*/
#include "filterthunderbirdtest.h"
#include "filters/filterthunderbird.h"
#include "filterimportertest.h"
#include "filters/filterthunderbird.h"
#include <QTest>
class FilterThunderBirdAbstract : public MailImporter::FilterThunderbird
......
......@@ -7,8 +7,8 @@
#include "selectthunderbirdprofiledialogtest.h"
#include "../selectthunderbirdprofilewidget.h"
#include <QTest>
#include <QDialogButtonBox>
#include <QTest>
SelectThunderbirdProfileDialogTest::SelectThunderbirdProfileDialogTest(QObject *parent)
: QObject(parent)
......
......@@ -8,11 +8,12 @@
#define FILTERIMPORTERBASE_H
#include "mailimporter_export.h"
#include <KArchive>
#include <MailImporter/MessageStatus>
#include <QString>
#include <KArchive>
namespace MailImporter {
namespace MailImporter
{
class FilterInfo;
/**
* @brief The FilterImporterBase class
......@@ -23,12 +24,14 @@ class MAILIMPORTER_EXPORT FilterImporterBase
public:
explicit FilterImporterBase(MailImporter::FilterInfo *info);
virtual ~FilterImporterBase();
Q_REQUIRED_RESULT virtual bool importMessage(const QString &folderName, const QString &msgPath, bool duplicateCheck, const MailImporter::MessageStatus &status);
Q_REQUIRED_RESULT virtual bool
importMessage(const QString &folderName, const QString &msgPath, bool duplicateCheck, const MailImporter::MessageStatus &status);
Q_REQUIRED_RESULT virtual bool importMessage(const KArchiveFile *file, const QString &folderPath, int &nbTotal, int &fileDone);
virtual void clear();
virtual void clearCountDuplicate();
Q_REQUIRED_RESULT virtual int countDuplicates() const;
Q_REQUIRED_RESULT virtual QString topLevelFolder() const;
protected:
MailImporter::FilterInfo *const mInfo;
};
......
......@@ -11,7 +11,8 @@
#include "mailimporter_export.h"
#include <QString>
class QWidget;
namespace MailImporter {
namespace MailImporter
{
class FilterInfoGui;
/**
* @brief The FilterInfo class
......
......@@ -9,7 +9,8 @@
#include "filters.h"
namespace MailImporter {
namespace MailImporter
{
/**
* @brief The FilterInfoGui class
* @author Laurent Montel <montel@kde.org>
......
......@@ -146,7 +146,7 @@ int Filter::countDirectory(const QDir &dir, bool searchHiddenDirectory)
if (searchHiddenDirectory) {
subDirs = dir.entryList(QStringList(QStringLiteral("*")), QDir::Dirs | QDir::Hidden, QDir::Name);
} else {
subDirs = dir.entryList(QStringList(QStringLiteral("[^\\.]*")), QDir::Dirs, QDir::Name); // Removal of . and ..
subDirs = dir.entryList(QStringList(QStringLiteral("[^\\.]*")), QDir::Dirs, QDir::Name); // Removal of . and ..
}
QStringList::ConstIterator end = subDirs.constEnd();
......
......@@ -20,7 +20,8 @@
#include <QDir>
namespace MailImporter {
namespace MailImporter
{
/**
* @brief The Filter class
* @author Laurent Montel <montel@kde.org>
......@@ -56,7 +57,9 @@ public:
protected:
static int countDirectory(const QDir &dir, bool searchHiddenDirectory);
Q_REQUIRED_RESULT bool importMessage(const QString &folderName, const QString &msgPath, bool duplicateCheck, const MessageStatus &status = MailImporter::MessageStatus());
Q_REQUIRED_RESULT bool
importMessage(const QString &folderName, const QString &msgPath, bool duplicateCheck, const MessageStatus &status = MailImporter::MessageStatus());
private:
class Private;
Private *const d;
......
......@@ -94,9 +94,9 @@ void FilterBalsa::importMails(const QString &maildir)
}
setMailDir(maildir);
/**
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
if (mailDir() == QDir::homePath() || mailDir() == (QDir::homePath() + QLatin1Char('/'))) {
filterInfo()->addErrorLogEntry(i18n("No files found for import."));
} else {
......@@ -158,10 +158,8 @@ void FilterBalsa::importFiles(const QString &dirName)
return;
}
QString temp_mailfile = *mailFile;
if (!(temp_mailfile.endsWith(QLatin1String(".db"))
|| temp_mailfile.endsWith(QLatin1String(".cmeta"))
|| temp_mailfile.endsWith(QLatin1String(".ev-summary"))
|| temp_mailfile.endsWith(QLatin1String(".ibex.index"))
if (!(temp_mailfile.endsWith(QLatin1String(".db")) || temp_mailfile.endsWith(QLatin1String(".cmeta"))
|| temp_mailfile.endsWith(QLatin1String(".ev-summary")) || temp_mailfile.endsWith(QLatin1String(".ibex.index"))
|| temp_mailfile.endsWith(QLatin1String(".ibex.index.data")))) {
if (!generatedPath) {
_path = i18nc("define folder name where we import evolution mails", "Evolution-Import");
......@@ -175,7 +173,7 @@ void FilterBalsa::importFiles(const QString &dirName)
if (_cat.startsWith(QLatin1Char('.'))) {
_cat.remove(0, 1);
}
//Evolution store inbox as "."
// Evolution store inbox as "."
if (_cat.startsWith(QLatin1Char('.'))) {
_cat.replace(0, 1, QStringLiteral("Inbox/"));
}
......@@ -213,7 +211,7 @@ MailImporter::MessageStatus FilterBalsa::statusFromFile(const QString &filename)
status.setRead(true);
}
if (statusStr.contains(QLatin1Char('F'))) {
//TODO
// TODO
}
if (statusStr.contains(QLatin1Char('R'))) {
status.setReplied(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment