mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:25:20 +00:00
UI: StatisticsPage: "Keep" changes should be confirmed.
This commit is contained in:
parent
2ef05e9c15
commit
746d1eca3a
@ -182,17 +182,18 @@ void FirewallConf::copyFlags(const FirewallConf &o)
|
||||
setAppAllowAll(o.appAllowAll());
|
||||
setAppGroupBits(o.appGroupBits());
|
||||
|
||||
copyImmediateKeys(o);
|
||||
setTrafHourKeepDays(o.trafHourKeepDays());
|
||||
setTrafDayKeepDays(o.trafDayKeepDays());
|
||||
setTrafMonthKeepMonths(o.trafMonthKeepMonths());
|
||||
|
||||
copyImmediateFlags(o);
|
||||
}
|
||||
|
||||
void FirewallConf::copyImmediateKeys(const FirewallConf &o)
|
||||
void FirewallConf::copyImmediateFlags(const FirewallConf &o)
|
||||
{
|
||||
setResolveAddress(o.resolveAddress());
|
||||
setLogBlocked(o.logBlocked());
|
||||
setLogStat(o.logStat());
|
||||
setTrafHourKeepDays(o.trafHourKeepDays());
|
||||
setTrafDayKeepDays(o.trafDayKeepDays());
|
||||
setTrafMonthKeepMonths(o.trafMonthKeepMonths());
|
||||
setTrafUnit(o.trafUnit());
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
QQmlListProperty<AppGroup> appGroups();
|
||||
|
||||
void copyFlags(const FirewallConf &o);
|
||||
void copyImmediateKeys(const FirewallConf &o);
|
||||
void copyImmediateFlags(const FirewallConf &o);
|
||||
|
||||
QVariant toVariant() const;
|
||||
void fromVariant(const QVariant &v);
|
||||
|
@ -245,11 +245,11 @@ bool FortManager::applyConf(bool onlyFlags)
|
||||
return saveSettings(newConf, onlyFlags);
|
||||
}
|
||||
|
||||
bool FortManager::applyConfImmediateKeys()
|
||||
bool FortManager::applyConfImmediateFlags()
|
||||
{
|
||||
Q_ASSERT(m_firewallConfToEdit != nullConf());
|
||||
|
||||
m_firewallConf->copyImmediateKeys(*m_firewallConfToEdit);
|
||||
m_firewallConf->copyImmediateFlags(*m_firewallConfToEdit);
|
||||
|
||||
return saveSettings(m_firewallConf, true, true);
|
||||
}
|
||||
@ -276,7 +276,7 @@ bool FortManager::loadSettings(FirewallConf *conf)
|
||||
}
|
||||
|
||||
bool FortManager::saveSettings(FirewallConf *newConf, bool onlyFlags,
|
||||
bool immediateKeys)
|
||||
bool immediateFlags)
|
||||
{
|
||||
if (!(onlyFlags ? m_fortSettings->writeConfIni(*newConf)
|
||||
: m_fortSettings->writeConf(*newConf))) {
|
||||
@ -289,7 +289,7 @@ bool FortManager::saveSettings(FirewallConf *newConf, bool onlyFlags,
|
||||
m_firewallConf = newConf;
|
||||
}
|
||||
|
||||
if (!immediateKeys) {
|
||||
if (!immediateFlags) {
|
||||
updateTrayMenu();
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ public slots:
|
||||
bool saveOriginConf(const QString &message);
|
||||
bool saveConf(bool onlyFlags = false);
|
||||
bool applyConf(bool onlyFlags = false);
|
||||
bool applyConfImmediateKeys();
|
||||
bool applyConfImmediateFlags();
|
||||
|
||||
void setLanguage(int language);
|
||||
|
||||
@ -78,7 +78,7 @@ private:
|
||||
|
||||
bool loadSettings(FirewallConf *conf);
|
||||
bool saveSettings(FirewallConf *newConf, bool onlyFlags = false,
|
||||
bool immediateKeys = false);
|
||||
bool immediateFlags = false);
|
||||
|
||||
bool updateDriverConf(FirewallConf *conf);
|
||||
bool updateDriverConfFlags(FirewallConf *conf);
|
||||
|
@ -58,7 +58,7 @@ BasePage {
|
||||
|
||||
firewallConf.resolveAddress = checked;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
fortManager.applyConfImmediateFlags();
|
||||
|
||||
hostInfoCache.cacheChanged(); // refresh ipListView
|
||||
}
|
||||
@ -79,7 +79,7 @@ BasePage {
|
||||
|
||||
firewallConf.logBlocked = checked;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
fortManager.applyConfImmediateFlags();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ BasePage {
|
||||
onActivated: {
|
||||
firewallConf.trafUnit = index;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
fortManager.applyConfImmediateFlags();
|
||||
|
||||
trafListModel.refresh();
|
||||
}
|
||||
@ -129,7 +129,7 @@ BasePage {
|
||||
|
||||
firewallConf.logStat = checked;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
fortManager.applyConfImmediateFlags();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ ButtonPopup {
|
||||
|
||||
firewallConf.trafHourKeepDays = value;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
setConfFlagsEdited();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ ButtonPopup {
|
||||
|
||||
firewallConf.trafDayKeepDays = value;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
setConfFlagsEdited();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ ButtonPopup {
|
||||
|
||||
firewallConf.trafMonthKeepMonths = value;
|
||||
|
||||
fortManager.applyConfImmediateKeys();
|
||||
setConfFlagsEdited();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user