Commit 008f94b1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove unused return value

parent fdf0e6f8
......@@ -46,10 +46,9 @@ QStringList SieveAction::listOfIncludeFile() const
return {};
}
bool SieveAction::setParamWidgetValue(QXmlStreamReader &n, QWidget *, QString &)
void SieveAction::setParamWidgetValue(QXmlStreamReader &n, QWidget *, QString &)
{
n.skipCurrentElement();
return true;
}
void SieveAction::unknownTag(const QStringRef &tag, QString &error)
......
......@@ -32,7 +32,7 @@ public:
SieveAction(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, const QString &name, const QString &label, QObject *parent = nullptr);
~SieveAction() override;
Q_REQUIRED_RESULT virtual bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error);
virtual void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error);
void unknownTag(const QStringRef &tag, QString &error) override;
void unknownTagValue(const QString &tagValue, QString &error) override;
......
......@@ -44,7 +44,7 @@ QWidget *SieveActionAbstractFlags::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionAbstractFlags::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionAbstractFlags::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -65,7 +65,6 @@ bool SieveActionAbstractFlags::setParamWidgetValue(QXmlStreamReader &element, QW
qCDebug(LIBKSIEVE_LOG) << " SieveActionAbstractFlags::setParamWidgetValue unknown tag :" << tagName;
}
}
return true;
}
QString SieveActionAbstractFlags::code(QWidget *w) const
......
......@@ -28,7 +28,7 @@ public:
SieveActionAbstractFlags(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, const QString &name, const QString &label, QObject *parent = nullptr);
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
......
......@@ -67,7 +67,7 @@ QWidget *SieveActionAddHeader::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
int index = 0;
while (element.readNextStartElement()) {
......@@ -98,8 +98,6 @@ bool SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
qCDebug(LIBKSIEVE_LOG) << "SieveActionAddHeader::setParamWidgetValue unknown tag " << tagName;
}
}
return true;
}
QString SieveActionAddHeader::code(QWidget *w) const
......
......@@ -28,7 +28,7 @@ public:
explicit SieveActionAddHeader(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QObject *parent = nullptr);
Q_REQUIRED_RESULT QString code(QWidget *w) const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
};
......
......@@ -51,7 +51,7 @@ QWidget *SieveActionBreak::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -78,8 +78,6 @@ bool SieveActionBreak::setParamWidgetValue(QXmlStreamReader &element, QWidget *w
qCDebug(LIBKSIEVE_LOG) << "SieveActionBreak::setParamWidgetValue unknown tag " << tagName;
}
}
return true;
}
QUrl SieveActionBreak::href() const
......
......@@ -32,7 +32,7 @@ public:
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QUrl href() const override;
};
}
......
......@@ -68,7 +68,7 @@ QWidget *SieveActionConvert::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
int index = 0;
while (element.readNextStartElement()) {
......@@ -99,8 +99,6 @@ bool SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << "SieveActionConvert::setParamWidgetValue unknown tag " << tagName;
}
}
return true;
}
QString SieveActionConvert::code(QWidget *w) const
......
......@@ -32,7 +32,7 @@ public:
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
};
......
......@@ -67,7 +67,7 @@ QWidget *SieveActionDeleteHeader::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w, QString &error, bool isNegative)
void SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w, QString &error, bool isNegative)
{
int index = 0;
while (element.readNextStartElement()) {
......@@ -78,9 +78,9 @@ bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
nameValue = element.attributes().value(QLatin1String("name")).toString();
}
const bool isNegative = (nameValue == QLatin1String("not"));
bool result = parseValue(element, w, error, isNegative);
parseValue(element, w, error, isNegative);
element.skipCurrentElement();
return result;
return;
} else if (tagName == QLatin1String("tag")) {
SelectMatchTypeComboBox *combo = w->findChild<SelectMatchTypeComboBox *>(QStringLiteral("matchtype"));
combo->setCode(AutoCreateScriptUtil::tagValueWithCondition(element.readElementText(), isNegative), name(), error);
......@@ -107,13 +107,11 @@ bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
qCDebug(LIBKSIEVE_LOG) << "SieveActionAddHeader::setParamWidgetValue unknown tag " << tagName;
}
}
return true;
}
bool SieveActionDeleteHeader::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionDeleteHeader::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
return parseValue(element, w, error, false);
parseValue(element, w, error, false);
}
QString SieveActionDeleteHeader::code(QWidget *w) const
......
......@@ -28,12 +28,12 @@ public:
explicit SieveActionDeleteHeader(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QObject *parent = nullptr);
Q_REQUIRED_RESULT QString code(QWidget *w) const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
private:
Q_REQUIRED_RESULT bool parseValue(QXmlStreamReader &element, QWidget *w, QString &error, bool isNegative);
void parseValue(QXmlStreamReader &element, QWidget *w, QString &error, bool isNegative);
};
}
......
......@@ -69,7 +69,7 @@ QWidget *SieveActionEnclose::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -105,8 +105,6 @@ bool SieveActionEnclose::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionEnclose::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionEnclose::code(QWidget *w) const
......
......@@ -28,7 +28,7 @@ public:
explicit SieveActionEnclose(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QObject *parent = nullptr);
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
......
......@@ -50,7 +50,7 @@ QWidget *SieveActionEReject::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -69,8 +69,6 @@ bool SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionEReject::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionEReject::code(QWidget *w) const
......
......@@ -30,7 +30,7 @@ public:
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
......
......@@ -62,7 +62,7 @@ QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -87,8 +87,6 @@ bool SieveActionExtractText::setParamWidgetValue(QXmlStreamReader &element, QWid
qCDebug(LIBKSIEVE_LOG) << " SieveActionExtractText::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionExtractText::code(QWidget *w) const
......
......@@ -30,7 +30,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
......
......@@ -56,7 +56,7 @@ QString SieveActionFileInto::code(QWidget *w) const
return result + QStringLiteral("\"%1\";").arg(text);
}
bool SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -97,8 +97,6 @@ bool SieveActionFileInto::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionFileInto::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QWidget *SieveActionFileInto::createParamWidget(QWidget *parent) const
......
......@@ -29,7 +29,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT QString help() const override;
......
......@@ -77,7 +77,7 @@ QWidget *SieveActionKeep::createParamWidget(QWidget *parent) const
}
}
bool SieveActionKeep::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionKeep::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
if (mHasFlagSupport) {
while (element.readNextStartElement()) {
......@@ -105,8 +105,6 @@ bool SieveActionKeep::setParamWidgetValue(QXmlStreamReader &element, QWidget *w,
} else {
qCDebug(LIBKSIEVE_LOG) << " Server doesn't support imapflags";
}
return true;
}
QStringList SieveActionKeep::needRequires(QWidget *) const
......
......@@ -29,7 +29,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error) override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *) const override;
Q_REQUIRED_RESULT QUrl href() const override;
......
......@@ -67,7 +67,7 @@ QWidget *SieveActionNotify::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionNotify::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionNotify::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -103,8 +103,6 @@ bool SieveActionNotify::setParamWidgetValue(QXmlStreamReader &element, QWidget *
qCDebug(LIBKSIEVE_LOG) << " SieveActionNotify::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionNotify::code(QWidget *w) const
......
......@@ -31,7 +31,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *) const override;
Q_REQUIRED_RESULT QUrl href() const override;
......
......@@ -64,7 +64,7 @@ QWidget *SieveActionRedirect::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionRedirect::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionRedirect::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -103,8 +103,6 @@ bool SieveActionRedirect::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionRedirect::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionRedirect::code(QWidget *w) const
......
......@@ -30,7 +30,7 @@ public:
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
......
......@@ -50,7 +50,7 @@ QWidget *SieveActionReject::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -69,7 +69,6 @@ bool SieveActionReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *
qCDebug(LIBKSIEVE_LOG) << " SieveActionReject::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionReject::code(QWidget *w) const
......
......@@ -29,7 +29,7 @@ public:
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
......
......@@ -71,7 +71,7 @@ QWidget *SieveActionReplace::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionReplace::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionReplace::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -107,8 +107,6 @@ bool SieveActionReplace::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionReplace::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionReplace::code(QWidget *w) const
......
......@@ -29,7 +29,7 @@ public:
explicit SieveActionReplace(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QObject *parent = nullptr);
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
......
......@@ -89,7 +89,7 @@ void SieveActionSetVariable::setLocalVariable(QWidget *w, const SieveGlobalVaria
variable->setText(AutoCreateScriptUtil::protectSlash(var.variableName));
}
bool SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -104,7 +104,7 @@ bool SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWid
variable->setText(AutoCreateScriptUtil::protectSlash(element.readElementText()));
}
} else {
return false;
return;
}
} else if (tagName == QLatin1String("tag")) {
const QString tagValue = element.readElementText();
......@@ -130,8 +130,6 @@ bool SieveActionSetVariable::setParamWidgetValue(QXmlStreamReader &element, QWid
qCDebug(LIBKSIEVE_LOG) << " SieveActionSetVariable::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionSetVariable::code(QWidget *w) const
......
......@@ -30,7 +30,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override;
......
......@@ -94,7 +94,7 @@ QWidget *SieveActionVacation::createParamWidget(QWidget *parent) const
return w;
}
bool SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
void SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget *w, QString &error)
{
while (element.readNextStartElement()) {
const QStringRef tagName = element.name();
......@@ -143,8 +143,6 @@ bool SieveActionVacation::setParamWidgetValue(QXmlStreamReader &element, QWidget
qCDebug(LIBKSIEVE_LOG) << " SieveActionVacation::setParamWidgetValue unknown tagName " << tagName;
}
}
return true;
}
QString SieveActionVacation::code(QWidget *w) const
......
......@@ -31,7 +31,7 @@ public:
Q_REQUIRED_RESULT QString code(QWidget *) const override;
Q_REQUIRED_RESULT QString serverNeedsCapability() const override;
Q_REQUIRED_RESULT bool needCheckIfServerHasCapability() const override;
Q_REQUIRED_RESULT bool setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
void setParamWidgetValue(QXmlStreamReader &element, QWidget *parent, QString &error) override;
Q_REQUIRED_RESULT QStringList needRequires(QWidget *parent) const override;
Q_REQUIRED_RESULT QString help() const override;
Q_REQUIRED_RESULT QUrl href() const override;
......
......@@ -277,22 +277,20 @@ void SieveActionWidget::setLocaleVariable(const SieveGlobalVariableActionWidget:
}
}
bool SieveActionWidget::setAction(const QString &actionName, QXmlStreamReader &element, const QString &comment, QString &error)
void SieveActionWidget::setAction(const QString &actionName, QXmlStreamReader &element, const QString &comment, QString &error)
{
const int index = mComboBox->findData(actionName);
bool result = false;
if (index != -1) {
mComboBox->setCurrentIndex(index);
slotActionChanged(index);
KSieveUi::SieveAction *action = mActionList.at(index);
result = action->setParamWidgetValue(element, this, error);
action->setParamWidgetValue(element, this, error);
action->setComment(comment);
} else {
error += i18n("Script contains unsupported feature \"%1\"", actionName) + QLatin1Char('\n');
qCDebug(LIBKSIEVE_LOG) << "Action " << actionName << " not supported";
element.skipCurrentElement();
}
return result;
}
SieveActionWidgetLister::SieveActionWidgetLister(SieveEditorGraphicalModeWidget *graphicalModeWidget, QWidget *parent)
......
......@@ -41,7 +41,7 @@ public:
void updateAddRemoveButton(<