summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qsettings.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-20 23:16:13 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-20 23:16:13 (GMT)
commit6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48 (patch)
tree7d7ad331c8c5316924bd5ff3fd7e6ccb21e7cc48 /src/corelib/io/qsettings.cpp
parent7b4c273df2401505fe87efdf5d1d73d75993910a (diff)
parentb81201a29a9794ed490098c8eb136464afa12b8a (diff)
downloadQt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.zip
Qt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.tar.gz
Qt-6e2a9ed7f5388ece10ffb08a52c3e22d3b058d48.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-water-team: (36 commits) add 4.8 changes created/merged by me Fixed automatic plugin path resolving for predefined Qt plugins. Resolve a number of compilation issues with INTEGRITY runonphone: Include USB serial ports on OS X for CODA, too Update changelog for Qt 4.8.0 Fix compile issue when building with QT_NO_CONCURRENT and QT_NO_FUTURE runonphone: Implement traceswitch support for coda Fix missing clean up stack panic for a new thread in Symbian Regression in QS60Style when drawing webview scrollbars Cleanup qwidget_s60.cpp Fix panic when global QSettings instance needs flusing at app exit Fix uninitialised variable in temporary files More accurately determine bearer type for symbian GPRS/3G Add documentation for Symbian QSettings locations and security Update QDesktopServices openUrl() documentation on Symbian OS Mark binaries as SMPSAFE in Symbian Fix "sbs -c tools2 --what" output for Qt. Update environment.prf QS60Style: Make spinboxes and lineedits slightly taller runonphone: Add a missing space between a message and the file name ...
Diffstat (limited to 'src/corelib/io/qsettings.cpp')
-rw-r--r--src/corelib/io/qsettings.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 547bbeb..ab8cc39 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2332,6 +2332,25 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
%COMMON_APPDATA% path is usually \tt{C:\\Documents and
Settings\\All Users\\Application Data}.
+ On Symbian, the following files are used for both IniFormat and
+ NativeFormat (in this example, we assume that the application is
+ installed on the \c e-drive and its Secure ID is \c{0xECB00931}):
+
+ \list 1
+ \o \c{c:\data\.config\MySoft\Star Runner.conf}
+ \o \c{c:\data\.config\MySoft.conf}
+ \o \c{e:\private\ecb00931\MySoft\Star Runner.conf}
+ \o \c{e:\private\ecb00931\MySoft.conf}
+ \endlist
+
+ The SystemScope settings location is determined from the installation
+ drive and Secure ID (UID3) of the application. If the application is
+ built-in on the ROM, the drive used for SystemScope is \c c:.
+
+ \note Symbian SystemScope settings are by default private to the
+ application and not shared between applications, unlike other
+ environments.
+
The paths for the \c .ini and \c .conf files can be changed using
setPath(). On Unix and Mac OS X, the user can override them by by
setting the \c XDG_CONFIG_HOME environment variable; see
@@ -2389,6 +2408,32 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
On other platforms than Windows, "Default" and "." would be
treated as regular subkeys.
+ \section2 Securing application settings in Symbian
+
+ UserScope settings in Symbian are writable by any application by
+ default. To protect the application settings from access and tampering
+ by other applications, the settings need to be placed in the private
+ secure area of the application. This can be done by specifying the
+ settings storage path directly to the private area. The following
+ snippet changes the UserScope to \c{c:/private/ecb00931/MySoft.conf}
+ (provided the application is installed on the \c{c-drive} and its
+ Secure ID is \c{0xECB00931}:
+
+ \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 30
+
+ Framework libraries (like Qt itself) may store configuration and cache
+ settings using UserScope, which is accessible and writable by other
+ applications. If the application is very security sensitive or uses
+ high platform security capabilities, it may be prudent to also force
+ framework settings to be stored in the private directory of the
+ application. This can be done by changing the default path of UserScope
+ before QApplication is created:
+
+ \snippet doc/src/snippets/code/src_corelib_io_qsettings.cpp 31
+
+ Note that this may affect framework libraries' functionality if they expect
+ the settings to be shared between applications.
+
\section2 Platform Limitations
While QSettings attempts to smooth over the differences between
@@ -3423,6 +3468,8 @@ void QSettings::setUserIniPath(const QString &dir)
\row \o SystemScope \o \c /etc/xdg
\row \o{1,2} Mac OS X \o{1,2} IniFormat \o UserScope \o \c $HOME/.config
\row \o SystemScope \o \c /etc/xdg
+ \row \o{1,2} Symbian \o{1,2} NativeFormat, IniFormat \o UserScope \o \c c:/data/.config
+ \row \o SystemScope \o \c <drive>/private/<uid>
\endtable
The default UserScope paths on Unix and Mac OS X (\c