summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-09-06 13:39:24 (GMT)
committerPasi Pentikainen <pasi.a.pentikainen@nokia.com>2011-09-13 10:49:28 (GMT)
commite9060024fa2100ce5c8b2e8689d2ec72b75a3211 (patch)
tree9398fb53ec07c73a3c6bba8f01fa72d3507c1f44 /doc/src
parentcb7c3b8f837d123cef1a180b700b53869cc77ea6 (diff)
downloadQt-e9060024fa2100ce5c8b2e8689d2ec72b75a3211.zip
Qt-e9060024fa2100ce5c8b2e8689d2ec72b75a3211.tar.gz
Qt-e9060024fa2100ce5c8b2e8689d2ec72b75a3211.tar.bz2
Add documentation for Symbian QSettings locations and security
Task-number: QTBUG-11192 Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/code/src_corelib_io_qsettings.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
index 5abb0e3..269aa44 100644
--- a/doc/src/snippets/code/src_corelib_io_qsettings.cpp
+++ b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
@@ -314,3 +314,24 @@ int main(int argc, char *argv[])
...
}
//! [29]
+
+//! [30]
+QSettings settings(QApplication::applicationDirPath() + "/MySoft.conf");
+//! [30]
+
+//! [31]
+#include <QSettings>
+#include <QDesktopServices>
+int main(int argc, char *argv[])
+{
+#ifdef Q_OS_SYMBIAN
+ // Use QDesktopServices:storageLocation as QApplication is not yet created
+ QSettings::setPath(
+ QSettings::NativeFormat, QSettings::UserScope,
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/settings");
+#endif
+ QApplication app(argc, argv);
+
+ ...
+}
+//! [31]