mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:25:20 +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; }
|
||||
void setAllowText(const QString &allowText);
|
||||
|
||||
bool hasAnyText() const
|
||||
{
|
||||
return !killText().isEmpty() || !blockText().isEmpty() || !allowText().isEmpty();
|
||||
}
|
||||
|
||||
QString periodFrom() const { return m_periodFrom; }
|
||||
void setPeriodFrom(const QString &periodFrom);
|
||||
|
||||
|
@ -197,8 +197,7 @@ AppGroup *FirewallConf::appGroupByName(const QString &name) const
|
||||
bool FirewallConf::checkDeprecatedAppGroups() const
|
||||
{
|
||||
for (AppGroup *appGroup : appGroups()) {
|
||||
if (!appGroup->killText().isEmpty() || !appGroup->blockText().isEmpty()
|
||||
|| !appGroup->allowText().isEmpty())
|
||||
if (appGroup->hasAnyText())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user