Commit 9fddd2c7 authored by Laurent Montel's avatar Laurent Montel 😁

Don't add empty requires

parent a689157e
......@@ -95,7 +95,7 @@ QString SieveConditionAddress::code(QWidget *w) const
QStringList SieveConditionAddress::needRequires(QWidget *w) const
{
const SelectAddressPartComboBox *selectAddressPart = w->findChild<SelectAddressPartComboBox *>(QStringLiteral("addresspartcombobox"));
return QStringList() << selectAddressPart->extraRequire();
return selectAddressPart->extraRequire();
}
QString SieveConditionAddress::help() const
......
......@@ -52,12 +52,13 @@ QString SelectAddressPartComboBox::code() const
return itemData(currentIndex()).toString();
}
QString SelectAddressPartComboBox::extraRequire() const
QStringList SelectAddressPartComboBox::extraRequire() const
{
QStringList lst;
if (mHasSubaddressCapability) {
return QStringLiteral("subaddress");
lst = QStringList() << QStringLiteral("subaddress");
}
return QString();
return lst;
}
void SelectAddressPartComboBox::setCode(const QString &code, const QString &name, QString &error)
......
......@@ -33,7 +33,7 @@ public:
QString code() const;
void setCode(const QString &code, const QString &name, QString &error);
QString extraRequire() const;
QStringList extraRequire() const;
Q_SIGNALS:
void valueChanged();
......
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