Commit b5615e12 authored by Laurent Montel's avatar Laurent Montel 😁

Fix coding style

parent bc6d4170
......@@ -21,8 +21,8 @@
using namespace KAddressBookGrantlee;
ContactGrantleeAddressObject::ContactGrantleeAddressObject(const KContacts::Address &address, QObject *parent)
: QObject(parent),
mAddress(address)
: QObject(parent)
, mAddress(address)
{
}
......
......@@ -21,8 +21,7 @@
#define CONTACTGRANTLEEPRINTADDRESSOBJECT_H
#include <QObject>
#include <KContacts/Addressee>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeAddressObject : public QObject
{
Q_OBJECT
......
......@@ -27,14 +27,13 @@ inline QString loadCustom(const KContacts::Addressee &contact, const QString &ke
}
ContactGrantleeCryptoObject::ContactGrantleeCryptoObject(const KContacts::Addressee &address, QObject *parent)
: QObject(parent),
mAddress(address)
: QObject(parent)
, mAddress(address)
{
}
ContactGrantleeCryptoObject::~ContactGrantleeCryptoObject()
{
}
QString ContactGrantleeCryptoObject::signaturePreference() const
......
......@@ -21,8 +21,7 @@
#define CONTACTGRANTLEEPRINTCRYPTOOBJECT_H
#include <QObject>
#include <KContacts/Addressee>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeCryptoObject : public QObject
{
Q_OBJECT
......
......@@ -21,16 +21,14 @@
using namespace KAddressBookGrantlee;
ContactGrantleeEmail::ContactGrantleeEmail(const KContacts::Addressee &addressee, const KContacts::Email &email, QObject *parent)
: QObject(parent),
mEmail(email),
mAddressee(addressee)
: QObject(parent)
, mEmail(email)
, mAddressee(addressee)
{
}
ContactGrantleeEmail::~ContactGrantleeEmail()
{
}
QString ContactGrantleeEmail::email() const
......
......@@ -25,8 +25,7 @@
#include <KContacts/Addressee>
#include <KContacts/Email>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeEmail : public QObject
{
Q_OBJECT
......
......@@ -22,15 +22,13 @@
using namespace KAddressBookGrantlee;
ContactGrantleeGeoObject::ContactGrantleeGeoObject(const KContacts::Geo &geo, QObject *parent)
: QObject(parent),
mGeo(geo)
: QObject(parent)
, mGeo(geo)
{
}
ContactGrantleeGeoObject::~ContactGrantleeGeoObject()
{
}
float ContactGrantleeGeoObject::latitude() const
......
......@@ -23,9 +23,7 @@
#include <QObject>
#include <kcontacts/geo.h>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeGeoObject : public QObject
{
Q_OBJECT
......
......@@ -22,15 +22,14 @@
using namespace KAddressBookGrantlee;
ContactGrantleeImObject::ContactGrantleeImObject(const QString &type, const QString &address, QObject *parent)
: QObject(parent),
mType(type),
mAddress(address)
: QObject(parent)
, mType(type)
, mAddress(address)
{
}
ContactGrantleeImObject::~ContactGrantleeImObject()
{
}
QString ContactGrantleeImObject::type() const
......
......@@ -20,8 +20,7 @@
#ifndef CONTACTGRANTLEEPRINTIMOBJECT_H
#define CONTACTGRANTLEEPRINTIMOBJECT_H
#include <QObject>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeImObject : public QObject
{
Q_OBJECT
......
......@@ -21,8 +21,8 @@
using namespace KAddressBookGrantlee;
ContactGrantleePhoneObject::ContactGrantleePhoneObject(const KContacts::PhoneNumber &phone, QObject *parent)
: QObject(parent),
mPhoneNumber(phone)
: QObject(parent)
, mPhoneNumber(phone)
{
}
......@@ -42,5 +42,5 @@ QString ContactGrantleePhoneObject::number() const
bool ContactGrantleePhoneObject::preferred() const
{
return (mPhoneNumber.type() & KContacts::PhoneNumber::Pref);
return mPhoneNumber.type() & KContacts::PhoneNumber::Pref;
}
......@@ -21,8 +21,7 @@
#define CONTACTGRANTLEEPRINTPHONEOBJECT_H
#include <QObject>
#include <KContacts/PhoneNumber>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleePhoneObject : public QObject
{
Q_OBJECT
......
......@@ -23,15 +23,13 @@
using namespace KAddressBookGrantlee;
ContactGrantleeWebSite::ContactGrantleeWebSite(const KContacts::ResourceLocatorUrl &resourceLocator, QObject *parent)
: QObject(parent),
mResourceLocator(resourceLocator)
: QObject(parent)
, mResourceLocator(resourceLocator)
{
}
ContactGrantleeWebSite::~ContactGrantleeWebSite()
{
}
QString ContactGrantleeWebSite::url() const
......
......@@ -22,8 +22,7 @@
#include <QObject>
#include <KContacts/ResourceLocatorUrl>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeWebSite : public QObject
{
Q_OBJECT
......
......@@ -56,8 +56,8 @@ class Q_DECL_HIDDEN GrantleeContactFormatter::Private
{
public:
Private()
: forceDisableQRCode(false),
showQRCode(true)
: forceDisableQRCode(false)
, showQRCode(true)
{
KConfig config(QStringLiteral("akonadi_contactrc"));
KConfigGroup group(&config, QStringLiteral("View"));
......@@ -152,15 +152,15 @@ static QVariantHash phoneNumberHash(const KContacts::PhoneNumber &phoneNumber, i
setHashField(numberObject, QStringLiteral("number"), phoneNumber.number());
if (!phoneNumber.isEmpty()) {
const QString url =
QStringLiteral("<a href=\"phone:?index=%1\">%2</a>").
arg(counter).
arg(phoneNumber.number());
const QString url
= QStringLiteral("<a href=\"phone:?index=%1\">%2</a>").
arg(counter).
arg(phoneNumber.number());
numberObject.insert(QStringLiteral("numberLink"), url);
if (phoneNumber.type() & KContacts::PhoneNumber::Cell) {
const QString url =
QStringLiteral("<a href=\"sms:?index=%1\"><img src=\"sms_icon\" align=\"top\"/></a>").arg(counter);
const QString url
= QStringLiteral("<a href=\"sms:?index=%1\"><img src=\"sms_icon\" align=\"top\"/></a>").arg(counter);
numberObject.insert(QStringLiteral("smsLink"), url);
}
}
......@@ -179,7 +179,7 @@ static QVariantHash imAddressHash(const QString &typeKey, const QString &imAddre
setHashField(addressObject, QStringLiteral("imAddress"), imAddress);
const QString iconUrl = QUrl::fromLocalFile(KIconLoader::global()->iconPath(IMProtocols::self()->icon(typeKey),
-KIconLoader::SizeSmall)).url();
-KIconLoader::SizeSmall)).url();
const QString url = QStringLiteral("<img src=\"%1\" align=\"top\" height=\"%2\" width=\"%2\"/>").arg(iconUrl, QString::number(KIconLoader::SizeSmall));
addressObject.insert(QStringLiteral("imIcon"), url);
......@@ -283,14 +283,14 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
const int years = contactAge(birthday);
contactObject.insert(QStringLiteral("age"), QString::number(years));
contactObject.insert(QStringLiteral("birthdayage"), QString(formattedBirthday +
QStringLiteral("&nbsp;&nbsp;") +
i18np("(One year old)", "(%1 years old)", years)));
contactObject.insert(QStringLiteral("birthdayage"), QString(formattedBirthday
+QStringLiteral("&nbsp;&nbsp;")
+i18np("(One year old)", "(%1 years old)", years)));
}
const QDate anniversary =
QDate::fromString(rawContact.custom(QStringLiteral("KADDRESSBOOK"),
QStringLiteral("X-Anniversary")), Qt::ISODate);
const QDate anniversary
= QDate::fromString(rawContact.custom(QStringLiteral("KADDRESSBOOK"),
QStringLiteral("X-Anniversary")), Qt::ISODate);
if (anniversary.isValid()) {
contactObject.insert(QStringLiteral("anniversary"),
QLocale().toString(anniversary));
......@@ -342,8 +342,8 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
const KContacts::ResourceLocatorUrl::List extraUrlList = rawContact.extraUrlList();
for (const KContacts::ResourceLocatorUrl &resourceLocator : extraUrlList) {
QString url = resourceLocator.url().url();
if (!url.startsWith(QStringLiteral("http://")) &&
!url.startsWith(QStringLiteral("https://"))) {
if (!url.startsWith(QStringLiteral("http://"))
&& !url.startsWith(QStringLiteral("https://"))) {
url = QStringLiteral("http://") + url;
}
websites.append(KStringHandler::tagUrls(url));
......@@ -354,16 +354,16 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
}
// Blog Feed
const QString blog =
rawContact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("BlogFeed"));
const QString blog
= rawContact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("BlogFeed"));
if (!blog.isEmpty()) {
contactObject.insert(QStringLiteral("blogUrl"), KStringHandler::tagUrls(blog));
grantleeContactUtil.insertVariableToQVariantHash(contactObject, QStringLiteral("blogUrli18n"));
}
// Address Book
const QString addressBookName =
rawContact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("AddressBook"));
const QString addressBookName
= rawContact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("AddressBook"));
if (!addressBookName.isEmpty()) {
contactObject.insert(QStringLiteral("addressBookName"), addressBookName);
grantleeContactUtil.insertVariableToQVariantHash(contactObject, QStringLiteral("addressBookNamei18n"));
......@@ -487,15 +487,12 @@ QString GrantleeContactFormatter::toHtml(HtmlForm form) const
} else {
value = i18nc("Boolean value", "no");
}
} else if (descriptionType == QLatin1String("date")) {
} else if (descriptionType == QLatin1String("date")) {
const QDate date = QDate::fromString(value, Qt::ISODate);
value = QLocale().toString(date, QLocale::ShortFormat);
} else if (descriptionType == QLatin1String("time")) {
const QTime time = QTime::fromString(value, Qt::ISODate);
value = QLocale::system().toString(time, QLocale::ShortFormat);
} else if (descriptionType == QLatin1String("datetime")) {
const QDateTime dateTime = QDateTime::fromString(value, Qt::ISODate);
value = QLocale().toString(dateTime, QLocale::ShortFormat);
......
......@@ -25,14 +25,11 @@
#include <Akonadi/Contact/AbstractContactFormatter>
#include "kaddressbook_grantlee_export.h"
namespace GrantleeTheme
{
namespace GrantleeTheme {
class Theme;
}
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
/**
* @short A class that formats a contact as HTML code.
*
......@@ -70,7 +67,6 @@ private:
Private *const d;
//@endcond
};
}
#endif
......@@ -112,9 +112,9 @@ static QVariantHash memberHash(const KContacts::ContactGroup::Data &data)
contact.setFormattedName(data.name());
contact.insertEmail(data.email());
const QString emailLink = QStringLiteral("<a href=\"mailto:") +
QString::fromLatin1(QUrl::toPercentEncoding(contact.fullEmail())) +
QStringLiteral("\">%1</a>").arg(contact.preferredEmail());
const QString emailLink = QStringLiteral("<a href=\"mailto:")
+QString::fromLatin1(QUrl::toPercentEncoding(contact.fullEmail()))
+QStringLiteral("\">%1</a>").arg(contact.preferredEmail());
setHashField(memberObject, QStringLiteral("emailLink"), emailLink);
......
......@@ -25,14 +25,11 @@
#include <Akonadi/Contact/AbstractContactGroupFormatter>
#include "kaddressbook_grantlee_export.h"
namespace GrantleeTheme
{
namespace GrantleeTheme {
class Theme;
}
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
/**
* @short A class that formats a contact group as HTML code.
*
......@@ -65,7 +62,6 @@ private:
Private *const d;
//@endcond
};
}
#endif
......@@ -24,7 +24,6 @@ using namespace KAddressBookGrantlee;
GrantleeContactUtils::GrantleeContactUtils()
{
}
void GrantleeContactUtils::insertVariableToQVariantHash(QVariantHash &contactI18n, const QString &variable)
......
......@@ -21,8 +21,7 @@
#define GRANTLEECONTACTUTILS_H
#include <QVariantHash>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class GrantleeContactUtils
{
public:
......
......@@ -24,12 +24,10 @@
GrantleePrintTest::GrantleePrintTest(QObject *parent)
: QObject(parent)
{
}
GrantleePrintTest::~GrantleePrintTest()
{
}
void GrantleePrintTest::shouldHaveDefaultValue()
......
......@@ -37,7 +37,6 @@ private Q_SLOTS:
void shouldDisplayContactInfo_data();
void shouldDisplayContactInfo();
};
#endif // GRANTLEEPRINTTEST_H
......@@ -37,8 +37,8 @@
using namespace KAddressBookGrantlee;
ContactGrantleePrintObject::ContactGrantleePrintObject(const KContacts::Addressee &address, QObject *parent)
: QObject(parent),
mAddress(address)
: QObject(parent)
, mAddress(address)
{
const auto addresses = address.addresses();
mListAddress.reserve(addresses.size());
......@@ -283,9 +283,9 @@ QString ContactGrantleePrintObject::logo() const
QString ContactGrantleePrintObject::anniversary() const
{
const QDate anniversary = QDate::fromString(mAddress.custom(QStringLiteral("KADDRESSBOOK"),
QStringLiteral("X-Anniversary")), Qt::ISODate);
QStringLiteral("X-Anniversary")), Qt::ISODate);
if (anniversary.isValid()) {
return (QLocale().toString(anniversary));
return QLocale().toString(anniversary);
}
return QString();
}
......
......@@ -22,8 +22,7 @@
#include <QObject>
#include <KContacts/Addressee>
#include <QVariant>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class ContactGrantleeAddressObject;
class ContactGrantleePhoneObject;
class ContactGrantleeImObject;
......
......@@ -90,4 +90,3 @@ QString GrantleePrint::contactsToHtml(const KContacts::Addressee::List &contacts
qDeleteAll(lst);
return content;
}
......@@ -25,13 +25,11 @@
#include <QObject>
#include <KContacts/Addressee>
namespace Grantlee
{
namespace Grantlee {
class Engine;
}
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class KADDRESSBOOK_GRANTLEE_EXPORT GrantleePrint : public PimCommon::GenericGrantleeFormatter
{
Q_OBJECT
......
......@@ -23,8 +23,7 @@
#include "kaddressbook_grantlee_export.h"
#include <Akonadi/Contact/ContactViewer>
namespace KAddressBookGrantlee
{
namespace KAddressBookGrantlee {
class GrantleeContactFormatter;
class KADDRESSBOOK_GRANTLEE_EXPORT GrantleeContactViewer : public Akonadi::ContactViewer
{
......
#include "../src/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);
......
......@@ -27,12 +27,10 @@
#include <QPushButton>
using namespace KAddressBookImportExport;
KAddressBookContactSelectionDialog::KAddressBookContactSelectionDialog(QItemSelectionModel *selectionModel, bool allowToSelectTypeToExport,
QWidget *parent)
: QDialog(parent),
mVCardExport(nullptr)
KAddressBookContactSelectionDialog::KAddressBookContactSelectionDialog(QItemSelectionModel *selectionModel, bool allowToSelectTypeToExport, QWidget *parent)
: QDialog(parent)
, mVCardExport(nullptr)
{
setWindowTitle(i18n("Select Contacts"));