From 9680828ac40d6e10eac02f4981f3668669409acf Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Fri, 24 May 2019 14:59:43 +0200 Subject: Persistent storage of preferences between app runs We can now persist the user preferences to disk at application exit so they are correctly remembered for the next run. The preferences are stored in dataPath()/user_prefs.json. This is managed via the PrefServiceAdapter class. It's not possible to test this in a correct pattern as we require the app to exit properly to be able to guarantee that the preferences are written to disk. The code added in ~PrefServiceAdapter() does not provide any guarantees in the next profile construction that the previous preferences have been written to disk. Fixes: QTBUG-75740 Change-Id: I96bb3037707d90b05b3dfab4f083702351923aee Reviewed-by: Allan Sandfeld Jensen --- src/core/core_chromium.pri | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/core_chromium.pri') diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index d8ef25d8c..69a7f48d8 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -109,6 +109,7 @@ SOURCES = \ profile_io_data_qt.cpp \ quota_permission_context_qt.cpp \ quota_request_controller_impl.cpp \ + pref_service_adapter.cpp \ register_protocol_handler_request_controller_impl.cpp \ render_view_context_menu_qt.cpp \ render_widget_host_view_qt.cpp \ @@ -205,6 +206,7 @@ HEADERS = \ ozone/surface_factory_qt.h \ permission_manager_qt.h \ platform_notification_service_qt.h \ + pref_service_adapter.h \ process_main.h \ profile_adapter.h \ profile_adapter_client.h \ @@ -247,7 +249,6 @@ HEADERS = \ web_engine_settings.h \ web_event_factory.h - qtConfig(webengine-system-x11): hasX11Dependencies() { HEADERS += ozone/gl_ozone_glx_qt.h \ ozone/gl_surface_glx_qt.h -- cgit v1.2.3