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 cf4a28e5 authored by Laurent Montel's avatar Laurent Montel 😁

Assign listOfInclude

parent b7b41c89
......@@ -23,6 +23,7 @@
#include "sieveforeverypartwidget.h"
#include "sievescriptpage.h"
#include "sieveincludewidget.h"
#include "sieveeditorgraphicalmodewidget.h"
#include <QHBoxLayout>
#include <KMessageBox>
......@@ -235,6 +236,7 @@ SieveScriptPage *SieveScriptListBox::createNewScript(const QString &newName, con
SieveScriptListItem *item = new SieveScriptListItem(newName, mSieveListScript);
item->setDescription(description);
SieveScriptPage *page = new SieveScriptPage(mSieveGraphicalModeWidget);
page->setListOfIncludeFile(mSieveGraphicalModeWidget->listOfIncludeFile());
item->setScriptPage(page);
Q_EMIT addNewPage(page);
Q_EMIT enableButtonOk(true);
......
......@@ -23,6 +23,7 @@
#include <QGroupBox>
#include <QListWidgetItem>
#include "ksieveui_private_export.h"
class QListWidget;
class QPushButton;
class QXmlStreamReader;
......
......@@ -161,6 +161,11 @@ void SieveEditor::setSieveCapabilities(const QStringList &capabilities)
d->mSieveEditorWidget->setSieveCapabilities(capabilities);
}
void SieveEditor::setListOfIncludeFile(const QStringList &listOfIncludeFile)
{
d->mSieveEditorWidget->setListOfIncludeFile(listOfIncludeFile);
}
void SieveEditor::addFailedMessage(const QString &err)
{
d->mSieveEditorWidget->addFailedMessage(err);
......
......@@ -46,6 +46,7 @@ public:
void setSieveCapabilities(const QStringList &capabilities);
void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account);
void setListOfIncludeFile(const QStringList &listOfIncludeFile);
private Q_SLOTS:
void slotEnableButtonOk(bool b);
void slotAccepted();
......
......@@ -65,6 +65,7 @@ public:
QUrl mCurrentURL;
QStringList mCurrentCapabilities;
QStringList mListOfIncludeFile;
KSieveUi::SieveImapAccountSettings mSieveImapAccountSettings;
QPushButton *mNewScript;
......@@ -168,6 +169,7 @@ void ManageSieveScriptsDialog::slotEditScript(const ManageSieveWidget::ScriptInf
{
d->mCurrentURL = info.currentUrl;
d->mCurrentCapabilities = info.currentCapabilities;
d->mListOfIncludeFile = info.scriptList;
d->mIsNewScript = false;
d->mSieveImapAccountSettings = info.sieveImapAccountSettings;
KManageSieve::SieveJob *job = KManageSieve::SieveJob::get(info.currentUrl);
......@@ -179,6 +181,7 @@ void ManageSieveScriptsDialog::slotNewScript(const ManageSieveWidget::ScriptInfo
d->mCurrentCapabilities = info.currentCapabilities;
d->mSieveImapAccountSettings = info.sieveImapAccountSettings;
d->mCurrentURL = info.currentUrl;
d->mListOfIncludeFile = info.scriptList;
d->mIsNewScript = true;
slotGetResult(nullptr, true, QString(), false);
}
......@@ -201,6 +204,7 @@ void ManageSieveScriptsDialog::slotGetResult(KManageSieve::SieveJob *job, bool s
d->mSieveEditor->setSieveCapabilities(d->mCurrentCapabilities);
d->mSieveEditor->setScript(script, true); /*clear undo/redo*/
d->mSieveEditor->setSieveImapAccountSettings(d->mSieveImapAccountSettings);
d->mSieveEditor->setListOfIncludeFile(d->mListOfIncludeFile);
connect(d->mSieveEditor, &SieveEditor::okClicked, this, &ManageSieveScriptsDialog::slotSieveEditorOkClicked);
connect(d->mSieveEditor, &SieveEditor::cancelClicked, this, &ManageSieveScriptsDialog::slotSieveEditorCancelClicked);
......
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