diff --git a/src/ui/conf/appgroup.cpp b/src/ui/conf/appgroup.cpp index d1f123d9..8224fd52 100644 --- a/src/ui/conf/appgroup.cpp +++ b/src/ui/conf/appgroup.cpp @@ -167,7 +167,7 @@ void AppGroup::setPeriodTo(const QString &periodTo) bool AppGroup::isTimeInPeriod(QTime time) const { - if (m_periodFrom.isNull()) { + if (m_periodFromTime.isNull()) { m_periodFromTime = DateUtil::parseTime(m_periodFrom); m_periodToTime = DateUtil::parseTime(m_periodTo); } diff --git a/src/ui/conf/firewallconf.cpp b/src/ui/conf/firewallconf.cpp index 30f65f3b..956cbd9a 100644 --- a/src/ui/conf/firewallconf.cpp +++ b/src/ui/conf/firewallconf.cpp @@ -198,7 +198,7 @@ void FirewallConf::loadGroupPeriodBits() m_groupActivePeriodBits = quint32(-1); int groupIndex = 0; for (AppGroup *appGroup : appGroups()) { - if (appGroup->periodEnabled()) { + if (appGroup->enabled() && appGroup->periodEnabled()) { m_anyGroupPeriodEnabled = true; if (!appGroup->isTimeInPeriod(now)) { @@ -266,11 +266,9 @@ void FirewallConf::afterSaved() ini().clear(); } -bool FirewallConf::updateGroupPeriods(bool onlyFlags) +bool FirewallConf::updateGroupPeriods(bool /*onlyFlags*/) { - if (!onlyFlags) { - loadGroupPeriodBits(); - } + loadGroupPeriodBits(); return m_anyGroupPeriodEnabled; }