Commit 5e6f67b4 authored by Laurent Montel's avatar Laurent Montel 😁

Fix coding style

parent 558e7992
......@@ -43,8 +43,8 @@ KAddressBookPlugin::KAddressBookPlugin(KontactInterface::Core *core, const QVari
{
setComponentName(QStringLiteral("kaddressbook"), i18n("KAddressBook"));
QAction *action =
new QAction(QIcon::fromTheme(QStringLiteral("contact-new")),
QAction *action
= new QAction(QIcon::fromTheme(QStringLiteral("contact-new")),
i18nc("@action:inmenu", "New Contact..."), this);
actionCollection()->addAction(QStringLiteral("new_contact"), action);
connect(action, &QAction::triggered, this, &KAddressBookPlugin::slotNewContact);
......@@ -56,8 +56,8 @@ KAddressBookPlugin::KAddressBookPlugin(KontactInterface::Core *core, const QVari
"You will be presented with a dialog where you can create a new contact."));
insertNewAction(action);
action =
new QAction(QIcon::fromTheme(QStringLiteral("user-group-new")),
action
= new QAction(QIcon::fromTheme(QStringLiteral("user-group-new")),
i18nc("@action:inmenu", "New Contact Group..."), this);
actionCollection()->addAction(QStringLiteral("new_contactgroup"), action);
connect(action, &QAction::triggered, this, &KAddressBookPlugin::slotNewContactGroup);
......
......@@ -23,8 +23,7 @@
#include <KontactInterface/UniqueAppHandler>
namespace KontactInterface
{
namespace KontactInterface {
class Plugin;
}
......@@ -33,7 +32,10 @@ class KAddressBookUniqueAppHandler : public KontactInterface::UniqueAppHandler
Q_OBJECT
public:
explicit KAddressBookUniqueAppHandler(KontactInterface::Plugin *plugin)
: KontactInterface::UniqueAppHandler(plugin) {}
: KontactInterface::UniqueAppHandler(plugin)
{
}
void loadCommandLineOptions(QCommandLineParser *parser) Q_DECL_OVERRIDE;
int activate(const QStringList &args, const QString &workingDir) Q_DECL_OVERRIDE;
};
......@@ -64,8 +66,6 @@ private Q_SLOTS:
private:
KontactInterface::UniqueAppWatcher *mUniqueAppWatcher;
};
#endif
......@@ -40,4 +40,3 @@ public:
};
#endif /* ABOUTDATA_H */
......@@ -23,12 +23,10 @@
AkonadiContactGroupRepository::AkonadiContactGroupRepository()
: Domain::ContactGroupRepository()
{
}
AkonadiContactGroupRepository::~AkonadiContactGroupRepository()
{
}
KJob *AkonadiContactGroupRepository::createContactGroup(Domain::ContactGroup *contactGroup)
......
......@@ -23,8 +23,7 @@
#include "contactgrouprepository.h"
#include <QObject>
namespace Domain
{
namespace Domain {
class ContactGroup;
}
class KJob;
......
......@@ -22,12 +22,10 @@
AkonadiContactRepository::AkonadiContactRepository()
{
}
AkonadiContactRepository::~AkonadiContactRepository()
{
}
KJob *AkonadiContactRepository::createContact(Domain::Contact *contact)
......
#include "../kaddressbookimportexportcontactfields.h"
#include <qtest.h>
......@@ -86,18 +85,23 @@ void ContactFieldsTest::testSetGet()
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::Birthday, s_birthday, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::Anniversary, s_anniversary, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressStreet, s_homeAddressStreet, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostOfficeBox, s_homeAddressPostOfficeBox, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostOfficeBox, s_homeAddressPostOfficeBox,
contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLocality, s_homeAddressLocality, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressRegion, s_homeAddressRegion, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostalCode, s_homeAddressPostalCode, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressCountry, s_homeAddressCountry, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLabel, s_homeAddressLabel, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressStreet, s_businessAddressStreet, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostOfficeBox, s_businessAddressPostOfficeBox, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLocality, s_businessAddressLocality, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostOfficeBox,
s_businessAddressPostOfficeBox, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLocality, s_businessAddressLocality,
contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressRegion, s_businessAddressRegion, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostalCode, s_businessAddressPostalCode, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressCountry, s_businessAddressCountry, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostalCode, s_businessAddressPostalCode,
contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressCountry, s_businessAddressCountry,
contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLabel, s_businessAddressLabel, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::HomePhone, s_homePhone, contact);
KAddressBookImportExport::KAddressBookImportExportContactFields::setValue(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessPhone, s_businessPhone, contact);
......@@ -136,20 +140,34 @@ void ContactFieldsTest::testSetGet()
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::NickName, contactCopy), s_nickName);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::Birthday, contactCopy), s_birthday);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::Anniversary, contactCopy), s_anniversary);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressStreet, contactCopy), s_homeAddressStreet);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostOfficeBox, contactCopy), s_homeAddressPostOfficeBox);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLocality, contactCopy), s_homeAddressLocality);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressRegion, contactCopy), s_homeAddressRegion);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostalCode, contactCopy), s_homeAddressPostalCode);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressCountry, contactCopy), s_homeAddressCountry);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLabel, contactCopy), s_homeAddressLabel);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressStreet, contactCopy), s_businessAddressStreet);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostOfficeBox, contactCopy), s_businessAddressPostOfficeBox);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLocality, contactCopy), s_businessAddressLocality);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressRegion, contactCopy), s_businessAddressRegion);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostalCode, contactCopy), s_businessAddressPostalCode);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressCountry, contactCopy), s_businessAddressCountry);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLabel, contactCopy), s_businessAddressLabel);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressStreet,
contactCopy), s_homeAddressStreet);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostOfficeBox,
contactCopy), s_homeAddressPostOfficeBox);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLocality,
contactCopy), s_homeAddressLocality);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressRegion,
contactCopy), s_homeAddressRegion);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressPostalCode,
contactCopy), s_homeAddressPostalCode);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressCountry,
contactCopy), s_homeAddressCountry);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomeAddressLabel, contactCopy),
s_homeAddressLabel);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressStreet,
contactCopy), s_businessAddressStreet);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostOfficeBox,
contactCopy), s_businessAddressPostOfficeBox);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLocality,
contactCopy), s_businessAddressLocality);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressRegion,
contactCopy), s_businessAddressRegion);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressPostalCode,
contactCopy), s_businessAddressPostalCode);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressCountry,
contactCopy), s_businessAddressCountry);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessAddressLabel,
contactCopy), s_businessAddressLabel);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::HomePhone, contactCopy), s_homePhone);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::BusinessPhone, contactCopy), s_businessPhone);
QCOMPARE(KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::MobilePhone, contactCopy), s_mobilePhone);
......
......@@ -48,15 +48,15 @@ private:
};
CategoryFilterProxyModelPrivate::CategoryFilterProxyModelPrivate(CategoryFilterProxyModel *parent)
: QObject(),
filterEnabled(false),
q_ptr(parent)
: QObject()
, filterEnabled(false)
, q_ptr(parent)
{
}
CategoryFilterProxyModel::CategoryFilterProxyModel(QObject *parent)
: QSortFilterProxyModel(parent),
d_ptr(new CategoryFilterProxyModelPrivate(this))
: QSortFilterProxyModel(parent)
, d_ptr(new CategoryFilterProxyModelPrivate(this))
{
setDynamicSortFilter(true);
}
......
......@@ -69,12 +69,12 @@ private:
};
CategorySelectWidgetPrivate::CategorySelectWidgetPrivate(CategorySelectWidget *parent)
: QObject(),
tagModel(nullptr),
rowOffset(0),
updateTimer(nullptr),
checkCombo(nullptr),
q_ptr(parent)
: QObject()
, tagModel(nullptr)
, rowOffset(0)
, updateTimer(nullptr)
, checkCombo(nullptr)
, q_ptr(parent)
{
}
......@@ -110,7 +110,7 @@ void CategorySelectWidgetPrivate::init()
connect(updateTimer, &QTimer::timeout, this, &CategorySelectWidgetPrivate::slotCheckedItemsTimer);
QToolButton *but = new QToolButton(q);
but ->setAutoRaise(true);
but->setAutoRaise(true);
but->setIcon(QIcon::fromTheme(QStringLiteral("edit-undo")));
but->setToolTip(i18nc("@action:button", "Reset category filter"));
connect(but, &QToolButton::clicked, this, &CategorySelectWidgetPrivate::slotSelectAll);
......@@ -281,8 +281,8 @@ QList<Akonadi::Tag::Id> CategorySelectWidgetPrivate::filterTags() const
}
CategorySelectWidget::CategorySelectWidget(QWidget *parent)
: QWidget(parent),
d_ptr(new CategorySelectWidgetPrivate(this))
: QWidget(parent)
, d_ptr(new CategorySelectWidgetPrivate(this))
{
Q_D(CategorySelectWidget);
d->init();
......
......@@ -29,7 +29,8 @@
using namespace KAddressBook;
K_PLUGIN_FACTORY(KCMKaddressbookPluginsConfigFactory, registerPlugin<KCMKaddressbookPluginsConfig>();)
K_PLUGIN_FACTORY(KCMKaddressbookPluginsConfigFactory, registerPlugin<KCMKaddressbookPluginsConfig>();
)
KCMKaddressbookPluginsConfig::KCMKaddressbookPluginsConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
......@@ -23,12 +23,10 @@
#include <KCModule>
#include <QVariant>
namespace PimCommon
{
namespace PimCommon {
class ConfigurePluginsWidget;
}
namespace KAddressBook
{
namespace KAddressBook {
class KCMKaddressbookPluginsConfig : public KCModule
{
Q_OBJECT
......
......@@ -25,12 +25,12 @@
#include <KLocalizedString>
#include <PimCommon/GenericPlugin>
namespace
{
namespace {
QString kaddressbookPluginToolsGroupName()
{
return QStringLiteral("kaddressbookplugintoolsgroupname");
}
QString kaddressbookImportExportGroupName()
{
return QStringLiteral("kaddressbookpluginimportexportgroupname");
......@@ -45,7 +45,6 @@ KAddressBookConfigPluginListWidget::KAddressBookConfigPluginListWidget(QWidget *
KAddressBookConfigPluginListWidget::~KAddressBookConfigPluginListWidget()
{
}
void KAddressBookConfigPluginListWidget::save()
......
......@@ -26,33 +26,33 @@ class ContactSortHelper
{
public:
ContactSortHelper(KAddressBookImportExport::KAddressBookImportExportContactFields::Field field, Qt::SortOrder sortOrder)
: mSortField(field), mSortOrder(sortOrder)
: mSortField(field)
, mSortOrder(sortOrder)
{
}
inline bool operator()(const KContacts::Addressee &contact,
const KContacts::Addressee &otherContact) const
inline bool operator()(const KContacts::Addressee &contact, const KContacts::Addressee &otherContact) const
{
int result =
QString::localeAwareCompare(
int result
= QString::localeAwareCompare(
KAddressBookImportExport::KAddressBookImportExportContactFields::value(mSortField, contact),
KAddressBookImportExport::KAddressBookImportExportContactFields::value(mSortField, otherContact));
if (result == 0) {
int givenNameResult =
QString::localeAwareCompare(
int givenNameResult
= QString::localeAwareCompare(
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::GivenName, contact),
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::GivenName, otherContact));
if (givenNameResult == 0) {
int familyNameResult =
QString::localeAwareCompare(
int familyNameResult
= QString::localeAwareCompare(
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::FamilyName, contact),
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::FamilyName, otherContact));
if (familyNameResult == 0) {
result =
QString::localeAwareCompare(
result
= QString::localeAwareCompare(
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::FormattedName, contact),
KAddressBookImportExport::KAddressBookImportExportContactFields::value(KAddressBookImportExport::KAddressBookImportExportContactFields::FormattedName, otherContact));
} else {
......@@ -78,7 +78,8 @@ private:
};
ContactSorter::ContactSorter(KAddressBookImportExport::KAddressBookImportExportContactFields::Field field, Qt::SortOrder sortOrder)
: mSortField(field), mSortOrder(sortOrder)
: mSortField(field)
, mSortOrder(sortOrder)
{
}
......
......@@ -26,8 +26,7 @@
class ContactSorter
{
public:
explicit ContactSorter(KAddressBookImportExport::KAddressBookImportExportContactFields::Field field,
Qt::SortOrder sortOrder = Qt::AscendingOrder);
explicit ContactSorter(KAddressBookImportExport::KAddressBookImportExportContactFields::Field field, Qt::SortOrder sortOrder = Qt::AscendingOrder);
void sort(KContacts::Addressee::List &contacts) const;
......
......@@ -27,7 +27,8 @@
#include <QPushButton>
ContactSwitcher::ContactSwitcher(QWidget *parent)
: QWidget(parent), mView(nullptr)
: QWidget(parent)
, mView(nullptr)
{
QHBoxLayout *layout = new QHBoxLayout(this);
......@@ -84,8 +85,8 @@ void ContactSwitcher::nextClicked()
}
mView->selectionModel()->setCurrentIndex(mView->model()->index(row, 0),
QItemSelectionModel::Rows |
QItemSelectionModel::ClearAndSelect);
QItemSelectionModel::Rows
|QItemSelectionModel::ClearAndSelect);
updateStatus();
}
......@@ -104,8 +105,8 @@ void ContactSwitcher::previousClicked()
}
mView->selectionModel()->setCurrentIndex(mView->model()->index(row, 0),
QItemSelectionModel::Rows |
QItemSelectionModel::ClearAndSelect);
QItemSelectionModel::Rows
|QItemSelectionModel::ClearAndSelect);
updateStatus();
}
......@@ -133,4 +134,3 @@ void ContactSwitcher::updateStatus()
mStatusLabel->clear();
}
}
......@@ -25,12 +25,10 @@
ContactGroupTest::ContactGroupTest(QObject *parent)
: QObject(parent)
{
}
ContactGroupTest::~ContactGroupTest()
{
}
void ContactGroupTest::shouldHaveDefaultValue()
......
......@@ -25,12 +25,10 @@
ContactTest::ContactTest(QObject *parent)
: QObject(parent)
{
}
ContactTest::~ContactTest()
{
}
void ContactTest::shouldHaveDefaultValue()
......
......@@ -32,7 +32,6 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValue();
void shouldAssignAddresse();
};
#endif // CONTACTTEST_H
......@@ -24,12 +24,10 @@ using namespace Domain;
Contact::Contact()
{
}
Contact::~Contact()
{
}
KContacts::Addressee Contact::addressee() const
......
......@@ -23,8 +23,7 @@
#include <KContacts/Addressee>
#include "kaddressbookdomain_export.h"
namespace Domain
{
namespace Domain {
class KADDRESSBOOKDOMAIN_EXPORT Contact
{
public:
......
......@@ -24,12 +24,10 @@ using namespace Domain;
ContactGroup::ContactGroup()
{
}
ContactGroup::~ContactGroup()
{
}
QString ContactGroup::groupName() const
......
......@@ -24,8 +24,7 @@
#include <QString>
#include "kaddressbookdomain_export.h"
namespace Domain
{
namespace Domain {
class KADDRESSBOOKDOMAIN_EXPORT ContactGroup
{
public:
......
......@@ -24,10 +24,8 @@ using namespace Domain;
ContactGroupRepository::ContactGroupRepository()
{
}
ContactGroupRepository::~ContactGroupRepository()
{
}
......@@ -22,8 +22,7 @@
#define CONTACTGROUPREPOSITORY_H
#include "kaddressbookdomain_export.h"
class KJob;
namespace Domain
{
namespace Domain {
class ContactGroup;
class KADDRESSBOOKDOMAIN_EXPORT ContactGroupRepository
{
......
......@@ -24,10 +24,8 @@ using namespace Domain;
ContactRepository::ContactRepository()
{
}
ContactRepository::~ContactRepository()
{
}
......@@ -23,8 +23,7 @@
#include "kaddressbookdomain_export.h"
class KJob;
namespace Domain
{
namespace Domain {
class Contact;
class KADDRESSBOOKDOMAIN_EXPORT ContactRepository
{
......
......@@ -21,8 +21,7 @@
#ifndef GLOBALCONTACTMODEL_H
#define GLOBALCONTACTMODEL_H
namespace Akonadi
{
namespace Akonadi {
class ChangeRecorder;
class ContactsTreeModel;
class Monitor;
......
......@@ -78,4 +78,3 @@ void KAddressBookMigrateApplication::initializeMigrator()
//TODO add folder to migrate
}
......@@ -33,10 +33,10 @@
#include <QVBoxLayout>
K_PLUGIN_FACTORY(KAddressBookFactory, registerPlugin<KAddressBookPart>();)
K_PLUGIN_FACTORY(KAddressBookFactory, registerPlugin<KAddressBookPart>();
)
KAddressBookPart::KAddressBookPart(QWidget *parentWidget, QObject *parent,
const QVariantList &)
KAddressBookPart::KAddressBookPart(QWidget *parentWidget, QObject *parent, const QVariantList &)
: KParts::ReadOnlyPart(parent)
{
setComponentName(QStringLiteral("kaddressbook"), i18n("KAddressBook"));
......@@ -91,7 +91,6 @@ bool KAddressBookPart::openFile()
void KAddressBookPart::guiActivateEvent(KParts::GUIActivateEvent *e)
{
KParts::ReadOnlyPart::guiActivateEvent(e);
mMainWidget->initializePluginActions();
}
......
......@@ -27,7 +27,7 @@
class MainWidget;
class KAddressBookPart: public KParts::ReadOnlyPart
class KAddressBookPart : public KParts::ReadOnlyPart
{
Q_OBJECT
......
......@@ -22,12 +22,10 @@
AddressBookListViewModel::AddressBookListViewModel(QObject *parent)
: QIdentityProxyModel(parent)
{
}
AddressBookListViewModel::~AddressBookListViewModel()
{
}
QHash<int, QByteArray> AddressBookListViewModel::roleNames() const
......
......@@ -64,8 +64,8 @@ public:
if (role == Qt::CheckStateRole) {
// Don't show the checkbox if the collection can't contain incidences
const Akonadi::Collection collection =
index.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
const Akonadi::Collection collection
= index.data(Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
if (collection.isValid() && isStructuralCollection(collection)) {
return QVariant();
}
......@@ -89,8 +89,8 @@ AddressBookMainWidget::AddressBookMainWidget(QWidget *parent)
mCollectionSelectionModel = new QItemSelectionModel(mCollectionTree);
StructuralCollectionsNotCheckableProxy *checkableProxyModel =
new StructuralCollectionsNotCheckableProxy(this);
StructuralCollectionsNotCheckableProxy *checkableProxyModel
= new StructuralCollectionsNotCheckableProxy(this);
checkableProxyModel->setSelectionModel(mCollectionSelectionModel);
checkableProxyModel->setSourceModel(mCollectionTree);
......@@ -106,8 +106,8 @@ AddressBookMainWidget::AddressBookMainWidget(QWidget *parent)
connect(mCollectionView, SIGNAL(currentChanged(Akonadi::Collection)),
this, SLOT(slotCurrentCollectionChanged(Akonadi::Collection)));
#endif
KSelectionProxyModel *selectionProxyModel =
new KSelectionProxyModel(mCollectionSelectionModel, this);