Commit 1c5928d2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent 1d80493c
......@@ -71,14 +71,14 @@ QString contactsToHtml(const KContacts::Addressee::List &contacts, const ColorSe
for (const KContacts::Addressee &contact : contacts) {
QString name = contact.realName();
if (!contact.title().isEmpty() || !contact.role().isEmpty()) {
QStringList content;
QStringList contentAddress;
if (!contact.title().isEmpty()) {
content << contact.title();
contentAddress << contact.title();
}
if (!contact.role().isEmpty()) {
content << contact.role();
contentAddress << contact.role();
}
name += QStringLiteral(" (%1)").arg(content.join(QStringLiteral(", ")));
name += QStringLiteral(" (%1)").arg(contentAddress.join(QStringLiteral(", ")));
}
const QString birthday = QLocale().toString(contact.birthday().date(), QLocale::ShortFormat);
......
......@@ -36,9 +36,9 @@ using namespace KABPrinting;
PrintStyle::PrintStyle(PrintingWizard *parent)
: QObject(parent)
, mWizard(parent)
, mSortField(KAddressBookImportExport::KAddressBookImportExportContactFields::GivenName)
, mSortOrder(Qt::AscendingOrder)
{
mSortField = KAddressBookImportExport::KAddressBookImportExportContactFields::GivenName;
mSortOrder = Qt::AscendingOrder;
}
PrintStyle::~PrintStyle()
......
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