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

WebAssembly QSettings crash using clear()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • None
    • 6.4.2
    • Core: Other
    • None
    • Chrome / firefox
    • WebAssembly

      Using QSettings in c++ with the linked code,

       

      When clicking the switch-me switch, we save the new state.
      Note also that we save a empty and not useful array.

       

      When clicking the clear button, we will issue a call to QSettings.clear(). This call will result in a javascript error in the browser.

       

      Using a production app, the application completly crash and we are back to the Qt loader screen with the same issue: "Cannot pass non-string to std::string".

      Note that the issue does not happen if you do not create the array in the settings.

        1. CMakeLists.txt
          0.8 kB
        2. Controller.h
          0.5 kB
        3. main.cpp
          0.6 kB
        4. main.qml
          0.5 kB
        5. Screenshot_20230206_111244.png
          Screenshot_20230206_111244.png
          316 kB
        6. Controller-1.cpp
          0.5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lpotter Lorn Potter
            qdel Deldycke Quentin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes