summaryrefslogtreecommitdiffstats
path: root/examples/embedded
Commit message (Collapse)AuthorAgeFilesLines
* Port two examples from QTime to QElapsedTimerAlbert Astals Cid2019-09-272-9/+9
| | | | | Change-Id: I23d13bf1e909801797a8fc2785c46f341ef5ee77 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Remove usages of Q_OS_WINCEJoerg Bornemann2019-05-231-4/+0
| | | | | | | | | | | This platform is history. Change-Id: Iddfab008a509f4828c321730414c8204055cf7af Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Examples: cleanup foreach usageChristian Ehrlicher2019-02-021-5/+6
| | | | | | | Replace deprecated foreach macro with range-based for loop Change-Id: If919ba1d1d4acddfc1c5460ce7aebf8c49e3ac38 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Examples: Remove remains of winceFriedemann Kleint2017-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60628 Task-number: QTBUG-60633 Task-number: QTBUG-60635 Task-number: QTBUG-60641 Task-number: QTBUG-60659 Change-Id: I9ffc3e25893d2281b19cc12b70e1a92fb2a8b708 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Call sinh() rather than implementing it using exp()Edward Welbourne2017-07-071-1/+1
| | | | | | | | | | | | Change-Id: I8dda2f94524b19bcdec640e7541b04d46a6c3941 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-051-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Be (somewhat more) consistent about the value of piEdward Welbourne2017-06-202-12/+1
|/ | | | | | | | | | | | | | | | | | | | Use M_PI (and friends), where possible, in favor of hand-coded approximations of various (in)accuracies. Where that's not available (e.g. fragment shaders), use the same value that qmath.h uses for M_PI, for consistency. Replaced math.h with qmath.h in places that defined a fall-back in case math.h omits it (it's not in the C++ standard, although M_PI is in POSIX); or removed this entirely where it wasn't used. Reworked some code to reduce the amount of arithmetic needed, in the process; e.g. pulling common factors out of loops. Revised an example's doc to not waste time talking about using a six-sig-fig value for pi (which we no longer do) - it really wasn't relevant, or anything to be proud of; nor did the doc mention its later use. Task-number: QTBUG-58083 Change-Id: I5a31e3a2b6a823b97a43209bed61a37b9aa6c05f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* examples: remove some unneeded QStringRef::toString() callsMarc Mutz2017-04-071-6/+5
| | | | | | | | | | - when appending to another string - when just comparing - when just calling toInt() Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Example: migrate flightinfo to QRegularExpressionSamuel Gaist2017-02-151-3/+3
| | | | | | | | Update the flightinfo example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I2395b37170565e922500e675210c400e90ae0f73 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Updated license headersJani Heikkinen2016-01-2116-264/+536
| | | | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: I3ad61caaf07802eb9da7d29eca3fe49d8a51b6a8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Examples/Doc snippets: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | Use character literals where applicable. Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* examples: migrate to QString::asprintfMarc Mutz2015-02-121-3/+2
| | | | | | | | Not that many, if any, uses of sprintf here were idiomatic Qt, but that's for another commit. Change-Id: Ic34470d9799942f786770ba9541b29c34d67c6f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-1116-113/+113
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-2416-304/+176
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove references to Nokia in qtbase examples.Friedemann Kleint2013-07-112-3/+3
| | | | | Change-Id: I0d4a309bc7f92e1ad2c7465bfb2d677c91e6d818 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge branch 'release' into stableSergio Ahumada2013-01-311-0/+2
|\ | | | | | | Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
| * push feature conditionals down to subdirectoriesOswald Buddenhagen2013-01-311-0/+2
| | | | | | | | | | | | | | | | | | the top-level project is not installed, and the meta-project which is used instead does not know anything about conditionals. Task-number: QTBUG-28414 Change-Id: Id5785ab5f92373ece74699e3c28220fc7f9689ac Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Update copyright year in Digia's license headersSergio Ahumada2013-01-1816-16/+16
|/ | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-172-2/+3
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove QT+=widgets from SUBDIRS projectsOswald Buddenhagen2012-12-171-2/+0
| | | | | | | it makes no sense whatsoever Change-Id: Ica7c764575079a12512ee2eb62a995ebbefa09a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-297-23/+6
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-267-13/+13
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Use organization name "QtProject" in examples.Friedemann Kleint2012-10-161-2/+2
| | | | | Change-Id: Ibbe9517ccf81d25eccbdff98f7cfe8ff6ec485d2 Reviewed-by: hjk <qthjk@ovi.com>
* Fix compilation for Qt5: Avoid deprecated APIaavit2012-09-261-2/+1
| | | | | Change-Id: Iba11d33dd4d81ed1a460dd3237cd1bb9e1ace106 Reviewed-by: Jason Barron <jason.barron@digia.com>
* Compile fix: Avoid deprecated functionsaavit2012-09-261-6/+10
| | | | | Change-Id: Ia7592997640d51ed98fdfa1a5e59d35954a0ef61 Reviewed-by: Jason Barron <jason.barron@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2216-386/+386
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix digiflip example build.Janne Anttila2012-05-311-0/+2
| | | | | | | digiflip examples depends on qtwidgets, let's link to it also. Change-Id: I4f4434c747d143942909797491153a4f358e6fef Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-241-4/+1
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Symbian specific code from qtbase.Xizhi Zhu2012-01-311-4/+0
| | | | | Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3016-16/+16
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2316-16/+16
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-102-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0516-16/+16
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QtBase examples: Remove Maemo/Symbian-specific code.Friedemann Kleint2011-10-1814-87/+0
| | | | | | | | | | | | | | | - Maemo/Symbian are no longer supported and QWidget-based examples are no longer supposed to run on mobile platforms, so, remove any Maemo/Symbian or mobile-specific code from source files and profiles. - Remove Maemo/Symbian vibration examples. - Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate. Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Merge remote branch 'gerrit/master' into refactorSamuel Rødal2011-07-1215-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qicon.cpp src/gui/image/qicon.h src/gui/image/qicon_p.h src/gui/text/qfontdatabase.cpp src/plugins/platforms/wayland/gl_integration/qwaylandglwindowsurface.cpp src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp sync.profile Change-Id: Ie0a23a12177ff51bf562e15b2dd41f071afb19b4
| * Remove more references to demos.Casper van Donderen2011-07-0815-6/+6
| | | | | | | | | | | | | | Change-Id: I431184cd0534c86047706fdaa1045b2935de5d7a Reviewed-on: http://codereview.qt.nokia.com/1307 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
| * Remove references to QT_INSTALL_DEMOS & DemosPath.Casper van Donderen2011-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The distinction between 'examples' and 'demos' is completely blurred at this point. We've decided, with the SDK people, to scrap the existing terminology in favor of the word 'example' only -- distinguishing between code snippets, walkthroughs, "demonstrations" can be done via keywords or some other method. Removing QT_INSTALL_DEMOS from all .pro files in Qt is still in progress. Change-Id: I86fc0e40d54baa54c5641fc6acbd8b67e4ad2789 Reviewed-on: http://codereview.qt.nokia.com/1034 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | Merge remote-tracking branch 'base/master' into refactorJørgen Lind2011-06-2714-10/+14
|/ | | | | | | | | | | | | | | Conflicts: demos/demos.pro demos/embedded/digiflip/digiflip.pro examples/examples.pro examples/graphicsview/embeddeddialogs/embeddeddialogs.pro src/gui/kernel/qplatformglcontext_qpa.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp src/plugins/platforms/wayland/qwaylanddisplay.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp Change-Id: I2a4ec9e2ca9c9aa9d57b55f98985e810b77bb745
* Add the embedded demos-examples to the build.Casper van Donderen2011-06-246-16/+16
| | | | | | | Change-Id: Ib0a1e650913416e3ec05f1a86c139844a814f8bf Reviewed-on: http://codereview.qt.nokia.com/686 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Move all other demos in qtbase to examples.Casper van Donderen2011-06-2438-0/+4172
Change-Id: Iab0e7364d1f6b348d0e3033ea9304139f5bd6d0d Reviewed-on: http://codereview.qt.nokia.com/617 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie