mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	ssrf: call sync() when exiting appl.
In order to ensure preferences are saved, sync() is called when leaving the program. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
		
							parent
							
								
									f251faa501
								
							
						
					
					
						commit
						3b84dbe554
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		|  | @ -11,6 +11,7 @@ | |||
| #include "core/qt-gui.h" | ||||
| #include "core/qthelper.h" | ||||
| #include "core/subsurfacestartup.h" | ||||
| #include "core/settings/qPref.h" | ||||
| #include "desktop-widgets/diveplanner.h" | ||||
| #include "desktop-widgets/mainwindow.h" | ||||
| #include "desktop-widgets/preferences/preferencesdialog.h" | ||||
|  | @ -118,6 +119,10 @@ int main(int argc, char **argv) | |||
| 	free((void *)default_directory); | ||||
| 	free((void *)default_filename); | ||||
| 	subsurface_console_exit(); | ||||
| 
 | ||||
| 	// Sync struct preferences to disk
 | ||||
| 	qPref::sync(); | ||||
| 
 | ||||
| 	free_prefs(); | ||||
| 	return 0; | ||||
| } | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ | |||
| #include "core/qt-gui.h" | ||||
| #include "core/qthelper.h" | ||||
| #include "core/subsurfacestartup.h" | ||||
| #include "core/settings/qPref.h" | ||||
| 
 | ||||
| #include <QApplication> | ||||
| #include <QLocale> | ||||
|  | @ -111,6 +112,10 @@ int main(int argc, char **argv) | |||
| 	taglist_free(g_tag_list); | ||||
| 	parse_xml_exit(); | ||||
| 	subsurface_console_exit(); | ||||
| 
 | ||||
| 	// Sync struct preferences to disk
 | ||||
| 	qPref::sync(); | ||||
| 
 | ||||
| 	free_prefs(); | ||||
| 	return 0; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue