summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-08-16 11:30:49 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-08-16 13:51:16 +0000
commitff68be114e3db8bf1d2fa1fd0153862a25bf5e8b (patch)
tree20af73c28821dda338e8607e40ed2478565b8fdd /src/corelib
parent6d9549793137f779bdb136897385cdc59b65e44e (diff)
Fix documentation of the Windows parts of QSettings::setPath()
Explain in terms of CSIDL_ values and update the sample locations. Task-number: QTBUG-55065 Change-Id: I15ddf32555d43cffae66d98c6ac12d62a98d5e6d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qsettings.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 64a7b9529b..9e0e6c2769 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2270,16 +2270,20 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
On Windows, the following files are used:
\list 1
- \li \c{%APPDATA%\MySoft\Star Runner.ini}
- \li \c{%APPDATA%\MySoft.ini}
- \li \c{%COMMON_APPDATA%\MySoft\Star Runner.ini}
- \li \c{%COMMON_APPDATA%\MySoft.ini}
+ \li \c{CSIDL_APPDATA\MySoft\Star Runner.ini}
+ \li \c{CSIDL_APPDATA\MySoft.ini}
+ \li \c{CSIDL_COMMON_APPDATA\MySoft\Star Runner.ini}
+ \li \c{CSIDL_COMMON_APPDATA\MySoft.ini}
\endlist
- The \c %APPDATA% path is usually \tt{C:\\Documents and
- Settings\\\e{User Name}\\Application Data}; the \c
- %COMMON_APPDATA% path is usually \tt{C:\\Documents and
- Settings\\All Users\\Application Data}.
+ The identifiers prefixed by \c{CSIDL_} are special item ID lists to be passed
+ to the Win32 API function \c{SHGetSpecialFolderPath()} to obtain the
+ corresponding path.
+
+ \c{CSIDL_APPDATA} usually points to \tt{C:\\Users\\\e{User Name}\\AppData\\Roaming},
+ also shown by the environment variable \c{%APPDATA%}.
+
+ \c{CSIDL_COMMON_APPDATA} usually points to \tt{C:\\ProgramData}.
On BlackBerry only a single file is used (see \l{Platform Limitations}).
If the file format is IniFormat, this is "Settings/MySoft/Star Runner.ini"
@@ -3385,8 +3389,8 @@ void QSettings::setUserIniPath(const QString &dir)
\table
\header \li Platform \li Format \li Scope \li Path
- \row \li{1,2} Windows \li{1,2} IniFormat \li UserScope \li \c %APPDATA%
- \row \li SystemScope \li \c %COMMON_APPDATA%
+ \row \li{1,2} Windows \li{1,2} IniFormat \li UserScope \li \c CSIDL_APPDATA
+ \row \li SystemScope \li \c CSIDL_COMMON_APPDATA
\row \li{1,2} Unix \li{1,2} NativeFormat, IniFormat \li UserScope \li \c $HOME/.config
\row \li SystemScope \li \c /etc/xdg
\row \li{1,2} Qt for Embedded Linux \li{1,2} NativeFormat, IniFormat \li UserScope \li \c $HOME/Settings