Mercurial > hg > octave-nkf
changeset 16175:6f83158c714c
gui: make sure settings are really written into the settings file
* files-dockwidget.cc (destructor): added sync () after writing settings
* workspace-view.cc (destructor): added sync () after writing settings
* files-editor.cc (mru_menu_update): added sync () after writing settings
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 02 Mar 2013 22:31:40 +0100 |
parents | 39096b290a2f |
children | 74ba79f79fcc |
files | libgui/src/files-dockwidget.cc libgui/src/m-editor/file-editor.cc libgui/src/workspace-view.cc |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/files-dockwidget.cc +++ b/libgui/src/files-dockwidget.cc @@ -124,7 +124,8 @@ Qt::SortOrder sort_order = _file_tree_view->header ()->sortIndicatorOrder (); settings->setValue ("filesdockwidget/sort_files_by_column", sort_column); settings->setValue ("filesdockwidget/sort_files_by_order", sort_order); - settings->setValue ("filesdockwidget/column_state", _file_tree_view->header ()->saveState ()); + settings->setValue ("filesdockwidget/column_state", _file_tree_view->header ()->saveState ()); + settings->sync (); } void
--- a/libgui/src/m-editor/file-editor.cc +++ b/libgui/src/m-editor/file-editor.cc @@ -427,6 +427,7 @@ QSettings *settings = resource_manager::get_settings (); // FIXME -- what should happen if settings is 0? settings->setValue ("editor/mru_file_list",_mru_files); + settings->sync (); } void
--- a/libgui/src/workspace-view.cc +++ b/libgui/src/workspace-view.cc @@ -97,13 +97,11 @@ workspace_view::~workspace_view () { QSettings *settings = resource_manager::get_settings (); - - // FIXME -- what should happen if settings is 0? - settings->setValue("workspaceview/local_collapsed", _explicit_collapse.local); settings->setValue("workspaceview/global_collapsed", _explicit_collapse.global); settings->setValue("workspaceview/persistent_collapsed", _explicit_collapse.persistent); settings->setValue("workspaceview/column_state", _workspace_tree_view->header ()->saveState ()); + settings->sync (); } void