Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.5
-
None
-
BlackBerry 10.2 Gold NDK
-
7982a378c7058ca6b1ee29f5f5039cb62d2dcfd5
Description
QSettings works incorrectly if QSettings::UserScope is used. This was initially reported in QTBUG-37173. The sample code in QTBUG-37173 shows that if
settings.setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath())
the resulting actual settings file is set to:
<APP_HOME>data/Settings/PUBLISHER/settingsTest.conf
if the same call is made on another QSettings object in the same app, the same file is set to
<APP_HOME>/data/PUBLISHER/settingsTest.conf
which should be the same as for the first object, but it is not. Actually, even that is not fully correct either. The correct one should be
<APP_HOME>/data/<APP_NAME>.conf
where <APP_NAME> is QCoreApplication::applicationName(). The user might decide to set another path inside QDir::homePath(), QSettings has to follow accordingly.
Additionally, the documentation does not mention this aspect at all:
http://qt-project.org/doc/qt-4.8/qsettings.html
This has be to correct as well.
Please verify the Qt5 implementation of the same use case.
Attachments
Issue Links
- is required for
-
QTBUG-37173 QSettings regresion on BB10, It no longer works
- Closed