Commit 9fc432f0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

run git clang-format

parent 2ea5728a
......@@ -9,7 +9,8 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportAddressbookPage;
}
......
......@@ -9,7 +9,8 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportCalendarPage;
}
......
......@@ -9,7 +9,8 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportFilterPage;
}
......
......@@ -8,7 +8,8 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportFinishPage;
}
......
......@@ -9,15 +9,18 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportMailPage;
}
namespace Akonadi {
namespace Akonadi
{
class Collection;
}
namespace MailImporter {
namespace MailImporter
{
class ImportMailsWidget;
}
......
......@@ -9,7 +9,8 @@
#include <QWidget>
namespace Ui {
namespace Ui
{
class ImportSettingPage;
}
......
......@@ -26,8 +26,8 @@ SelectComponentPage::~SelectComponentPage()
void SelectComponentPage::slotComponentClicked()
{
const bool componentSelected
= (ui->addressbooks->isChecked() || ui->filters->isChecked() || ui->mails->isChecked() || ui->settings->isChecked() || ui->calendars->isChecked() || ui->everything->isChecked());
const bool componentSelected = (ui->addressbooks->isChecked() || ui->filters->isChecked() || ui->mails->isChecked() || ui->settings->isChecked()
|| ui->calendars->isChecked() || ui->everything->isChecked());
Q_EMIT atLeastOneComponentSelected(componentSelected);
}
......
......@@ -6,10 +6,11 @@
#ifndef SELECTCOMPONENTPAGE_H
#define SELECTCOMPONENTPAGE_H
#include <QWidget>
#include "abstractimporter.h"
#include <QWidget>
namespace Ui {
namespace Ui
{
class SelectComponentPage;
}
......
......@@ -11,7 +11,8 @@
class QListWidgetItem;
namespace Ui {
namespace Ui
{
class SelectProgramPage;
}
......
......@@ -20,6 +20,7 @@ public:
protected:
void paintEvent(QPaintEvent *event) override;
private:
void generalPaletteChanged();
QColor mTextColor;
......
......@@ -5,16 +5,17 @@
*/
#include "importmailpluginmanager.h"
#include "importwizard_debug.h"
#include "abstractimporter.h"
#include "importwizard_debug.h"
#include <KPluginMetaData>
#include <KPluginLoader>
#include <KPluginFactory>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <QFileInfo>
namespace {
namespace
{
QString pluginVersion()
{
return QStringLiteral("1.0");
......@@ -48,9 +49,9 @@ bool ImportMailPluginManager::initializePluginList()
ImportMailPluginManagerInfo info;
const KPluginMetaData data = i.previous();
//1) get plugin data => name/description etc.
// 1) get plugin data => name/description etc.
info.pluginData = createPluginMetaData(data);
//2) look at if plugin is activated
// 2) look at if plugin is activated
info.metaDataFileNameBaseName = QFileInfo(data.fileName()).baseName();
info.metaDataFileName = data.fileName();
if (pluginVersion() == data.version()) {
......
......@@ -6,11 +6,12 @@
#ifndef IMPORTMAILPLUGINMANAGER_H
#define IMPORTMAILPLUGINMANAGER_H
#include <KPluginMetaData>
#include <QObject>
#include <QVector>
#include <KPluginMetaData>
namespace LibImportWizard {
namespace LibImportWizard
{
class AbstractImporter;
}
......
......@@ -4,32 +4,32 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "importwizard.h"
#include "importwizardkernel.h"
#include "autodetect/selectprogrampage.h"
#include "autodetect/selectcomponentpage.h"
#include "autodetect/importmailpage.h"
#include "autodetect/importfilterpage.h"
#include "autodetect/importsettingpage.h"
#include "autodetect/importaddressbookpage.h"
#include "autodetect/importcalendarpage.h"
#include "autodetect/importfilterpage.h"
#include "autodetect/importfinishpage.h"
#include "autodetect/importmailpage.h"
#include "autodetect/importsettingpage.h"
#include "autodetect/selectcomponentpage.h"
#include "autodetect/selectprogrampage.h"
#include "importmailpluginmanager.h"
#include "importwizarddisplayinfo.h"
#include "importwizardkernel.h"
#include "manual/importwizardfilterinfogui.h"
#include "manual/manualimportmailpage.h"
#include "manual/manualselectfilterpage.h"
#include "manual/importwizardfilterinfogui.h"
#include <MailImporter/FilterInfo>
#include <MailImporterAkonadi/FilterImporterAkonadi>
#include "importwizard_debug.h"
#include <AkonadiWidgets/controlgui.h>
#include <KAboutData>
#include <KLocalizedString>
#include <KConfigGroup>
#include "importwizard_debug.h"
#include <KMessageBox>
#include <KHelpMenu>
#include <AkonadiWidgets/controlgui.h>
#include <KLocalizedString>
#include <KMessageBox>
#include <MailCommon/MailKernel>
#include <QAction>
#include <QPushButton>
......@@ -44,8 +44,8 @@ ImportWizard::ImportWizard(WizardMode mode, QWidget *parent)
mAbstractDisplayInfo = new ImportWizardDisplayInfo(this);
auto *kernel = new ImportWizardKernel(this);
CommonKernel->registerKernelIf(kernel); //register KernelIf early, it is used by the Filter classes
CommonKernel->registerSettingsIf(kernel); //SettingsIf is used in FolderTreeWidget
CommonKernel->registerKernelIf(kernel); // register KernelIf early, it is used by the Filter classes
CommonKernel->registerSettingsIf(kernel); // SettingsIf is used in FolderTreeWidget
createAutomaticModePage();
createManualModePage();
initializeImportModule();
......@@ -71,7 +71,7 @@ ImportWizard::ImportWizard(WizardMode mode, QWidget *parent)
KMessageBox::information(this, i18n("Close KMail before importing data. Some plugins will modify KMail config file."));
}
KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
//Initialize menu
// Initialize menu
QMenu *menu = helpMenu->menu();
helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(QIcon::fromTheme(QStringLiteral("kmail")));
button(QDialogButtonBox::Help)->setMenu(menu);
......@@ -149,7 +149,7 @@ void ImportWizard::slotCollectionChanged(const Akonadi::Collection &selectedColl
void ImportWizard::reject()
{
if (currentPage() == mImportpageItem) {
MailImporter::FilterInfo::terminateASAP(); // ie. import in progress
MailImporter::FilterInfo::terminateASAP(); // ie. import in progress
}
KAssistantDialog::reject();
}
......@@ -368,11 +368,8 @@ void ImportWizard::back()
{
if (currentPage() == mSelectProgramPageItem) {
return;
} else if (currentPage() == mImportFilterPageItem
|| currentPage() == mImportSettingPageItem
|| currentPage() == mImportAddressbookPageItem
|| currentPage() == mImportCalendarPageItem
|| currentPage() == mImportFinishPageItem) {
} else if (currentPage() == mImportFilterPageItem || currentPage() == mImportSettingPageItem || currentPage() == mImportAddressbookPageItem
|| currentPage() == mImportCalendarPageItem || currentPage() == mImportFinishPageItem) {
enableAllImportButton();
}
KAssistantDialog::back();
......
......@@ -9,7 +9,8 @@
#include "abstractimporter.h"
#include <KAssistantDialog>
namespace LibImportWizard {
namespace LibImportWizard
{
class AbstractImporter;
class AbstractDisplayInfo;
}
......@@ -25,17 +26,15 @@ class ImportCalendarPage;
class ManualSelectFilterPage;
class ManualImportMailPage;
namespace Akonadi {
namespace Akonadi
{
class Collection;
}
class ImportWizard : public KAssistantDialog
{
Q_OBJECT
public:
enum class WizardMode {
AutoDetect = 0,
Manual = 1
};
enum class WizardMode { AutoDetect = 0, Manual = 1 };
explicit ImportWizard(WizardMode mode, QWidget *parent = nullptr);
~ImportWizard() override;
......
......@@ -5,13 +5,13 @@
*/
#include "importwizarddisplayinfo.h"
#include "importwizard.h"
#include "autodetect/importcalendarpage.h"
#include "autodetect/importsettingpage.h"
#include "autodetect/importaddressbookpage.h"
#include "autodetect/importcalendarpage.h"
#include "autodetect/importfilterinfogui.h"
#include "autodetect/importfilterpage.h"
#include "autodetect/importmailpage.h"
#include "autodetect/importfilterinfogui.h"
#include "autodetect/importsettingpage.h"
#include "importwizard.h"
#include <MailImporter/FilterInfo>
#include <MailImporterAkonadi/FilterImporterAkonadi>
......
......@@ -28,6 +28,7 @@ public:
void initializeFilter(MailImporter::Filter &filter) override;
QWidget *parentWidget() const override;
private:
ImportWizard *const mImportWizard;
};
......
......@@ -5,13 +5,13 @@
*/
#include "importwizardkernel.h"
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
#include <MailCommon/FolderCollectionMonitor>
#include <AkonadiCore/session.h>
#include <AkonadiCore/entitytreemodel.h>
#include <AkonadiCore/entitymimetypefiltermodel.h>
#include <AkonadiCore/changerecorder.h>
#include <AkonadiCore/entitymimetypefiltermodel.h>
#include <AkonadiCore/entitytreemodel.h>
#include <AkonadiCore/session.h>
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
#include <KSharedConfig>
#include <MailCommon/FolderCollectionMonitor>
ImportWizardKernel::ImportWizardKernel(QObject *parent)
: QObject(parent)
......
......@@ -9,12 +9,14 @@
#include <MailCommon/MailInterfaces>
namespace Akonadi {
namespace Akonadi
{
class EntityTreeModel;
class EntityMimeTypeFilterModel;
}
namespace MailCommon {
namespace MailCommon
{
class FolderCollectionMonitor;
}
......
......@@ -6,13 +6,13 @@
#include "abstractaddressbook.h"
#include "abstractdisplayinfo.h"
#include <KContacts/Addressee>
#include <kcontacts/contactgroup.h>
#include <KLocalizedString>
#include "libimportwizard_debug.h"
#include <AkonadiCore/ItemCreateJob>
#include <AkonadiCore/Item>
#include <AkonadiCore/ItemCreateJob>
#include <AkonadiWidgets/CollectionDialog>
#include <KContacts/Addressee>
#include <KLocalizedString>
#include <kcontacts/contactgroup.h>
#include <QPointer>
using namespace LibImportWizard;
......
......@@ -7,17 +7,19 @@
#ifndef ABSTRACTADDRESSBOOK_H
#define ABSTRACTADDRESSBOOK_H
#include <AkonadiCore/Collection>
#include "abstractbase.h"
#include "libimportwizard_export.h"
#include <AkonadiCore/Collection>
namespace KContacts {
namespace KContacts
{
class Addressee;
class ContactGroup;
}
class KJob;
namespace LibImportWizard {
namespace LibImportWizard
{
class LIBIMPORTWIZARD_EXPORT AbstractAddressBook : public LibImportWizard::AbstractBase
{
Q_OBJECT
......
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