summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Re-generate various CMake projects and configure after mergeSimon Hausmann2020-03-162-0/+4
| | | | | Change-Id: I02f5926c6664aab518c5c81e0c33dca0818a1871 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Simon Hausmann2020-03-1611-38/+77
|\
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-1611-38/+77
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| | * Mandelbrot Example: Use High DPI scalingFriedemann Kleint2020-03-125-21/+47
| | | | | | | | | | | | | | | | | | | | | Create the pixmap with a device pixel ratio set. Change-Id: I7f7e90aec4d117304852f050be70e14a0c6bf69d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-116-17/+30
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary.cpp src/corelib/plugin/qlibrary_unix.cpp src/corelib/plugin/qpluginloader.cpp Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
| | | * examples: Fix build for configurations that do not have printsupportOliver Wolff2020-03-056-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | printsupport features are only available if the module is available for the configuration. Every printer feature check has to be coupled with a check for the module itself. Change-Id: Id2ca84e71d5d74463d0ff35e8b18b252a779a883 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-162-2/+2
|/ / / | | | | | | | | | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-03-1110-33/+40
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-1110-33/+40
| |\| | | | | | | | | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| | * | Polish the Mandelbrot ExampleFriedemann Kleint2020-03-103-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings about float constants and comparison. Use member or constructor initialization. Introduce some const for clarity. Use Qt_CONFIG. Task-number: QTBUG-81254 Change-Id: I71a6ebfba397c0f8e1dd2e61167233c8e5c137af Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | Add default arguments to QPainterPath methods using transformJarek Kobus2020-03-065-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82602 Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Doc: Let SQL Drill Down example show correct use of qgraphicsitem_castPaul Wicking2020-03-062-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For qgraphicsitem_cast to work correctly with custom items, one must reimplement the type() function for each custom QGraphicsItem subclass. Do that in the example code. Fixes: QTBUG-7357 Change-Id: Ibf221817908355f0347cddfc46747b6955958f5f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | QtConcurrent::run: accept more then five function's argumentsVitaly Fanaskov2020-03-111-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run has the following signatures: run(Function &&f, Args &&...args) and run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member pointer, the first argument of args should be an object for which that member is defined (or a reference, or a pointer to it). See the documentation for more details. Fixes: QTBUG-82383 Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-0422-15/+97
|\| | | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| * | Examples: add scrollbar to allow viewing all options on AndroidAssam Boudjelthia2020-03-032-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is most relevant for Android for affine and gradients examples. Currently, if the screen size is small the settings will show cramped and not usable. Thus, adding a scrollbar to fix that. Task-number: QTBUG-80717 Change-Id: Ic25460e5ce37a5c53bbcae48e11b6b787c45e999 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Examples: enable HighDPI scaling for examples on AndroidAssam Boudjelthia2020-03-0316-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | These examples show very tiny UI elements on Android devices, thus enabling HighDPI. Task-number: QTBUG-80717 Change-Id: I813801d5249dc1fcfc6f61a8d146f60dd19901f6 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | QNetworkReply: Deprecate 'error' signal, use 'errorOccurred' insteadMårten Nordheim2020-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QNetworkReply::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I4f1ef410fd22d34ddf87e89cc5709cc60703af95 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Examples: use QDialog::showMaximaized() for AndroidAssam Boudjelthia2020-03-033-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Examples that use QDialog as main window should be maximized on Android to avoid a black view on most of the screen. Task-number: QTBUG-80717 Change-Id: I933c1a01d95d53da009c190c37fa32f27be5af5e Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-039-10/+12
|\| | | | | | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * | Docs: Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-289-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Applied suitable wrapping round various char and string literals, since docs are meant to show best practice. Change-Id: Ie061905fad26f9b4dda3eedba4612704f0a19126 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-2819-26/+57
|\| | | | | | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * | Revert "QNetworkReply: deprecate the 'error' getter"Alexander Akulich2020-02-287-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccb2cb84f535b0bfce19a95d7f3a36803480cae8 and commit 0f568d0a671e9f0667a1b47ffa6fbb9f7a10d9f5. The patches fix ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commits to keep the getter as is and change the signal name instead. Change-Id: Iddbab7c33eea03826ae7c114a01857ed45bde6db Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' insteadAlexander Akulich2020-02-277-13/+11
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Examples: request Android storage permissions when using QStandardPathsAssam Boudjelthia2020-02-262-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | http example uses QStandardPaths, on Android permissions might need to be explicitly requested to write the downloaded file. Task-number: QTBUG-80717 Change-Id: Icd377254ad77cac661c5ae37e9081e0463493d8b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Revert "QAbstractSocket: deprecate 'error' member-function"Alexander Akulich2020-02-263-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-2621-2250/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * | Remove bearer management from remaining network examplesMårten Nordheim2020-02-196-139/+9
| | | | | | | | | | | | | | | | | | | | | | | | Because bearer management is going away Change-Id: I60439c1714e0350b0f2bbef6afc8d2015886135f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Remove the bearermonitor exampleMårten Nordheim2020-02-1910-2012/+0
| | | | | | | | | | | | | | | | | | | | | | | | Because bearer management is going away Change-Id: I64311895c347b3e63df75d10db1673bcfe54f52d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Remove usage of bearer management from lightmaps exampleMårten Nordheim2020-02-192-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | Because bearer management is going away Change-Id: I82f2e67a052fdcdf0dde337f9f69b414681511c4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-181-5/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlinkedlist.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
| | * Doc: remove link to Qt Quarterly in examplePaul Wicking2020-02-141-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quarterly 31 was the last edition of Qt Quarterly to be published exclusively as a PDF. We cannot fix the typo in the PDF. As the content is >10 years old an in an unmaintained archive section, remove the reference to it from this example. Fixes: QTBUG-81972 Change-Id: I41a82487ff89dbe8ea5701c02c51e7f7c79bf73d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Deprecate QTabletEvent::device() in favor of deviceType()Shawn Rutledge2020-02-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to reserve device() to return a pointer to a QInputDevice in the future, which is in sync with QQuickPointerEvent::device() and with QTouchEvent::device(). Change-Id: Ifda6e8aea72d5121955b31bdcbd91bf1bfa4cec4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove legacy OpenGL examplesJohan Klokkhammer Helsing2020-02-2156-5290/+0
| | | | | | | | | | | | | | | | | | | | | | | | They all used QGL (which has been removed). Task-number: QTBUG-74408 Change-Id: Ied003625f14228b4951002a604fce91eaccec102 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Move QOpenGLShaderProgram from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-207-5/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: I20dfafc0c9bf8e2b68b03e171d70c2cb4ad2bfaf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Docs: Remove traces of QGLJohan Klokkhammer Helsing2020-02-203-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The QGL* classes have been removed and the examples ported to QOpenGL, update the documentation to reflect that. Task-number: QTBUG-74408 Change-Id: Ibb4787cdeedc05a807d673943b61838f19092234 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | QComboBox: remove currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-1910-20/+20
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-81913 Task-number: QTBUG-81845 Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Move QOpenGLWidget from QtOpenGL to its own moduleJohan Klokkhammer Helsing2020-02-1815-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets. Task-number: QTBUG-74409 Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Move QOpenGLFrameBufferObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-171-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: I817ea6f052fc61a6465d443450c8017ac5d0c0e9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-142-10/+4
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-132-10/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt Hopefully final merge from wip/cmake, and then all cmake changes should target dev directly. Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
| | * | | Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-122-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | QtSql: remove compat SQL plugin namesChristian Ehrlicher2020-02-131-7/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the compat SQL plugin names (QMYSQL3, QOCI8, QODBC3, QPSQL7) since they are not needed and just confuse the user [ChangeLog][QtSql] The compat plugin names QMYSQL3, QOCI8, QODBC3 and QPSQL7 are no longer available. Change-Id: I6d88f449ef3e18881a6970fb374ba0ab074ef302 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-1327-47/+53
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * | Deprecate one overload of QInputDialog::getDouble() for 5.15Jan Arve Sæther2020-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | ...and merge the two overloads of getDouble() in Qt6 Change-Id: I55faa2ff222b41e48889a0ef14dd00a6da691c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' insteadv5.15.0-alpha1Alexander Akulich2020-02-111-2/+1
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Remove unused variableJan Arve Sæther2020-02-101-1/+0
| | | | | | | | | | | | | | | Change-Id: I774b1647eff5fcfa0de5bcc50ca2638644b03613 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-0421-33/+39
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| | * Markdown importer: use Unicode decodingGiuseppe D'Angelo2020-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given we feed UTF-8 data into the importer, it must be able to cope with Unicode. Build md4c with UTF-8 support, advertise it at usage site, and change a couple of broken decodings. Driveby: the textedit example used the wrong codec to decode a Markdown file. While the Markdown spec doesn't deal with encodings, using the default one for HTML is certainly wrong. Port the loading of both markdown and plaintext to UTF-8, as that what _saving_ via QTextDocumentWriter would use by default. Change-Id: I51c6214cfe45ebfc5a67a7366f7866a5328366ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Examples: fix compile without printsupportChristian Ehrlicher2020-01-3110-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking for QT_CONFIG(printdialog) is not enough when printsupport is completely disabled since then the macro will throw an error. Therefore add an additional check 'defined(QT_PRINTSUPPORT_LIB)' before using the QT_CONFIG macro. Fixes: QTBUG-81626 Change-Id: Ie9898f057cdd6bf9daf4ba9135987cb6e901e7bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>