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

Astyle kdelibs

parent ac994eb3
......@@ -50,7 +50,6 @@ void CheckBeforeSendConfigureWidgetTest::shouldHaveDefaultValue()
QVERIFY(!mCheckMailTransport->text().isEmpty());
QVERIFY(!mCheckMailTransport->isChecked());
QCheckBox *mCheckDuplicateEmails = w.findChild<QCheckBox *>(QStringLiteral("checkduplicatedemails"));
QVERIFY(mCheckDuplicateEmails);
QVERIFY(!mCheckDuplicateEmails->text().isEmpty());
......
......@@ -45,8 +45,7 @@ void CheckDuplicateEmailsDialogTest::shouldHaveDefaultValue()
QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
QVERIFY(buttonBox);
QLabel *lab = dlg.findChild<QLabel* >(QStringLiteral("label"));
QLabel *lab = dlg.findChild<QLabel * >(QStringLiteral("label"));
QVERIFY(lab);
QVERIFY(!lab->text().isEmpty());
}
......
......@@ -89,7 +89,6 @@ void CheckDuplicateEmailsJobTest::shouldReturnEmails_data()
result.insert(QStringLiteral("blo@kde.org"), 2);
QTest::newRow("twoduplicateemailswithdifferentvalue") << lst << result;
lst.clear();
lst.append(QStringLiteral("foo <foo@kde.org>"));
lst.append(QStringLiteral("foo@kde.org"));
......
......@@ -40,7 +40,7 @@ CheckDuplicateEmailsDialog::CheckDuplicateEmailsDialog(QWidget *parent)
mListWidget->setObjectName(QStringLiteral("listwidget"));
mainLayout->addWidget(mListWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
connect(buttonBox, &QDialogButtonBox::accepted, this, &CheckDuplicateEmailsDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &CheckDuplicateEmailsDialog::reject);
......
......@@ -37,16 +37,16 @@ void CheckDuplicateEmailsJob::start()
return;
}
QMap<QString, int> results;
Q_FOREACH(const QString &email, mEmails) {
Q_FOREACH (const QString &email, mEmails) {
QString tname, temail;
KEmailAddress::extractEmailAddressAndName(email, temail, tname); // ignore return value
if (!temail.isEmpty()) {
const int val = results.value(temail, 0);
if (val == 0) {
results.insert(temail, val+1);
results.insert(temail, val + 1);
} else {
results[temail] = val+1;
results[temail] = val + 1;
}
}
}
......
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