diff --git a/src/ui/conf/appgroup.h b/src/ui/conf/appgroup.h index 1c7abd25..40de2c2b 100644 --- a/src/ui/conf/appgroup.h +++ b/src/ui/conf/appgroup.h @@ -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); diff --git a/src/ui/conf/firewallconf.cpp b/src/ui/conf/firewallconf.cpp index 6173b5bb..fb93f867 100644 --- a/src/ui/conf/firewallconf.cpp +++ b/src/ui/conf/firewallconf.cpp @@ -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;