Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70291

Add sync method in Qt.labs.settings.Settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.13.0 Alpha 1
    • 5.11.1
    • Quick: Other
    • None

      On Android (and potentially other mobile platforms), applications can be killed by the OS after having being suspended. An application is supposed to listen to changes in Qt.application.state and save its state if the state becomes Qt.ApplicationSuspended.

      Unfortunatly, if the application is killed soon after having been suspended (which is often the case on Android), the destructor of QQmlSettings is not executed and pending changes are not written to disk.

      The only solution I can see is to add a new method synch() to Qt.labs.settings.Settings, such that the user can manually call it if needed after they have modified the settings when the application becomes suspended.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            paangele Paolo Angelelli
            enz Markus Enzenberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes