Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.3
-
None
Description
QSettings will still fall back onto any child groups or child keys specified in the fallback entries even if fallbacks are turned off.
–
Example:
#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 sys(QSettings::SystemScope, qApp->organizationName(), qApp->applicationName());
sys.beginGroup("somegroup");
sys.beginGroup("someothergroup");
sys.setValue("somevalue", "somedata");
QSettings usr(QSettings::UserScope, qApp->organizationName(), qApp->applicationName());
usr.setFallbacksEnabled(false);
usr.beginGroup("somegroup");
qDebug() << usr.childGroups();
// at this point the group "someothergroup" is listed, although fallback is disabled
}