Commit 60f335f4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use TooManyRecipientsWarning

parent fd8b7576
Pipeline #88609 canceled with stage
......@@ -66,7 +66,7 @@ option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branc
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widgets WebEngine WebEngineWidgets)
set(LIBGRAVATAR_VERSION "5.18.40")
set(MAILCOMMON_LIB_VERSION "5.18.40")
set(MESSAGELIB_LIB_VERSION "5.18.44")
set(MESSAGELIB_LIB_VERSION "5.18.45")
set(LIBKLEO_LIB_VERSION "5.18.40")
set(PIMCOMMON_LIB_VERSION "5.18.40")
set(LIBKDEPIM_LIB_VERSION "5.18.40")
......
......@@ -25,6 +25,7 @@
#include "editor/potentialphishingemail/potentialphishingemailwarning.h"
#include "editor/warningwidgets/attachmentaddedfromexternalwarning.h"
#include "editor/warningwidgets/incorrectidentityfolderwarning.h"
#include "editor/warningwidgets/toomanyrecipientswarning.h"
#include "job/addressvalidationjob.h"
#include "job/createnewcontactjob.h"
#include "job/dndfromarkjob.h"
......@@ -237,6 +238,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
, mFolder(Akonadi::Collection(-1))
, mId(id)
, mContext(context)
, mTooMyRecipientWarning(new TooManyRecipientsWarning(this))
, mPluginEditorManagerInterface(new KMailPluginEditorManagerInterface(this))
, mPluginEditorGrammarManagerInterface(new KMailPluginGrammarEditorManagerInterface(this))
......@@ -376,6 +378,8 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
mAttachmentFromExternalMissing = new AttachmentAddedFromExternalWarning(this);
vbox->addWidget(mAttachmentFromExternalMissing);
mTooMyRecipientWarning = new TooManyRecipientsWarning(this);
vbox->addWidget(mTooMyRecipientWarning);
vbox->addWidget(mCryptoStateIndicatorWidget);
vbox->addWidget(mRichTextEditorwidget);
......@@ -512,6 +516,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
KConfigGroup grp(KMKernel::self()->config()->group("Composer"));
setAutoSaveSettings(grp, true);
connect(mComposerBase, &MessageComposer::ComposerViewBase::tooManyRecipient, mTooMyRecipientWarning, &TooManyRecipientsWarning::animatedShow);
}
KMComposerWin::~KMComposerWin()
......@@ -528,6 +533,15 @@ KMComposerWin::~KMComposerWin()
delete mComposerBase;
}
void KMComposerWin::slotTooManyRecipients(bool b)
{
if (b) {
mTooMyRecipientWarning->animatedShow();
} else {
mTooMyRecipientWarning->animatedHide();
}
}
void KMComposerWin::slotRecipientEditorLineFocused()
{
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::EmailFields);
......
......@@ -60,6 +60,7 @@ class KMailPluginEditorConvertTextManagerInterface;
class KMailPluginGrammarEditorManagerInterface;
class AttachmentAddedFromExternalWarning;
class KHamburgerMenu;
class TooManyRecipientsWarning;
namespace MailTransport
{
class Transport;
......@@ -583,6 +584,7 @@ private:
void slotRecipientEditorLineFocused();
void updateHamburgerMenu();
void addFaceHeaders(const KIdentityManagement::Identity &ident, const KMime::Message::Ptr &msg);
void slotTooManyRecipients(bool b);
Akonadi::Collection mCollectionForNewMessage;
QMap<QByteArray, QString> mExtraHeaders;
......@@ -676,6 +678,7 @@ private:
PimCommon::CustomToolsWidgetNg *mCustomToolsWidget = nullptr;
AttachmentMissingWarning *mAttachmentMissing = nullptr;
ExternalEditorWarning *mExternalEditorWarning = nullptr;
TooManyRecipientsWarning *mTooMyRecipientWarning = nullptr;
QTimer *mVerifyMissingAttachment = nullptr;
MailCommon::FolderRequester *mFccFolder = nullptr;
bool mPreventFccOverwrite = false;
......
Supports Markdown
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