Use default value for InitiateConnectionFromServer option during switching between scopes (#7232)
This commit is contained in:
parent
b2b887cf43
commit
88fdd26350
2 changed files with 12 additions and 2 deletions
|
|
@ -577,10 +577,11 @@ QVariant AppConfig::loadCommonSetting(AppConfig::Setting name, const QVariant& d
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::loadScope(ConfigWriter::Scope scope) const {
|
void AppConfig::loadScope(ConfigWriter::Scope scope) {
|
||||||
auto writer = ConfigWriter::make();
|
auto writer = ConfigWriter::make();
|
||||||
|
|
||||||
if (writer->getScope() != scope) {
|
if (writer->getScope() != scope) {
|
||||||
|
setDefaultValues();
|
||||||
writer->setScope(scope);
|
writer->setScope(scope);
|
||||||
if (writer->hasSetting(settingName(kScreenName), writer->getScope())) {
|
if (writer->hasSetting(settingName(kScreenName), writer->getScope())) {
|
||||||
//If the user already has settings, then load them up now.
|
//If the user already has settings, then load them up now.
|
||||||
|
|
@ -589,6 +590,11 @@ void AppConfig::loadScope(ConfigWriter::Scope scope) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppConfig::setDefaultValues()
|
||||||
|
{
|
||||||
|
m_InitiateConnectionFromServer = false;
|
||||||
|
}
|
||||||
|
|
||||||
void AppConfig::setLoadFromSystemScope(bool value) {
|
void AppConfig::setLoadFromSystemScope(bool value) {
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,11 @@ protected:
|
||||||
|
|
||||||
/// @brief This method loads config from specified scope
|
/// @brief This method loads config from specified scope
|
||||||
/// @param [in] scope which should be loaded.
|
/// @param [in] scope which should be loaded.
|
||||||
void loadScope(GUI::Config::ConfigWriter::Scope scope) const;
|
void loadScope(GUI::Config::ConfigWriter::Scope scope);
|
||||||
|
|
||||||
|
/// @brief This function sets default values
|
||||||
|
/// for settings that shouldn't be copied from between scopes.
|
||||||
|
void setDefaultValues();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sslToggled() const;
|
void sslToggled() const;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue