mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:15:07 +00:00
UI: Programs: Fix handling app's auto-block time
This commit is contained in:
parent
6aa8e84ff7
commit
411ed52e82
@ -661,7 +661,7 @@ void ConfManager::logBlockedApp(const LogEntryBlocked &logEntry)
|
|||||||
const QString appName = IoC<AppInfoCache>()->appName(appPath);
|
const QString appName = IoC<AppInfoCache>()->appName(appPath);
|
||||||
constexpr int groupIndex = 0; // "Main" app. group
|
constexpr int groupIndex = 0; // "Main" app. group
|
||||||
|
|
||||||
const bool ok = addOrUpdateApp(appPath, appName, QDateTime(), groupIndex,
|
const bool ok = addOrUpdateApp(appPath, appName, /*endTime=*/ {}, groupIndex,
|
||||||
/*useGroupPerm=*/false, /*applyChild=*/false, logEntry.blocked(), /*alerted=*/true);
|
/*useGroupPerm=*/false, /*applyChild=*/false, logEntry.blocked(), /*alerted=*/true);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
emitAppAlerted();
|
emitAppAlerted();
|
||||||
@ -853,13 +853,13 @@ void ConfManager::updateAppEndTimes()
|
|||||||
|
|
||||||
while (stmt.step() == SqliteStmt::StepRow) {
|
while (stmt.step() == SqliteStmt::StepRow) {
|
||||||
const qint64 appId = stmt.columnInt64(0);
|
const qint64 appId = stmt.columnInt64(0);
|
||||||
const int groupIndex = stmt.columnInt(2);
|
const int groupIndex = stmt.columnInt(1);
|
||||||
const QString appPath = stmt.columnText(3);
|
const QString appPath = stmt.columnText(2);
|
||||||
const QString appName = stmt.columnText(4);
|
const QString appName = stmt.columnText(3);
|
||||||
const bool useGroupPerm = stmt.columnBool(5);
|
const bool useGroupPerm = stmt.columnBool(4);
|
||||||
const bool applyChild = stmt.columnBool(6);
|
const bool applyChild = stmt.columnBool(5);
|
||||||
|
|
||||||
updateApp(appId, appPath, appName, QDateTime(), groupIndex, useGroupPerm, applyChild,
|
updateApp(appId, appPath, appName, /*endTime=*/ {}, groupIndex, useGroupPerm, applyChild,
|
||||||
/*blocked=*/true);
|
/*blocked=*/true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user