diff options
| author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-10-03 19:14:27 (GMT) |
|---|---|---|
| committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-10-03 19:14:27 (GMT) |
| commit | 7acc1316fa4dd32a81bdf185656cb97d6f3fbf11 (patch) | |
| tree | e332d1362eef0b26778314bd34496390d5cecbfa /doc/src/snippets/code | |
| parent | 9e88a2f1468b9a4f500b878f514db7f7a1f5eadc (diff) | |
| parent | 06c23ac8a6d03af3b9674c8c7850560a0973b2fb (diff) | |
| download | Qt-7acc1316fa4dd32a81bdf185656cb97d6f3fbf11.zip Qt-7acc1316fa4dd32a81bdf185656cb97d6f3fbf11.tar.gz Qt-7acc1316fa4dd32a81bdf185656cb97d6f3fbf11.tar.bz2 | |
Merge remote-tracking branch 'upstream/4.8'
Diffstat (limited to 'doc/src/snippets/code')
| -rw-r--r-- | doc/src/snippets/code/doc_src_qmake-manual.pro | 4 | ||||
| -rw-r--r-- | doc/src/snippets/code/src_corelib_io_qsettings.cpp | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.pro b/doc/src/snippets/code/doc_src_qmake-manual.pro index ee35b77..042ca0e 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.pro +++ b/doc/src/snippets/code/doc_src_qmake-manual.pro @@ -1023,3 +1023,7 @@ packagesExist(sqlite3 QtNetwork QtDeclarative) { // Use the fancy UI, as we have extra packages available #endif #! [158] + +#! [159] +RSS_RULES += "graphics_memory=12288;" +#! [159] 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] |
