extended the validation of the contents of the imported file (#670)

Extended the validation of the contents of the imported file
This commit is contained in:
Nethius 2024-03-14 04:22:10 +07:00 committed by GitHub
parent 0a90fd110d
commit c5a5bfde69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 109 additions and 58 deletions

View file

@ -113,6 +113,11 @@ void SettingsController::restoreAppConfig(const QString &fileName)
QByteArray data = file.readAll();
restoreAppConfigFromData(data);
}
void SettingsController::restoreAppConfigFromData(const QByteArray &data)
{
bool ok = m_settings->restoreAppConfig(data);
if (ok) {
m_serversModel->resetModel();