mirror of
https://github.com/tnodir/fort
synced 2024-11-14 22:05:12 +00:00
UI: FirewallConf::loadGroupPeriodBits: Process only enabled groups
This commit is contained in:
parent
bc72af5a82
commit
9a7b82dbbb
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user