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

Forward "KSieveUi::ManageSieveWidget::ScriptInfo"

parent 87489dc2
......@@ -135,7 +135,7 @@ void SieveEditorMainWidget::slotCreateScriptPage(const KSieveUi::ManageSieveWidg
connect(editor, &SieveEditorPageWidget::copyAvailable, this, &SieveEditorMainWidget::copyAvailable);
connect(editor, &SieveEditorPageWidget::sieveEditorTabCurrentChanged, this, &SieveEditorMainWidget::sieveEditorTabCurrentChanged);
editor->setIsNewScript(isNewScript);
editor->loadScript(info.currentUrl, info.currentCapabilities, info.sieveImapAccountSettings);
editor->loadScript(info);
mTabWidget->addTab(editor, info.currentUrl.fileName());
mTabWidget->setCurrentWidget(editor);
if (isNewScript) {
......
......@@ -84,14 +84,14 @@ void SieveEditorPageWidget::setIsNewScript(bool isNewScript)
mIsNewScript = isNewScript;
}
void SieveEditorPageWidget::loadScript(const QUrl &url, const QStringList &capabilities, const KSieveUi::SieveImapAccountSettings &sieveImapAccountSettings)
void SieveEditorPageWidget::loadScript(const KSieveUi::ManageSieveWidget::ScriptInfo &info)
{
mCurrentURL = url;
mSieveEditorWidget->setSieveCapabilities(capabilities);
mSieveEditorWidget->setSieveImapAccountSettings(sieveImapAccountSettings);
mCurrentURL = info.currentUrl;
mSieveEditorWidget->setSieveCapabilities(info.currentCapabilities);
mSieveEditorWidget->setSieveImapAccountSettings(info.sieveImapAccountSettings);
mSieveEditorWidget->setReadOnly(true);
mSieveEditorWidget->wordWrap(SieveEditorGlobalConfig::self()->wrapText());
KManageSieve::SieveJob *job = KManageSieve::SieveJob::get(url);
KManageSieve::SieveJob *job = KManageSieve::SieveJob::get(mCurrentURL);
connect(job, &KManageSieve::SieveJob::result, this, &SieveEditorPageWidget::slotGetResult);
}
......
......@@ -22,6 +22,7 @@
#include <QWidget>
#include <QUrl>
#include "ksieveui/sieveeditorwidget.h"
#include <KSieveUi/ManageSieveWidget>
namespace KManageSieve {
class SieveJob;
}
......@@ -36,7 +37,7 @@ public:
explicit SieveEditorPageWidget(QWidget *parent = nullptr);
~SieveEditorPageWidget();
void loadScript(const QUrl &url, const QStringList &capabilities, const KSieveUi::SieveImapAccountSettings &sieveImapAccountSettings);
void loadScript(const KSieveUi::ManageSieveWidget::ScriptInfo &info);
QUrl currentUrl() const;
void setCurrentUrl(const QUrl &url);
void setIsNewScript(bool isNewScript);
......
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