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

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 4.4.3, 5.9.5, 5.12.6
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      Windows

      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

        For Gerrit Dashboard: QTBUG-85295
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change