Document that type information is lost when reading QSettings from INI

This is quite an important detail for an otherwise useful format. We
should make the user aware that they currently have a tradeoff:

- Either you can store settings in one place on all platforms that your
application targets and have to manually manage conversion from
  strings, or
- Use native formats which can be hard to find and edit, but retain
  type information.

Change-Id: Ic648524c9ebff25246d7cdefb7628ff5ddf84964
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
Mitch Curtis 2019-02-20 13:17:51 +01:00
parent 130bede619
commit ee8a5f4917

View File

@ -2167,6 +2167,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
\snippet settings/settings.cpp 15
Note that type information is not preserved when reading settings from INI
files; all values will be returned as QString.
The \l{tools/settingseditor}{Settings Editor} example lets you
experiment with different settings location and with fallbacks
turned on or off.
@ -2448,7 +2451,10 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
On 32-bit Windows or from a 64-bit application on 64-bit Windows,
this works the same as specifying NativeFormat.
This enum value was added in Qt 5.7.
\value IniFormat Store the settings in INI files.
\value IniFormat Store the settings in INI files. Note that type information
is not preserved when reading settings from INI files;
all values will be returned as QString.
\value InvalidFormat Special value returned by registerFormat().
\omitvalue CustomFormat1
\omitvalue CustomFormat2