Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

improve check

parent b60fc741
......@@ -3053,7 +3053,6 @@ void KMComposeWin::slotCheckSendNow()
PotentialPhishingEmailJob *job = new PotentialPhishingEmailJob(this);
KConfigGroup group( KGlobal::config(), "PotentialPhishing");
const QStringList whiteList = group.readEntry("whiteList", QStringList());
qDebug()<<" whiteList"<<whiteList;
job->setEmailWhiteList(whiteList);
QStringList lst;
lst << mComposerBase->to();
......@@ -3068,15 +3067,11 @@ void KMComposeWin::slotCheckSendNow()
void KMComposeWin::slotPotentialPhishingEmailsFound(const QStringList &list)
{
#if 1
slotCheckSendNowStep2();
#else
if (list.isEmpty()) {
slotCheckSendNowStep2();
} else {
mPotentialPhishingEmailWarning->setPotentialPhisingEmail(list);
}
#endif
}
bool KMComposeWin::checkRecipientNumber() const
......
......@@ -52,6 +52,7 @@ void PotentialPhishingEmailJobTest::shouldReturnPotentialPhishingEmails_data()
const QString email = QLatin1String("\"bla@kde.org\" <foo@kde.org>");
QTest::newRow("EmailInWhiteList") << (QStringList() << email) << (QStringList() << email) << false;
QTest::newRow("NotAllEmailInWhiteList") << (QStringList() << email << QLatin1String("\"c@kde.org\" <dd@kde.org>")) << (QStringList() << email) << true;
QTest::newRow("EmailInWhiteListWithSpace") << (QStringList() << QLatin1String(" \"bla@kde.org\" <foo@kde.org> ")) << (QStringList() << email) << false;
}
void PotentialPhishingEmailJobTest::shouldReturnPotentialPhishingEmails()
......
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