From a8d308d035d5a5f061697c1b425c23910ba9f1c6 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Thu, 11 Jan 2024 19:29:46 +0300 Subject: [PATCH] UI: Programs: Break on saving error --- src/ui/conf/confappmanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui/conf/confappmanager.cpp b/src/ui/conf/confappmanager.cpp index 4d23c970..7b41fe3f 100644 --- a/src/ui/conf/confappmanager.cpp +++ b/src/ui/conf/confappmanager.cpp @@ -252,7 +252,8 @@ void ConfAppManager::deleteApps(const QVector &appIdList) bool isWildcard = false; for (const qint64 appId : appIdList) { - deleteApp(appId, isWildcard); + if (!deleteApp(appId, isWildcard)) + break; } if (isWildcard) { @@ -363,7 +364,8 @@ void ConfAppManager::updateAppsBlocked( bool isWildcard = (appIdList.size() > 7); for (const qint64 appId : appIdList) { - updateAppBlocked(appId, blocked, killProcess, isWildcard); + if (!updateAppBlocked(appId, blocked, killProcess, isWildcard)) + break; } if (isWildcard) { @@ -377,7 +379,7 @@ bool ConfAppManager::updateAppBlocked( App app; app.appId = appId; if (!loadAppById(app)) - return false; + return true; if (!prepareAppBlocked(app, blocked, killProcess) || !saveAppBlocked(app)) return false;