Commit c775f765 authored by Alexander Potashev's avatar Alexander Potashev
Browse files

Fix typo in methods name "tooManyArgument"

Test Plan: it compiles

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: kde-pim, cgiboudeaux

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D26003
parent 06d58aeb
......@@ -134,7 +134,7 @@ void SieveAction::unknownTagValue(const QString &tagValue, QString &error)
error += i18n("An unknown tag value \"%1\" was found during parsing action \"%2\".", tagValue, name()) + QLatin1Char('\n');
}
void SieveAction::tooManyArgument(const QStringRef &tagName, int index, int maxValue, QString &error)
void SieveAction::tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error)
{
error += i18n("Too many argument found for \"%1\", max value is %2, number of value found %3 for %4", name(), maxValue, index, *tagName.string()) + QLatin1Char('\n');
}
......
......@@ -56,7 +56,7 @@ public:
void unknownTag(const QStringRef &tag, QString &error);
void unknownTagValue(const QString &tagValue, QString &error);
void tooManyArgument(const QStringRef &tagName, int index, int maxValue, QString &error);
void tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error);
void serverDoesNotSupportFeatures(const QString &feature, QString &error);
protected:
......
......@@ -83,7 +83,7 @@ bool SieveActionAddHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
QLineEdit *value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
value->setText(AutoCreateScriptUtil::quoteStr(element.readElementText()));
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveActionAddHeader::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -81,7 +81,7 @@ bool SieveActionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidget
SelectMimeTypeComboBox *toMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("to"));
toMimeType->setCode(element.readElementText(), name(), error);
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveActionConvert::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -92,7 +92,7 @@ bool SieveActionDeleteHeader::parseValue(QXmlStreamReader &element, QWidget *w,
QLineEdit *value = w->findChild<QLineEdit *>(QStringLiteral("valueedit"));
value->setText(element.readElementText());
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveActionAddHeader::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -108,14 +108,14 @@ void SieveCondition::unknownTagValue(const QString &tagValue, QString &error)
error += i18n("An unknown tag value \"%1\" was found during parsing condition \"%2\".", tagValue, name()) + QLatin1Char('\n');
}
void SieveCondition::tooManyArgument(const QString &tagName, int index, int maxValue, QString &error)
void SieveCondition::tooManyArguments(const QString &tagName, int index, int maxValue, QString &error)
{
error += i18n("Too many argument found for \"%1\", max value is %2, number of value found %3 for %4", name(), maxValue, (index + 1), tagName) + QLatin1Char('\n');
}
void SieveCondition::tooManyArgument(const QStringRef &tagName, int index, int maxValue, QString &error)
void SieveCondition::tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error)
{
tooManyArgument(tagName.toString(), index, maxValue, error);
tooManyArguments(tagName.toString(), index, maxValue, error);
}
void SieveCondition::serverDoesNotSupportFeatures(const QString &feature, QString &error)
......
......@@ -57,8 +57,8 @@ public:
void unknownTag(const QStringRef &tag, QString &error);
void unknownTagValue(const QString &tagValue, QString &error);
void tooManyArgument(const QStringRef &tagName, int index, int maxValue, QString &error);
void tooManyArgument(const QString &tagName, int index, int maxValue, QString &error);
void tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error);
void tooManyArguments(const QString &tagName, int index, int maxValue, QString &error);
void serverDoesNotSupportFeatures(const QString &feature, QString &error);
QString comment() const;
......
......@@ -126,7 +126,7 @@ bool SieveConditionAddress::setParamWidgetValue(QXmlStreamReader &element, QWidg
AbstractRegexpEditorLineEdit *edit = w->findChild<AbstractRegexpEditorLineEdit *>(QStringLiteral("editaddress"));
edit->setCode(AutoCreateScriptUtil::quoteStr(element.readElementText()));
} else {
tooManyArgument(tagName, indexStr, 2, error);
tooManyArguments(tagName, indexStr, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionAddress::setParamWidgetValue too many argument :" << index;
}
++indexStr;
......@@ -138,7 +138,7 @@ bool SieveConditionAddress::setParamWidgetValue(QXmlStreamReader &element, QWidg
AbstractRegexpEditorLineEdit *edit = w->findChild<AbstractRegexpEditorLineEdit *>(QStringLiteral("editaddress"));
edit->setCode(AutoCreateScriptUtil::listValueToStr(element));
} else {
tooManyArgument(tagName, indexStr, 2, error);
tooManyArguments(tagName, indexStr, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionAddress::setParamWidgetValue too many argument :" << index;
}
++indexStr;
......@@ -176,7 +176,7 @@ bool SieveConditionAddress::setParamWidgetValue(QXmlStreamReader &element, QWidg
selectAddressPart->setCode(AutoCreateScriptUtil::tagValue(lstTagValue.at(1)), name(), error);
}
} else if (lstTagValue.count() > 2) {
tooManyArgument(QStringLiteral("tag"), lstTagValue.count(), 2, error);
tooManyArguments(QStringLiteral("tag"), lstTagValue.count(), 2, error);
qCDebug(LIBKSIEVE_LOG) << "SieveConditionAddress::setParamWidgetValue too many argument :" << lstTagValue.count();
}
......
......@@ -116,7 +116,7 @@ bool SieveConditionBody::setParamWidgetValue(QXmlStreamReader &element, QWidget
} else if (index == 1) {
tagValueList << AutoCreateScriptUtil::tagValueWithCondition(tagValue, notCondition);
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionBody::setParamWidgetValue too many argument " << index;
}
++index;
......
......@@ -120,7 +120,7 @@ bool SieveConditionConvert::setParamWidgetValue(QXmlStreamReader &element, QWidg
SelectMimeTypeComboBox *toMimeType = w->findChild<SelectMimeTypeComboBox *>(QStringLiteral("to"));
toMimeType->setCode(element.readElementText(), name(), error);
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveActionConvert::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -104,7 +104,7 @@ bool SieveConditionCurrentDate::setParamWidgetValue(QXmlStreamReader &element, Q
} else if (index == 1) {
value = element.readElementText();
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionCurrentDate::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -121,7 +121,7 @@ bool SieveConditionDate::setParamWidgetValue(QXmlStreamReader &element, QWidget
} else if (index == 2) {
value = element.readElementText();
} else {
tooManyArgument(tagName, index, 3, error);
tooManyArguments(tagName, index, 3, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionDate::setParamWidgetValue too many argument :" << index;
}
++index;
......
......@@ -141,7 +141,7 @@ bool SieveConditionEnvelope::setParamWidgetValue(QXmlStreamReader &element, QWid
SelectMatchTypeComboBox *selectMatchCombobox = w->findChild<SelectMatchTypeComboBox *>(QStringLiteral("matchtypecombobox"));
selectMatchCombobox->setCode(AutoCreateScriptUtil::tagValueWithCondition(tagValue, notCondition), name(), error);
} else {
tooManyArgument(tagName, indexTag, 2, error);
tooManyArguments(tagName, indexTag, 2, error);
qCDebug(LIBKSIEVE_LOG) << "SieveConditionEnvelope::setParamWidgetValue too many argument :" << indexTag;
}
++indexTag;
......@@ -153,7 +153,7 @@ bool SieveConditionEnvelope::setParamWidgetValue(QXmlStreamReader &element, QWid
AbstractRegexpEditorLineEdit *edit = w->findChild<AbstractRegexpEditorLineEdit *>(QStringLiteral("editaddress"));
edit->setCode(AutoCreateScriptUtil::quoteStr(element.readElementText()));
} else {
tooManyArgument(tagName, indexStr, 2, error);
tooManyArguments(tagName, indexStr, 2, error);
qCDebug(LIBKSIEVE_LOG) << "SieveConditionEnvelope::setParamWidgetValue too many argument indexStr " << indexStr;
}
++indexStr;
......
......@@ -119,7 +119,7 @@ bool SieveConditionEnvironment::setParamWidgetValue(QXmlStreamReader &element, Q
QLineEdit *value = w->findChild<QLineEdit *>(QStringLiteral("value"));
value->setText(AutoCreateScriptUtil::quoteStr(element.readElementText()));
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionEnvironment::setParamWidgetValue to many argument " << index;
}
++index;
......
......@@ -113,7 +113,7 @@ bool SieveConditionHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
QString st = AutoCreateScriptUtil::quoteStr(element.readElementText(), true);
value->setCode(st);
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionHeader::setParamWidgetValue too many argument " << index;
}
++index;
......@@ -126,7 +126,7 @@ bool SieveConditionHeader::setParamWidgetValue(QXmlStreamReader &element, QWidge
AbstractRegexpEditorLineEdit *value = w->findChild<AbstractRegexpEditorLineEdit *>(QStringLiteral("value"));
value->setCode(AutoCreateScriptUtil::listValueToStr(element));
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionHeader::setParamWidgetValue too many argument " << index;
}
++index;
......
......@@ -156,7 +156,7 @@ bool SieveConditionMetaData::setParamWidgetValue(QXmlStreamReader &element, QWid
break;
}
default:
tooManyArgument(tagName, index, 3, error);
tooManyArguments(tagName, index, 3, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionMetaData::setParamWidgetValue too many argument " << index;
break;
}
......
......@@ -105,7 +105,7 @@ bool SieveConditionMetaDataExists::setParamWidgetValue(QXmlStreamReader &element
QLineEdit *value = w->findChild<QLineEdit *>(QStringLiteral("value"));
value->setText(AutoCreateScriptUtil::quoteStr(tagValue));
} else {
tooManyArgument(tagName, index, 2, error);
tooManyArguments(tagName, index, 2, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionServerMetaDataExists::setParamWidgetValue to many attribute " << index;
}
++index;
......
......@@ -155,7 +155,7 @@ bool SieveConditionServerMetaData::setParamWidgetValue(QXmlStreamReader &element
break;
}
default:
tooManyArgument(tagName, index, 3, error);
tooManyArguments(tagName, index, 3, error);
qCDebug(LIBKSIEVE_LOG) << " SieveConditionServerMetaData::setParamWidgetValue too many argument " << index;
break;
}
......
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