added field containing application platform to backup file, added feature to clear appsSplitTunneling list from backup file if backup was made on other platform

This commit is contained in:
Mitternacht822 2025-06-27 17:23:41 +04:00
parent 17ee1c837a
commit 4d8bba3ef8
4 changed files with 46 additions and 9 deletions

View file

@ -26,12 +26,12 @@ QVariant AppSplitTunnelingModel::data(const QModelIndex &index, int role) const
return QVariant();
switch (role) {
case AppPathRole: {
return m_apps.at(index.row()).appName;
}
default: {
return true;
}
case AppPathRole: {
return m_apps.at(index.row()).appName;
}
default: {
return true;
}
}
return QVariant();
@ -59,6 +59,13 @@ void AppSplitTunnelingModel::removeApp(QModelIndex index)
endRemoveRows();
}
void AppSplitTunnelingModel::clearAppsList() {
beginResetModel();
m_apps.clear();
m_settings->setVpnApps(m_currentRouteMode, m_apps);
endResetModel();
}
int AppSplitTunnelingModel::getRouteMode()
{
return m_currentRouteMode;

View file

@ -29,6 +29,7 @@ public:
public slots:
bool addApp(const InstalledAppInfo &appInfo);
void removeApp(QModelIndex index);
void clearAppsList();
int getRouteMode();
void setRouteMode(int routeMode);