summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-18 11:07:51 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-18 11:07:51 +0200
commit0ca4fcbc36527ce02b604aa88e8bd0d37d40baf4 (patch)
tree6adf165fb783272d720416a49a51d9ad169d16de /src/corelib
parent9aeaa363e533e1486e6e9d7526bbab7c2472be5e (diff)
parent748aa6b06462804a9671997302df292ae9788d5c (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/plugins/platforms/xcb/qxcbintegration.cpp Change-Id: I2d71d06a55f730df19ace0dd3304238584a0497f
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qsettings.cpp24
-rw-r--r--src/corelib/json/qjsonvalue.h2
-rw-r--r--src/corelib/tools/qlinkedlist.h4
3 files changed, 17 insertions, 13 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index eb6cadceec..8bdd148e28 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2245,16 +2245,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}.
If the file format is IniFormat, this is "Settings/MySoft/Star Runner.ini"
in the application's home directory.
@@ -3358,8 +3362,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
diff --git a/src/corelib/json/qjsonvalue.h b/src/corelib/json/qjsonvalue.h
index 1ce7f745e0..a853acaddd 100644
--- a/src/corelib/json/qjsonvalue.h
+++ b/src/corelib/json/qjsonvalue.h
@@ -82,7 +82,7 @@ public:
QJsonValue(QLatin1String s);
#ifndef QT_NO_CAST_FROM_ASCII
inline QT_ASCII_CAST_WARN QJsonValue(const char *s)
- : d(0), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }
+ : d(Q_NULLPTR), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }
#endif
QJsonValue(const QJsonArray &a);
QJsonValue(const QJsonObject &o);
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index e3eed9184f..838965c4e7 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -134,7 +134,7 @@ public:
typedef T *pointer;
typedef T &reference;
Node *i;
- inline iterator() : i(0) {}
+ inline iterator() : i(Q_NULLPTR) {}
inline iterator(Node *n) : i(n) {}
inline iterator(const iterator &o) : i(o.i) {}
inline iterator &operator=(const iterator &o) { i = o.i; return *this; }
@@ -167,7 +167,7 @@ public:
typedef const T *pointer;
typedef const T &reference;
Node *i;
- inline const_iterator() : i(0) {}
+ inline const_iterator() : i(Q_NULLPTR) {}
inline const_iterator(Node *n) : i(n) {}
inline const_iterator(const const_iterator &o) : i(o.i){}
inline const_iterator(iterator ci) : i(ci.i){}