Don't save preferences until all options are processed

This commit is contained in:
Tom Piccirello 2019-08-11 13:44:18 -07:00 committed by GitHub
parent 2d28f50acd
commit bed143cafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -624,9 +624,6 @@ void AppController::setPreferencesAction()
if (hasKey("dyndns_domain"))
pref->setDynDomainName(it.value().toString());
// Save preferences
pref->apply();
if (hasKey("rss_refresh_interval"))
RSS::Session::instance()->setRefreshInterval(it.value().toUInt());
if (hasKey("rss_max_articles_per_feed"))
@ -738,6 +735,9 @@ void AppController::setPreferencesAction()
const QHostAddress announceAddr {it.value().toString().trimmed()};
session->setAnnounceIP(announceAddr.isNull() ? QString {} : announceAddr.toString());
}
// Save preferences
pref->apply();
}
void AppController::defaultSavePathAction()