diff options
author | Martin Smith <msmith@trolltech.com> | 2009-10-15 11:32:55 +0200 |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2009-10-15 11:36:13 +0200 |
commit | 428c56a3a622df3f9164c3e52b729877bc679585 (patch) | |
tree | abeabcdfe9cf1b8fefdec82b36ac32b15debfd15 /src/corelib/io/qsettings.cpp | |
parent | 376a5a845ba6d19751a58ea79a8d5701c4ba4d13 (diff) | |
download | qt4-tools-428c56a3a622df3f9164c3e52b729877bc679585.tar.gz |
doc: Clarified when setDefaultFormat() is ignored by constructors.
Task-number: QTBUG-4443
Diffstat (limited to 'src/corelib/io/qsettings.cpp')
-rw-r--r-- | src/corelib/io/qsettings.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 1fd2165d9c..a1c9833368 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -2565,8 +2565,9 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, Example: \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 10 - The scope is QSettings::UserScope and the format is - QSettings::NativeFormat. + The scope is set to QSettings::UserScope, and the format is + set to QSettings::NativeFormat (i.e. calling setDefaultFormat() + before calling this constructor has no effect). \sa setDefaultFormat(), {Fallback Mechanism} */ @@ -2583,11 +2584,12 @@ QSettings::QSettings(const QString &organization, const QString &application, QO If \a scope is QSettings::UserScope, the QSettings object searches user-specific settings first, before it searches system-wide - settings as a fallback. If \a scope is - QSettings::SystemScope, the QSettings object ignores user-specific - settings and provides access to system-wide settings. + settings as a fallback. If \a scope is QSettings::SystemScope, the + QSettings object ignores user-specific settings and provides + access to system-wide settings. - The storage format is QSettings::NativeFormat. + The storage format is set to QSettings::NativeFormat (i.e. calling + setDefaultFormat() before calling this constructor has no effect). If no application name is given, the QSettings object will only access the organization-wide \l{Fallback Mechanism}{locations}. @@ -2668,6 +2670,8 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent) The scope is QSettings::UserScope and the format is defaultFormat() (QSettings::NativeFormat by default). + Use setDefaultFormat() before calling this constructor + to change the default format used by this constructor. The code @@ -3352,10 +3356,12 @@ QVariant QSettings::value(const QString &key, const QVariant &defaultValue) cons /*! \since 4.4 - Sets the default file format to the given \a format, used for storing - settings for the QSettings(QObject *) constructor. + Sets the default file format to the given \a format, which is used + for storing settings for the QSettings(QObject *) constructor. - If no default format is set, QSettings::NativeFormat is used. + If no default format is set, QSettings::NativeFormat is used. See + the documentation for the QSettings constructor you are using to + see if that constructor will ignore this function. \sa format() */ |