Changeset c21e998 in subsurface


Ignore:
Timestamp:
Dec 14, 2017, 8:01:34 AM (6 weeks ago)
Author:
Jan Mulder <jlmulder@…>
Branches:
master
Children:
62ef78b
Parents:
074ddc0
git-author:
Berthold Stoeger <bstoeger@…> (12/13/17 12:44:22)
git-committer:
Jan Mulder <jlmulder@…> (12/14/17 08:01:34)
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    r5707554 rc21e998  
    11051105                        appendTextToLog(get_error_string());
    11061106                set_filename(filename);
    1107                 GeneralSettingsObjectWrapper s(this);
    1108                 s.setDefaultFilename(filename);
    1109                 s.setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
     1107                auto s = SettingsObjectWrapper::instance()->general_settings;
     1108                s->setDefaultFilename(filename);
     1109                s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
    11101110        }
    11111111
     
    11221122                                        appendTextToLog(get_error_string());
    11231123                                set_filename(filename);
    1124                                 GeneralSettingsObjectWrapper s(this);
    1125                                 s.setDefaultFilename(filename);
    1126                                 s.setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
     1124                                auto s = SettingsObjectWrapper::instance()->general_settings;
     1125                                s->setDefaultFilename(filename);
     1126                                s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
    11271127                        }
    11281128                } else if (!loadFromCloud()) {
Note: See TracChangeset for help on using the changeset viewer.