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;
......
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