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

QSettings serialization problems on Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • 5.8.0
    • 5.6.2, 5.7.0
    • Core: I/O, Core: Other
    • None
    • OS X 10.9.5, Xcode 6.2
      macOS 10.12, Xcode 8.0
    • macOS

    Description

      QSettings can't save QColor using native OS format when app is running on macOS Sierra (10.12). ini format has no problems, everything is saved/loaded correctly.
      with older OS everything is fine, at least in OS X 10.9

      Tried 2 scenarios:
      1. compile app in OS X 10.9.5 with Qt 5.6.2 and 5.7.0 and than run in macOS 10.12.
      2. compile app in macOS 10.12 with Qt 5.6.2 and run it in macOS 10.12
      results were the same

      minimal test code to reproduce problem (full source is attached):

          QSettings system_settings;
          system_settings.setValue("test_app/color", cl);
          qDebug() << "system: src:" << cl << "loaded:" << system_settings.value("test_app/color").value<QColor>();
      
      output

      system: src: QColor(ARGB 1, 1, 0, 1) loaded: QColor(Invalid)

      few words about incorrect saved data: its truncated after '(', no any bytes more. see last lines in 'settings.ini' from attachment

      test program and its output from different OSes are attached.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            nick-korotysh Nick Korotysh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes