Commit 901eb667 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 5f13d4c0
......@@ -390,7 +390,8 @@ void MainWidget::handleCommandLine(const QStringList &arguments)
parser.process(arguments);
if (parser.isSet(QStringLiteral("import"))) {
for (const QString &urlStr : parser.positionalArguments()) {
const QStringList lst = parser.positionalArguments();
for (const QString &urlStr : lst) {
const QUrl url(QUrl::fromUserInput(urlStr));
for (KAddressBookImportExport::KAddressBookImportExportPluginInterface *interface : qAsConst(mImportExportPluginInterfaceList)) {
if (interface->canImportFileType(url)) {
......
......@@ -88,7 +88,7 @@ QString CompactStyle::contactsToHtml(const KContacts::Addressee::List &contacts)
fields << KAddressBookImportExport::KAddressBookImportExportContactFields::Birthday;
}
QString content = QLatin1String("<html>\n");
QString content = QStringLiteral("<html>\n");
content += QLatin1String(" <body>\n");
content += QLatin1String(" <table style=\"font-size:50%; border-width: 0px; \"width=\"100%\">\n");
......
......@@ -57,7 +57,7 @@ static QString contactsToHtml(const KContacts::Addressee::List &contacts)
}
int counter = 0;
QString content = QLatin1String("<html>\n");
QString content = QStringLiteral("<html>\n");
content += QLatin1String(" <body>\n");
for (const KContacts::Addressee &contact : contacts) {
const int max = qMax(leftFields.count(), rightFields.count());
......
......@@ -34,8 +34,8 @@
#include <KLocalizedString>
// helper method to sort contact fields by field label
static bool contactFieldsNameLesser(const KAddressBookImportExport::KAddressBookImportExportContactFields::Field &field,
const KAddressBookImportExport::KAddressBookImportExportContactFields::Field &otherField)
static bool contactFieldsNameLesser(KAddressBookImportExport::KAddressBookImportExportContactFields::Field field,
KAddressBookImportExport::KAddressBookImportExportContactFields::Field otherField)
{
return QString::localeAwareCompare(KAddressBookImportExport::KAddressBookImportExportContactFields::label(field),
KAddressBookImportExport::KAddressBookImportExportContactFields::label(otherField)) < 0;
......
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