Commit 9d50f6b6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix enabled/disable status widget

parent 8c4b47d1
Pipeline #50572 passed with stage
in 24 minutes and 55 seconds
......@@ -70,7 +70,7 @@ option(KDEPIM_RUN_AKONADI_TEST "Enable autotest based on Akonadi." TRUE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widgets WebEngine WebEngineWidgets)
set(LIBGRAVATAR_VERSION "5.16.40")
set(MAILCOMMON_LIB_VERSION "5.16.40")
set(MESSAGELIB_LIB_VERSION "5.16.45")
set(MESSAGELIB_LIB_VERSION "5.16.46")
set(LIBKLEO_LIB_VERSION "5.16.40")
set(PIMCOMMON_LIB_VERSION "5.16.41")
set(LIBKDEPIM_LIB_VERSION "5.16.40")
......
......@@ -313,8 +313,8 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
connect(recipientsEditor, &MessageComposer::RecipientsEditor::completionModeChanged, this, &KMComposerWin::slotCompletionModeChanged);
connect(recipientsEditor, &MessageComposer::RecipientsEditor::sizeHintChanged, this, &KMComposerWin::recipientEditorSizeHintChanged);
connect(recipientsEditor, &MessageComposer::RecipientsEditor::lineAdded, this, &KMComposerWin::slotRecipientEditorLineAdded);
connect(recipientsEditor, &MessageComposer::RecipientsEditor::focusInRecipientLineEdit, this, &KMComposerWin::slotRecipientEditorLineFocused);
mComposerBase->setRecipientsEditor(recipientsEditor);
recipientsEditor->installEventFilter(this);
mEdtSubject = new PimCommon::LineEditWithAutoCorrection(mHeadersArea, QStringLiteral("kmail2rc"));
mEdtSubject->installEventFilter(this);
......@@ -520,24 +520,20 @@ KMComposerWin::~KMComposerWin()
delete mComposerBase;
}
void KMComposerWin::slotRecipientEditorLineFocused()
{
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::EmailFields);
}
bool KMComposerWin::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::FocusIn) {
if (obj == mEdtSubject) {
// qDebug() << " subject";
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::SubjectField);
} else if (obj == mComposerBase->recipientsEditor()) {
// qDebug() << " recipient";
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::EmailFields);
} else if (obj == mRichTextEditorwidget->editor()) {
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::Composer);
// qDebug() << " EDITOR";
} else if (obj == mEdtFrom) {
mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::EmailFields);
// mPluginEditorManagerInterface->setStatusBarWidgetEnabled(MessageComposer::PluginEditorInterface::ApplyOnFieldType::Fr);
// qDebug() << " From";
} else {
qDebug() << " sssssssssss";
}
}
return KMail::Composer::eventFilter(obj, event);
......
......@@ -566,6 +566,7 @@ private:
void slotEditorPluginInsertText(const QString &str);
void insertSnippetInfo(const MailCommon::SnippetInfo &info);
Q_REQUIRED_RESULT bool sendLaterRegistered() const;
void slotRecipientEditorLineFocused();
Akonadi::Collection mCollectionForNewMessage;
QMap<QByteArray, QString> mExtraHeaders;
......
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