Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 3684572e authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent cf49908f
......@@ -89,15 +89,18 @@ void PotentialPhishingDetailDialog::slotSave()
KConfigGroup group( KGlobal::config(), "PotentialPhishing");
QStringList potentialPhishing = group.readEntry("whiteList", QStringList());
bool emailsAdded = false;
for (int i=0; i < mListWidget->count(); ++i) {
QListWidgetItem *item = mListWidget->item(i);
if (item->checkState() == Qt::Checked) {
QString email = item->text();
if (!potentialPhishing.contains(email)) {
potentialPhishing << email;
emailsAdded = true;
group.writeEntry( "whiteList", potentialPhishing);
if (emailsAdded)
group.writeEntry( "whiteList", potentialPhishing);
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