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

QSettings will still fall back onto any child groups specified in the fallback entries even if fallbacks are turned off

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.4.0 Beta1
    • 4.4.3, 5.9.5, 5.12.6
    • Core: I/O
    • None
    • Windows
    • 3162f04dee (qt/qtbase/dev) 3162f04dee (qt/tqtc-qtbase/dev)

    Description

      I have the same issues as QTBUG-3386 on Windows with Qt 5.9.5 and Qt 5.12.6.

      The last comment said "If this issue applies to Qt 5, please leave a comment requesting that it be reopened."

      I have already added some comments on QTBUG-3386.

      Do you prefer re-open QTBUG-3386?

      The following code is a way to reproduce this bug (without to have to run as admin and without side effect from one run to an other)  (I have also added this code in attachment):

       

      #include <QCoreApplication>
      #include <QSettings>
      #include <QStringList>
      #include <QDebug>int main(int argc, char *argv[])
      {
         QCoreApplication a(argc, argv);
         a.setOrganizationName("FooSoft");
         a.setOrganizationDomain("foosoft.com");
         a.setApplicationName("bar");
      
         QSettings usrOrg(QSettings::UserScope, qApp->organizationName());
         usrOrg.clear();
         usrOrg.beginGroup("somegroup");
         usrOrg.beginGroup("someothergroup");
         usrOrg.setValue("somevalue", "somedata");
      
         QSettings usrApp(QSettings::UserScope, qApp->organizationName(), qApp->applicationName());
         usrApp.clear();
         usrApp.setFallbacksEnabled(false);
         usrApp.beginGroup("somegroup");
         qDebug() << usrApp.childGroups();
         // at this point the group "someothergroup" is listed on Windows, although fallback is disabled
      }
      

       

      Thanks

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            jeremiegraulle Jeremie Graulle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes