Commit fe71ae1d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add warning when we can't add recipient

parent bd8fd4d7
Pipeline #59425 passed with stage
in 22 minutes and 37 seconds
......@@ -557,7 +557,9 @@ void KMComposerWin::insertSnippetInfo(const MailCommon::SnippetInfo &info)
if (!info.to.isEmpty()) {
const QStringList lst = KEmailAddress::splitAddressList(info.to);
for (const QString &addr : lst) {
mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::To);
if (!mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::To)) {
qCWarning(KMAIL_LOG) << "Impossible to add to entry";
}
}
}
}
......@@ -565,7 +567,9 @@ void KMComposerWin::insertSnippetInfo(const MailCommon::SnippetInfo &info)
if (!info.cc.isEmpty()) {
const QStringList lst = KEmailAddress::splitAddressList(info.cc);
for (const QString &addr : lst) {
mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::Cc);
if (!mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::Cc)) {
qCWarning(KMAIL_LOG) << "Impossible to add cc entry";
}
}
}
}
......@@ -573,7 +577,9 @@ void KMComposerWin::insertSnippetInfo(const MailCommon::SnippetInfo &info)
if (!info.bcc.isEmpty()) {
const QStringList lst = KEmailAddress::splitAddressList(info.bcc);
for (const QString &addr : lst) {
mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::Bcc);
if (!mComposerBase->recipientsEditor()->addRecipient(addr, MessageComposer::Recipient::Bcc)) {
qCWarning(KMAIL_LOG) << "Impossible to add bcc entry";
}
}
}
}
......
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