diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-22 19:21:28 +1000 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-22 19:21:28 +1000 |
commit | ad7ddea09126efeb58ab626dc13113e3e1956912 (patch) | |
tree | c813c980562b0e0a4bcf5ac3908768b5df3a387e /doc/src/snippets | |
parent | d0a173dd338240a9084b4a2e2e3521ed4402ecaf (diff) | |
parent | 6d1160ebb58a35a70afd689223d167eaf13490fd (diff) | |
download | qt4-tools-ad7ddea09126efeb58ab626dc13113e3e1956912.tar.gz |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team: (95 commits)
Update changes-4.8.0 file
Only limit cursor position when line is wrapped
Update changelog for Qt 4.8
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
Make sure cursor position doesn't exceed line end
Allow shared EGL contexts for xcb and xlib platforms
Allow generic EGL platform contexts to be shared
Fix compile issue when building with QT_NO_CONCURRENT and QT_NO_FUTURE
4.8 Changes: OpenGL Framebuffer Format
stop tslib plugin having same file name as linux input plugin
Avoid unnecessary detach of a QImage in QPixmapDropShadowFilter
Update changelog for Qt 4.8
Update changelog for Qt 4.8
Updated change-log for 4.8
Update changes file for 4.8.0
Update changelog for Qt 4.8
...
Diffstat (limited to 'doc/src/snippets')
-rw-r--r-- | doc/src/snippets/code/src_corelib_io_qsettings.cpp | 21 |
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 5abb0e368c..269aa44079 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] |