mirror of
https://github.com/tnodir/fort
synced 2024-11-15 12:40:54 +00:00
UI: FirewallConf: Simplify checkDeprecatedAppGroups()
This commit is contained in:
parent
744fcc68ea
commit
d91ebb6b96
@ -79,6 +79,11 @@ public:
|
|||||||
QString allowText() const { return m_allowText; }
|
QString allowText() const { return m_allowText; }
|
||||||
void setAllowText(const QString &allowText);
|
void setAllowText(const QString &allowText);
|
||||||
|
|
||||||
|
bool hasAnyText() const
|
||||||
|
{
|
||||||
|
return !killText().isEmpty() || !blockText().isEmpty() || !allowText().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
QString periodFrom() const { return m_periodFrom; }
|
QString periodFrom() const { return m_periodFrom; }
|
||||||
void setPeriodFrom(const QString &periodFrom);
|
void setPeriodFrom(const QString &periodFrom);
|
||||||
|
|
||||||
|
@ -197,8 +197,7 @@ AppGroup *FirewallConf::appGroupByName(const QString &name) const
|
|||||||
bool FirewallConf::checkDeprecatedAppGroups() const
|
bool FirewallConf::checkDeprecatedAppGroups() const
|
||||||
{
|
{
|
||||||
for (AppGroup *appGroup : appGroups()) {
|
for (AppGroup *appGroup : appGroups()) {
|
||||||
if (!appGroup->killText().isEmpty() || !appGroup->blockText().isEmpty()
|
if (appGroup->hasAnyText())
|
||||||
|| !appGroup->allowText().isEmpty())
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user