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

We need to add composer type for mailmerge support. We need to be able

to use variable in composer.
parent 645f7327
Pipeline #51833 passed with stage
in 25 minutes and 50 seconds
......@@ -526,6 +526,16 @@ void KMComposerWin::slotRecipientEditorLineFocused()
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::EmailFields);
}
KMComposerWin::ModeType KMComposerWin::modeType() const
{
return mModeType;
}
void KMComposerWin::setModeType(const ModeType &modeType)
{
mModeType = modeType;
}
bool KMComposerWin::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::FocusIn) {
......
......@@ -127,6 +127,9 @@ private: // mailserviceimpl, kmkernel, kmcommands, callback, kmmainwidget
~KMComposerWin() override;
public:
enum ModeType { ComposerType = 0, TemplateType };
Q_ENUMS(ModeType)
static Composer *create(const KMime::Message::Ptr &msg,
bool lastSignState,
bool lastEncryptState,
......@@ -431,6 +434,9 @@ public: // kmcommand
QList<KToggleAction *> customToolsList() const;
QList<QAction *> pluginToolsActionListForPopupMenu() const;
Q_REQUIRED_RESULT ModeType modeType() const;
void setModeType(const ModeType &modeType);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
......@@ -683,6 +689,8 @@ private:
KMailPluginGrammarEditorManagerInterface *mPluginEditorGrammarManagerInterface = nullptr;
AttachmentAddedFromExternalWarning *mAttachmentFromExternalMissing = nullptr;
ModeType mModeType = ModeType::ComposerType;
};
#endif
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