summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code
Commit message (Collapse)AuthorAgeFilesLines
* QThread documentation: do not discourage the reimplementation of QThreadSze Howe Koh2013-02-191-26/+54
| | | | | | | | | | | | | | | | | | | | | The new QThread documentation now really discourage to reimplement QThread. But in fact, there are many cases where it is perfectly fine. And the example given is even a case where using worker object is wrong. The examle even contains a leak since the thread will never stop and will even leak. This changes put back some sentences from before commit 207f588b6896cbe72745037dc1cb0a3aef1cf6d0. The sample code has been re-writen. Notice how reimpementing run takes less lines of code, less runtime overhead, no leaks, and also is more complete than the previous example. This is a modified backport of qtbase commit 91e12dca757a8ef5c4691b70eb80db61a9d47e83 Change-Id: I4932aef00307a6cf91d57d632a02b8a85e5e8845 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-13483-483/+483
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Update QThread class ref to reflect changes since Qt 4.4Sze Howe Koh2012-10-201-9/+31
| | | | | | | | | | | | | | | | | Remove advice to subclass QThread; promote thinking of QThread as a thread manager, not a thread; promote event-driven programming over time micromanagement; warn against common pitfalls. Result of collaboration in forum (https://qt-project.org/forums/viewthread/20691/) and mailing list (http://lists.qt-project.org/pipermail/development/2012-September/006738.html) This is a modified backport of qtbase commit d4ad9dbbf96884c0899e8f8116a8a056facd52d5 Task-number: QTBUG-16358 Change-Id: Ib7a8d40aa418b1d96e3e7070df074b396ae9ee7e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-29484-2947/+2947
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Improved tr()-exampleRobert Loehning2012-09-031-1/+1
| | | | | | | Change-Id: I02400b5c6ad2a5b6a5c6a8ffa9f234f27969e0a8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-01484-968/+968
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix for QTBUG-21466: References to deprecated mouse driversPasi Petäjäjärvi2012-03-071-7/+2
| | | | | | | | | | | | | References to deprecated and removed mouse and keyboard drivers in documentation. Removed references. Task-number: QTBUG-21466 Change-Id: I0ea9db679023a5e9a60663d64a9797df4310e662 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Iikka Eklund <iikka.eklund@digia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Various Qt documentation fixes (wk 44)artoka2012-01-311-2/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-13362 Task-number: QTBUG-18356 Task-number: QTBUG-18417 Task-number: QTBUG-18664 Task-number: QTBUG-21562 Task-number: QTBUG-22094 Task-number: QTBUG-18741 Task-number: QTBUG-15921 Task-number: QTBUG-22172 Task-number: QTBUG-15738 Change-Id: I1d383a22612cd4fbcb7e03751e76409ca57fe7a2 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Various qt documentation fixes (wk 43)artoka2012-01-312-5/+6
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12389 Task-number: QTBUG-16667 Task-number: QTBUG-6151 Task-number: QTBUG-8625 Task-number: QTBUG-19808 Task-number: QTBUG-12096 Task-number: QTBUG-1231 Task-number: QTBUG-21073 Task-number: QTBUG-8939 Task-number: QTBUG-20399 Task-number: QTBUG-20944 Task-number: QTBUG-7542 Task-number: QTBUG-22095 Task-number: QTBUG-11278 Task-number: QTBUG-15653 Change-Id: Ibc369998d06e7f2f11b01a1ba4c2fb927e3c065b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Various Qt documentation bug fixes (wk 42)artoka2012-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-18101 Task-number: QTBUG-8673 Task-number: QTBUG-14194 Task-number: QTBUG-9109 Task-number: QTBUG-9466 Task-number: QTBUG-8323 Task-number: QTBUG-7924 Task-number: QTBUG-20355 Task-number: QTBUG-19367 Task-number: QTBUG-21295 Task-number: QTBUG-14554 Task-number: QTBUG-8331 Task-number: QTBUG-8329 Task-number: QTBUG-8786 Task-number: QTBUG-8787 Change-Id: I4b6403df4a0078fa385abbfab5b6c3a94f175295 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-11483-483/+483
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add spaces for string concatenation to work around C++11 source incompatibility.hjk2011-11-222-2/+2
| | | | | Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Task-number: QTBUG-22847
* QSPlitter style-sheet example was invalidartoka2011-11-011-1/+1
| | | | | | | | | | QSPlitter::handle:pressed - example missed "image:" text when image is set. Added "image:". Task-number: QTBUG-20069 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Errors in QSqlDriver::handle examplesartoka2011-11-011-3/+3
| | | | | | | | | | | In the examples the const char* variable was compared to QString with "==" operator which doesn't work. Changed the comparison to use qstrcmp - method. Task-number: QTBUG-20089 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QGLColormap example was invalidartoka2011-11-011-2/+3
| | | | | | | | | | | | | QGLColormap example missed int argc and char *argv[] from main - method. Filling the QGLColormap with for - loop was not working because of the 0 - size. Added arguments to main - method and changed the filling so that for-loop uses size of 256. Task-number: QTBUG-3563 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QStyleSheet example used a property that is hidden.artoka2011-11-011-1/+1
| | | | | | | | | | In the QStyleSheet documentation an example for boolean used QDialog {etch-disabled-text:1} property that is undocumented. Changed the property to QDialogButtonBox{ dialogbuttonbox-buttons-have-icons: 1; } that is documented. Task-number: QTBUG-11489 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix for QVector::toList - code example documentation.artoka2011-11-011-2/+2
| | | | | | | | | Code example in the documentation used QString values in QVector<double>. Task-number: QTBUG-21067 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed typo in QSettings documentation.Sam Protsenko2011-10-051-1/+1
| | | | | Merge-request: 1411 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-09-281-0/+21
|\
| * Add documentation for Symbian QSettings locations and securityPasi Pentikainen2011-09-131-0/+21
| | | | | | | | | | Task-number: QTBUG-11192 Reviewed-by: Miikka Heikkinen
* | docs: Typo and link fixes.jaanttil2011-09-272-5/+5
|/ | | | | | | | | | | Task-number: QTBUG-9224 Task-number: QTBUG-13442 Task-number: QTBUG-19858 Task-number: QTBUG-20957 Task-number: QTBUG-21447 Merge-request: 1402 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Default graphics memory quota for Symbian applicationsMiikka Heikkinen2011-08-181-0/+4
| | | | | | | | | | | The graphics memory quota, which is a new feature in S60 5.4, now gets default value of 24MB. User can override the default value using RSS_RULES: RSS_RULES += "graphics_memory=<# of kB>;" Task-number: QT-4963 Reviewed-by: Sami Merila
* Doc: Fixed shader program snippet.David Boddie2011-07-191-2/+2
| | | | | Task-number: QTBUG-18982 Reviewed-by: Kim Motoyoshi Kalland
* Provide the resetInternalData slot to cleanly reset data in proxy subclasses.Stephen Kelly2011-06-271-0/+35
| | | | | | | | | | | Direct subclasses of QAbstractItemModel are unnaffected as they can update internal data in a slot connected to the sourceModel's modelReset signal or layoutChanged signal. Rehabilitated for 4.8. Should be reverted again in Qt 5. Reviewed-by: gabi Merge-request: 694
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-133-44/+44
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Removing the "resetInternalData" slot in QAbstractProxyModelGabriel de Dietrich2011-04-261-35/+0
| | | | | | | | | This reverts commits 0916a68056154ecb60e4ea2c79726ab2e49b1532 and 6f1384fcbeea993d5be47590c696de60215b7608. This effectively reverts most of MR 694. Reviewed-by: Olivier
* Merge branch 'master-upstream'Thierry Bastian2011-04-19157-2951/+5307
|\
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-04-07155-2951/+5175
| |\ | | | | | | | | | | | | Conflicts: src/corelib/thread/qthread_unix.cpp
| | * Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-051-0/+24
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add branch prediction macros Add methods for traversing and combining QProcessEnvironment. Handle the HTTP 418 reply properly in QNAM absorb translations.pri into translations.pro let generated flag control SQL generation Add version attributes as per ODF specification
| | | * Add branch prediction macrosAlberto Mardegan2011-04-041-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Q_LIKELY and Q_UNLIKELY macros which instruct the compiler on which branch of an "if" statement is more likely to happen. The current patch only supports GCC's __builtin_expect(). Merge-request: 2580 Reviewed-by: ossi
| | * | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-31154-2951/+5151
| | |\ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| | | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7David Boddie2011-03-221-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/examples/qml-examples.qdoc
| | | | * Merge branch 'backporting-symbian-armcc-to-4.7' into s60-4.7axis2011-03-141-2/+2
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf
| | | | | * Renamed the symbian/linux-* mkspecs to symbian-*.axis2011-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done for a number of reasons: - In order to get better consistency with the other mkspecs, which have the target system name followed by a hyphen and the compiler name. - There is no real reason why we should have specific mkspecs for compiling Symbian under Linux, when it is equally likely to work under other operating systems. RevBy: Thomas Zander Conflicts: src/s60main/s60main.pro
| | | * | | Doc: Fixed snippet documenting QMetaObject::classInfoThorbjørn Lindeijer2011-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can't use Q_OBJECT without inheriting from QObject. Reviewed-by: David Boddie
| | | * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7Geir Vattekar2011-02-241-3/+4
| | | |\ \ \
| | | | * \ \ Merge commit 'refs/merge-requests/1108' of git://gitorious.org/qt/qt into ↵David Boddie2011-02-231-3/+4
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge-requests/1108 Conflicts: doc/src/declarative/basictypes.qdoc
| | | * | | | Doc: Fixed snippet bug in QPen class docsGeir Vattekar2011-02-241-1/+1
| | | |/ / / | | | | | | | | | | | | | | | | | | Task-number: QTBUG-17556
| | | * | | Doc: Fixed handling of versioned properties and added documentation.David Boddie2011-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-13451
| | | * | | Doc: Fixed broken snippets.David Boddie2011-02-174-0/+322
| | | | | |
| | | * | | Doc: Fixed a example deployment script.David Boddie2011-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-6467
| | | * | | Doc: Snippet quoting and other documentation fixes.David Boddie2011-02-091-76/+76
| | | | | |
| | | * | | Doc: Ensured that code snippets have appropriate file names.David Boddie2011-02-08148-2862/+4739
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps them to be marked up correctly in cases where code markers are available.
| * | | | | network API: add support for HTTP multipart messagesPeter Hartmann2011-03-222-0/+132
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds two new classes, QHttpPart and QHttpMultiPart, and two new overloads to QNetworkAccessManager: post(const QNetworkRequest &request, QHttpMultiPart *multiPart) and put(const QNetworkRequest &request, QHttpMultiPart *multiPart). With those classes, it is possible to do a HTTP POST with a multipart message in a memory-saving way: The data from the parts is not copied when read from a file or another QIODevice. Reviewed-by: Markus Goetz Task-number: QTBUG-6222
* | | | | Fix licence headers again for MR 900Sergio Ahumada2011-04-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See commit b00089261eafbdf5f92ed94d7fb20b402bfcaeb2 Reviewed-by: Gabriel de Dietrich
* | | | | Add the QIdentityProxyModel.Stephen Kelly2011-04-121-0/+66
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older commit history is in KDE svn: http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log Ammended to update the license headers. Merge-request: 900 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* | | | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-02-171-3/+4
|\ \ \ \ | | |/ / | |/| |
| * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-02-171-3/+4
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Remove sqlite3.sis from qt.sis.
| | * Remove sqlite3.sis from qt.sis.Miikka Heikkinen2011-02-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Nokia Content Signing doesn't like embedded sis packages, so remove the embedded sqlite3.sis from qt.sis. It must now be installed separately just like Open C packages. Task-number: QTBUG-17399 Reviewed-by: axis
* | | Merge branch earth-team/master into earth-stagingJoão Abecasis2011-02-161-0/+12
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc