mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Don't create GeneralSettingsObjectWrapper object
Instead use the application-wide instance. Creating a local object defeats the whole purpose of these objects - nobody can receive signals in case the settings changed. No other cases of locally created SettingsObjectWrapper objects were found. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
074ddc0596
commit
c21e998277
1 changed files with 6 additions and 6 deletions
|
@ -1104,9 +1104,9 @@ void QMLManager::openNoCloudRepo()
|
|||
if (git_create_local_repo(filename))
|
||||
appendTextToLog(get_error_string());
|
||||
set_filename(filename);
|
||||
GeneralSettingsObjectWrapper s(this);
|
||||
s.setDefaultFilename(filename);
|
||||
s.setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
|
||||
auto s = SettingsObjectWrapper::instance()->general_settings;
|
||||
s->setDefaultFilename(filename);
|
||||
s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
|
||||
}
|
||||
|
||||
openLocalThenRemote(filename);
|
||||
|
@ -1121,9 +1121,9 @@ void QMLManager::saveChangesLocal()
|
|||
if (git_create_local_repo(filename))
|
||||
appendTextToLog(get_error_string());
|
||||
set_filename(filename);
|
||||
GeneralSettingsObjectWrapper s(this);
|
||||
s.setDefaultFilename(filename);
|
||||
s.setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
|
||||
auto s = SettingsObjectWrapper::instance()->general_settings;
|
||||
s->setDefaultFilename(filename);
|
||||
s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
|
||||
}
|
||||
} else if (!loadFromCloud()) {
|
||||
// this seems silly, but you need a common ancestor in the repository in
|
||||
|
|
Loading…
Add table
Reference in a new issue