summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Pass a parent pointer to the Animation instance to avoid memory leakJan Arve Sæther2022-09-162-3/+3
| | | | | | | | | | The leak is just on termination, but we should show good practices in our examples Change-Id: I39abb7545d3c68a1a537b865ba3fcb5e60c22fbf Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 30947c7fd4dddd76b69a3aa11567e27174d7a3ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Sliders: Add function that changes widgets position on layoutElias Hautala2022-08-152-5/+40
| | | | | | | | | | | | | | Changes the layout to QGridLayout and adds function to change widgets position on the layout depending on the windows aspect ratio. Before this the widgets wouldn't fit on screen when using the example on Android in portrait. Fixes: QTCREATORBUG-27685 Change-Id: I00009cb6c8c250a8333ac3dfa635f70da4576d5e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io> (cherry picked from commit 1a6019438881b9aa54cfc8dbd3f8fc06ddc35d67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Polish the model/view tutorial examplesFriedemann Kleint2022-08-0911-51/+55
| | | | | | | | | | | | | | - Reorder the class declarations, moving private sections last - Make constructors explicit - Add space to the comments - Introduce auto - Replace slot MainWindow::showWindowTitle() by a direct connection to slot QWidget::setWindowTitle(). Change-Id: Ic229162434dfef5f2767d0b4e186759ca0f821f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 8751ca3daeaa2a500a37b070cdcce5a5bb7a165f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Basiclayouts: Add scrolling to exampleElias Hautala2022-08-081-2/+17
| | | | | | | | | | | | Adds scrolling to basic layouts example because the user interface in the example doesn't fit properly on smaller screen sizes. Fixes: QTCREATORBUG-27634 Change-Id: I61e6eac2b28e5b3ff0f984894fe38167b3f46a9c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Markku Nokkala <markku.nokkala@qt.io> (cherry picked from commit 89ce9a1c5a29e3f420931baa88c705856b99ac25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Make sure qtbase examples are installed into the correct pathAlexandru Croitor2022-07-273-6/+6
| | | | | | | | | | | The find_package calls need to happen after we set INSTALL_EXAMPLEDIR to ensure that INSTALL_EXAMPLEDIR is overridden if necessary. Task-number: QTBUG-102879 Change-Id: I3c2e6c5a68a8c6ff9b98b79dbd6c83445d8da052 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 818a15234c8fb80cd9adad54bd726cf69726fa79) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* GroupBox example: port away from using deprecated QAction::setMenu()Ivan Solovev2022-07-151-3/+1
| | | | | | | | | | | We can achieve the same UI by using QMenu::addMenu() directly Task-number: QTBUG-104857 Change-Id: I627f21bc93646943cf6dfbd3b388352b84f73f0f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6db91c0df1900df2ddcd5abeb243b8852b02b7ab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* examples: add WindowStaysOnBottomHint into preview textLiang Qi2022-05-081-0/+2
| | | | | | | Change-Id: I1e4e390990fcb6e30b2ff7bb59168e4ffc01a936 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 43b779ab0462f85f9c2cce86ec2701f56306ac87) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Chip example: fix an accidental bool->int conversion when using PMF connectionsTang Haixiang2022-04-152-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example was refactored to use the PMF connection syntax. However this introduced a problem: when connecting a QAbstractButton to a slot that has a default parameter, the semantics of the connection change between string-based connections and PMF. Specifically: when connecting the QAbstractButton::clicked(bool checked = false) signal to a slot like View::zoomIn(int level = 1) then a string-based connection like connect(button, SIGNAL(clicked()), this, SLOT(zoomIn())) would call zoomIn without carrying the signal's parameter over. In other words, zoomIn's parameter is defaulted. The same connection using PFM instead is connect(button, &QAbstractButton::clicked, this, &View::zoomIn) which would "connect" the arguments. This makes emissions that pass false as clicked's parameter result in a zoomIn by 0. Fix it by avoiding the default parameter of zoomIn -- just split the function in two (zoomIn and zoomInBy). Amends 8cf812231405e011b422a1505d9a219618fe5cee. Fixes: QTBUG-100135 Done-with: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Change-Id: I10c150c648034449e3154140108de2d64326d965 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 7a7023b7b1693ceaafcbafb30d41fb3a4c820a90) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't build the movie example if the feature is disabledAlexandru Croitor2022-03-191-1/+3
| | | | | | | | Fixes: QTBUG-101897 Change-Id: Idef9aaa0c0a0380b88d8769cb19becd613b2173b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 4b7225c66211ae242cf6d8dc7624f5de95087b8d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use QDebugStateSaver in example operator<<()Kai Köhne2022-03-161-1/+2
| | | | | | | | | | | This makes sure that changes in the debug stream - like nospace() - do not "leak". Also use the example snippet in QDebugStateSaver documentation. Change-Id: I934976d2c7c2335abfec68c763526a5cbb0e6f1e Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9f5f64e9dbd916679bd881ee0331da9a3dacac32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* secure UDP server: do not use deprecated protocol (DTLS 1.0)Timur Pocheptsov2022-03-101-6/+0
| | | | | | | | | | | | | And also remove check for DtlsV1_2OrGreater for negotiated session protocol, since it must have been resolved to a specific protocol by this point. Fixes: QTBUG-100154 Change-Id: I3aec31faed8b9cb22be0062da057c62864eba34f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit bd6d6d92b5de98e4ad423492420f8f859f381824) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update Notepad tutorialLeena Miettinen2022-02-016-139/+92
| | | | | | | | | | Update to use Qt Creator 7.0 and CMake as the build system. Fixes: QTBUG-100075 Change-Id: I71e1d1446a2c79c98423ca5d4427b4b4eb00021b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit ec57418ecfc1bf7cfbc0dd7b33c899ce24b4a49d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* threadedqopenglwidget example: Split out class RendererFriedemann Kleint2022-01-269-310/+441
| | | | | | | | | | | | This makes the code clearer and decouples it from the GLWidget. As a drive-by, add a global shortcut to close. Change-Id: I3469d29bc367acc17c5f8acf9d46219259b8315b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit f172b964f6d9fc8cadeb7b5efeb3f59c0f8f16f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Remove unneeded CMake optionsKai Köhne2022-01-24236-905/+0
| | | | | | | | | | | | | | | | CMAKE_INCLUDE_CURRENT_DIR is not necessary anymore for moc since CMake 3.8: https://cmake.org/cmake/help/latest/release/3.8.html#other-changes CMAKE_AUTORCC should not be used anymore. Instead, we now use qt_add_resources() or similar Enable CMAKE_AUTOUIC only if .ui files are present. Task-number: QTBUG-87643 Change-Id: I835e2994cd5dba9918136999499b9077961b616c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 57402ffb9bb5baa89907b3f1a4ea8e9e77d9802d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Enable QStyle::State_Horizontal when initializing QStyleOptionProgressBarZhang Hao2022-01-211-1/+1
| | | | | | | | | | | | | Since by default QStyleOptionProgressBar is initialized with initialize QStyle::State_Horizontal, the example shouldn't overwrite the state, and instead OR other states into it. Otherwise, the progressbar will be laid out vertically. Fixes: QTBUG-100067 Change-Id: Ibebda48a297af4a621719673033f8199b8bc7984 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 60f21e96aeeda1e1b96b1abd91630a85ea5c1820) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* bindablesubscription: Remove duplicated file entryKai Köhne2021-12-241-1/+0
| | | | | | | Change-Id: I7f24425c8ccfb11bda926373099d377f808a70dd Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit c52fcb2ad9f4a1c166ac0438db3889b13d7f9270) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Remove unneeded target_include_directoriesKai Köhne2021-12-174-16/+0
| | | | | | | Change-Id: Icd97815ee231c34ad4ea5ab94a73bfc26df7e0ca Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 0c39e5c76d5a04b1e710d9038332dc21ad323bab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* analogclock example: Clean up link_librariesKai Köhne2021-12-171-5/+1
| | | | | | | | | analogclock doesn't use widgets. Change-Id: I75b5efc0bec786b45f8273e3d21c9be204e18225 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 4f699e82074b1928e0e9477759c9d5666cea662c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* mandelbrot example: Remove explicit linking against libmKai Köhne2021-12-172-8/+0
| | | | | | | | | It seems not needed anymore with modern toolchains. Change-Id: Ic5386cad4576b10f49fd74212f3514e26cfb0abe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e751c604dfc6c966b4e56b98b17de09d911d2192) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Clean up WIN32_EXECUTABLE, MACOSX_BUNDLE propertiesKai Köhne2021-12-1712-66/+0
| | | | | | | | | | | | | Both are FALSE by default, so no point in explicitly setting them to FALSE. In addition, dbus/listnames is a command line tool. No reason to set WIN32_EXECUTABLE, MACOSX_BUNDLE here. Change-Id: I99aaf27a0267c5575bd2ee5b6183991fce721f44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 131681652eb609a19eac963222c553442138ae12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* androidnotifier: Simplify example CMakeLists.txtKai Köhne2021-12-171-33/+35
| | | | | | | | | | Building the example when not on android makes little sense. Therefore just error out in this case. Change-Id: Ib7325156bcd8ffd1b9b3e67174d878f5731a4a4f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7cf8ecf4cedc0d85623e6838e01ca9fa5b618a24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix echoplugin example to be built as an external projectAlexandru Croitor2021-12-171-1/+1
| | | | | | | | | | | | | It was accidentally reverted as part of a different change. Amends 3c1125d9fe41332087ab6213a5514426109ead08 Task-number: QTBUG-90820 Change-Id: Id9b2650c7c42fd9f401cd2da3fcd60ed4d39d212 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit fc89d92150e41e0bb10ed15aec0d9020a895669c) Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Examples: Fix whitespace issues in CMakeLists.txtKai Köhne2021-12-16241-307/+730
| | | | | | Change-Id: I8e6dd1f250f8be6016ee4164cb2ab7034cbb1203 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 80a76df1784a135fa1d86ac88f8c4d2dc6bf8c35)
* Examples: Remove remaining conversion markers in CMakeLists.txtKai Köhne2021-12-15271-633/+47
| | | | | | | Change-Id: Ia5d474a3efd6aadbd0ef1537318f2f24e6c24fee Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 51f22a3a0495d8418a5d6dd0f09771c0347441b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Prefer unversioned commandsKai Köhne2021-12-1474-80/+80
| | | | | | | Change-Id: Ib32700ab82cf6b271c49e25d12fbad8c9c6bc1d1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 28a9d116bba00fde5aaa214bb7c929efc66af971) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2021-12-10238-755/+268
| | | | | | | | | Also consolidate several find_package(Qt6 ...) calls in one call. Task-number: QTBUG-98867 Change-Id: Idfd5e71f46d4489fac7411cbfadb84437a0658f3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Simplify pingpong/complexpingpong examplesKai Köhne2021-12-092-81/+21
| | | | | Change-Id: Iff9bf22c7aebc6a5f61cd7411a99ee2bbb11c12c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rasterwindow: Remove unneeded find_packageKai Köhne2021-12-061-2/+0
| | | | | Change-Id: Ia526f7603af98a6d450ff2465fd666d955772646 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Do not support Qt5 build in androidnotifier exampleKai Köhne2021-12-061-6/+3
| | | | | | | | We can expect that users use Qt 6 to try out Qt 6 examples. Pick-to: 6.2 Change-Id: Ifa7bd9471a712fa1d63107b7ff2d392b7aefdcfe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove .prev_CMakeLists.txtKai Köhne2021-12-0644-2270/+0
| | | | | | | | These are left-overs from the initial qmake2cmake conversion. Pick-to: 6.2 Change-Id: Ie15c9ff022ea4566d10c1ba74599de9af83d29a7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSystemTrayIcon example: ignore non-spontaneous QCloseEventShawn Rutledge2021-12-032-8/+5
| | | | | | | | | | Apparently this code is needed on other platforms now, not only macOS. Pick-to: 6.2 Fixes: QTBUG-98504 Change-Id: Ie0a7e38609e8fc8c11915784dd3652a3517bb639 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Repair parameter typeChunLin Wang2021-12-032-2/+2
| | | | | | | | | Fix the parameter types corresponding to the sample code and subclasses Fixes: QTBUG-98578 Pick-to: 6.2 Change-Id: I06e342ae1210ed53c5deec3e2711457cf2ac5b15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document the example showing the benefits of using bindable propertiesSona Kurazyan2021-12-0212-0/+267
| | | | | | | | | | | And mention the example in the bindable properties docs. Pick-to: 6.2 Task-number: QTBUG-97655 Change-Id: I676e90dbda66c2e718c7f6c2240fac608a8653df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add example showing the benefits of using bindable propertiesSona Kurazyan2021-12-0224-0/+1492
| | | | | | | | | | | | | Added two examples for modeling a subscription service: signal/slot connection-based and bindable property-based. The examples are based on the example from Fabian's Qt WS talk about the bindable properties. Pick-to: 6.2 Task-number: QTBUG-97655 Change-Id: I0345913b8b6e5c40b8477e128d36483598bdfcaa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* multistreamserver: fix compilationMarc Mutz2021-11-181-1/+1
| | | | | | | | | | | Instead of including <QIODevice>, use the correct 'nested name specifier', QIODeviceBase. Amends 8bd0a09475935cf33f6b7f63a898d4d2e6d43b17. Pick-to: 6.2 Change-Id: I077948b33f985cd4a2e3a9e591645cf20d7af91c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* multistreamclient example: fix compilationMarc Mutz2021-11-161-1/+1
| | | | | | | | | | | | | | Says GCC: qtbase/examples/network/multistreamclient/timeconsumer.cpp:85:37: error: incomplete type ‘QIODevice’ used in nested name specifier 85 | QDataStream ds(&buf, QIODevice::WriteOnly); | ^~~~~~~~~ Instead of including <QIODevice>, use the correct 'nested name specifier', QIODeviceBase. Pick-to: 6.2 Change-Id: Id8d87dbcb497e4feca1d5d3ce6b1bdb9da5c0dab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QScopedPointer to manage memoryTang Haixiang2021-11-041-1/+2
| | | | | | | | | | | Although the QBackingStore constructor takes a QWindow* as a parameter, it does not inherit QObject and doesn't become a QObject child of the QWindow. Use QScopedPointer to avoid memory leaks. Pick-to: 6.2 Change-Id: Ib065163a9149d002f8220a0257bd78549062c595 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Modify the target Square in the puzzleTang Haixiang2021-11-032-4/+4
| | | | | | | | | | | targetSquare judges which square the position falls in. The point scaling calculation method should not be used. The return value of QPoint operator/ will be rounded up. Modified to separate the x and y of position to calculate. Fixes: QTBUG-81842 Change-Id: I70375185a78ba47efe01be3fd490e0fb0f456e17 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix treemodelcompleter exampleJoerg Bornemann2021-10-271-3/+2
| | | | | | | | | | | | | | | | All nodes in the view were at the top level due to a spurious trimmed() call. The condition in the indentation calculation was flipped, leading to a segfault. Also, the input data does not contain tabs. Remove the condition that checks for tabs altogether. This amends commit 3fede6cb547b783377e833c9b269d4cecfe47e61. Fixes: QTBUG-97727 Pick-to: 6.2 5.15 Change-Id: Ic5068ead755c4dae5f0607724ac7704cce03227c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Add missing LIBRARY DESTINATION for examplesAlexey Edelev2021-10-203-0/+3
| | | | | | | Pick-to: 6.2 Fixes: QTBUG-97629 Change-Id: I5b32824693206926de9b4ee6637749a1814fdde7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Polish the painting/affine exampleFriedemann Kleint2021-10-167-299/+256
| | | | | | | | | | | | | | - Use member initialization - Remove C-style casts - Add space around operators - Use qsizetype for list indexes - Remove commented out debugging code Task-number: QTBUG-97095 Pick-to: 6.2 Change-Id: I11a17fa6e7f17968367a57291d83ee6fba731a34 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Support background-color CSS styling on <hr/>Shawn Rutledge2021-10-141-2/+7
| | | | | | | | | [ChangeLog][QtGui][CSS] The background-color style can now be applied to <hr/> to set the rule color. Task-number: QTBUG-74342 Change-Id: Ib960ce4d38caa225f258b6d228fb794cef43e1b7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove checks for C++ standard versions C++17 and belowIevgenii Meshcheriakov2021-10-011-9/+0
| | | | | | | | | | | Qt requires a compiler that support C++17 thus __cplusplus is always 201703L or higher. This patch removes checks for __cplusplus value that always succeed. Change-Id: I4b830683ecefab8f913d8b09604086d53209d2e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove .qmake.conf from this repositoryJoerg Bornemann2021-09-202-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This file was necessary for the qmake build and the CI. The qmake build is history, and the CI does now read .cmake.conf (see QTQAINFRA-4392). In addition to being superfluous, the existence of .qmake.conf triggers QTBUG-76140 when building Qt examples with qmake. Removing the file alleviates the symptoms of this bug. "Interestingly", to make the qmake build of examples work in the CI, we have to adjust the dbus examples to not use nmake inference rules. The absence of .qmake.conf results in a different order of inference rules in the Makefile, and nmake/jom pick up generated source files from the source dir. These are incompatible with the correct generated source files in the build dir. See QTBUG-96513 for details. Fixes: QTBUG-92271 Task-number: QTBUG-96513 Change-Id: I4076fae2eeb993956b54aced2c9c844ae2577a4a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Centralize RFC documentation-links in rfc.qdocLuca Di Sera2021-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | In the effort of repairing broken links as per QTBUG-96127, a series of RFC links referring to `tools.ietf.org/html/*` were modified to point to the new address that the site redirected to. To simplify executing a similar task and to diminish the duplication of manually inserted urls, the already existing `rfc.qdoc` file, containing `\externalpage` commands directing to RFC locations, was enhanced with links to all RFCs that were mentioned in the current documentation, so as to aggregate this common category of links. All links pointing to a `ietf` domain inside QDoc documentation blocks were then changed to use the newly provided external-references. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: I2a52eb6aa8c9e346f64ef1a627b039220d9f6c2a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* SQL browser example: fix typoTalent Gc2021-09-021-1/+1
| | | | | | | | | Both 'First name' and 'Last name' are two words, therefore the column names should be spelled 'FirstName' and 'LastName'. Fixes: QTBUG-96123 Change-Id: Iaf58442eba0bc5eb63dcde83ecdebdc4a3c658a5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Port to QImage and QPixmap deviceIndependentSize()Morten Sørvig2021-09-011-2/+2
| | | | | | | | | Replace the “size() / devicePixelRatio()” pattern with a call to deviceIndependentSize(). Change-Id: I9d9359e80b9e6643e7395028cd43e3261d449ae7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Create plugin initializers for static user pluginsAlexandru Croitor2021-08-2411-136/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we only created object library static plugin initializers for Qt plugins only, not user-project plugins. The reason was that if a user tried to install the plugin target via an export set, CMake would error out saying that the _init library is not part of the same export set. Introduce an OUTPUT_TARGETS option that would allow projects to get the name of the generated _init target, so they can install it if needed. This was already done for qt6_add_qml_module, so we just introduce the same option for qt6_add_plugin. Now user static plugins will have an _init target created, which will be propagated to consumers whenever the consumers link against the plugin itself. We also need an internal option to disable this propagation, because it's handled a bit differently for Qt plugins which can be linked either via finalizers or via usage requirements. Amends 91c65dd80cdd2de666448c14202c0c63718152b6 As a result of the implementation change, cleanup example projects to ensure that they build successfully (the important part is specifying the CLASS_NAME). Only plugandpaint works properly with both shared and static Qt builds. echoplugin works with a shared Qt build, but not a static one due to some assumptions in the C++ code about shared plugins. styleplugin doesn't seem to work properly neither with shared Qt builds nor static Qt builds, at least on macOS. But it builds fine. For some reason even if the plugin is found, the style is not applied. Amends 4caac1feea025b0ad496141e8f16ab88c04c2caa Pick-to: 6.2 Task-number: QTBUG-80863 Task-number: QTBUG-92933 Change-Id: I6f631cda9566229b7a63992b23d7d7fa50303eeb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-17239-241/+241
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I1270b4846d8a23bc3563b6942c0910e095d2be4a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve translations loading code in standarddialogs exampleFriedemann Kleint2021-08-061-7/+8
| | | | | | | Pick-to: 6.2 Change-Id: I799724b633f1b52675ca2aa69b22fdb678b84421 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>