Commit 831d56d4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove duplicate code

parent e4d2856d
......@@ -40,6 +40,11 @@ SieveCommonActionCondition::~SieveCommonActionCondition()
{
}
QWidget *SieveCommonActionCondition::createParamWidget(QWidget *parent) const
{
return new QWidget(parent);
}
KSieveUi::SieveImapAccountSettings SieveCommonActionCondition::sieveImapAccountSettings() const
{
if (mSieveGraphicalModeWidget) {
......
......@@ -57,6 +57,7 @@ public:
Q_REQUIRED_RESULT QString generateComment() const;
virtual QWidget *createParamWidget(QWidget *parent) const;
protected:
Q_REQUIRED_RESULT KSieveUi::SieveImapAccountSettings sieveImapAccountSettings() const;
Q_REQUIRED_RESULT QStringList sieveCapabilities() const;
......
......@@ -46,20 +46,6 @@ QStringList SieveAction::listOfIncludeFile() const
return {};
}
QStringList SieveAction::sieveCapabilities() const
{
if (mSieveGraphicalModeWidget) {
return mSieveGraphicalModeWidget->sieveCapabilities();
}
qCWarning(LIBKSIEVE_LOG) << "SieveAction::sieveCapabilities Problem during initialize mSieveGraphicalModeWidget ";
return {};
}
QWidget *SieveAction::createParamWidget(QWidget *parent) const
{
return new QWidget(parent);
}
bool SieveAction::setParamWidgetValue(QXmlStreamReader &n, QWidget *, QString &)
{
n.skipCurrentElement();
......
......@@ -34,8 +34,6 @@ public:
~SieveAction() override;
Q_REQUIRED_RESULT virtual QWidget *createParamWidget(QWidget *parent) const;
Q_REQUIRED_RESULT virtual bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error);
void unknownTag(const QStringRef &tag, QString &error) override;
......@@ -45,7 +43,6 @@ public:
protected:
Q_REQUIRED_RESULT QStringList listOfIncludeFile() const;
Q_REQUIRED_RESULT QStringList sieveCapabilities() const;
};
}
......
......@@ -36,11 +36,6 @@ SieveCondition::~SieveCondition()
{
}
QWidget *SieveCondition::createParamWidget(QWidget *parent) const
{
return new QWidget(parent);
}
bool SieveCondition::setParamWidgetValue(QXmlStreamReader & /*element*/, QWidget * /*parent*/, bool /*notCondition*/, QString & /*error*/)
{
return true;
......
......@@ -34,8 +34,6 @@ public:
SieveCondition(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, const QString &name, const QString &label, QObject *parent = nullptr);
~SieveCondition() override;
Q_REQUIRED_RESULT virtual QWidget *createParamWidget(QWidget *parent) const;
Q_REQUIRED_RESULT virtual bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, bool notCondition, QString &error);
void unknownTag(const QStringRef &tag, QString &error) override;
......@@ -43,7 +41,6 @@ public:
void tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error) override;
void tooManyArguments(const QString &tagName, int index, int maxValue, QString &error);
void serverDoesNotSupportFeatures(const QString &feature, QString &error) override;
};
}
......
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