summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Remove mention of permission api in http exampleAssam Boudjelthia2021-07-301-8/+0
| | | | | | Pick-to: 6.2 Change-Id: I8b22633e1ad5372f92f87315b7184a4b499a0a0b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename QPermission namespace to QApplicationPermissionAssam Boudjelthia2021-07-151-2/+3
| | | | | | | | Pick-to: 6.2 Task-number: QTBUG-94407 Change-Id: Ie9c05dbe498cd372c015b5125e6cb8d59ca96b59 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port all in-tree addAction() users from postfix to infix QKeySequenceMarc Mutz2021-07-143-13/+13
| | | | | | | The former is QT_DEPRECATED_SINCE(6, 4). Change-Id: I9e60639651b0832f1e3d3282d15dd0ab0b22d819 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QObject: optimize the common case of findChildren(QString())Marc Mutz2021-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outside tests, all in-tree callers of QObject::findChildren() pass no name to match, and in my experience that is also true for the vast majority of out-of-tree users. Avoid the temporary QString creation in the caller and the repeated QString::isNull() checks in the implementation by overloading findChildren() without a name argument and checking for name.isNull() only once, forking off into separate helper functions. Adjust in-tree callers that used an explicit `QString()` argument in order to pass options, which goes to show that `name` should never have been the first argument of findChilden() in the first place, even though I appreciate the symmetry with findChild() (the use-cases of which, however, are radically different). Change a `findChildren().size() == 0` call found while scanning for findChildren() calls to `!findChild()` as a drive-by. Modernize loops in the various qt_qFindChild{,ren}_helper() overloads to match how the new code looks. [ChangeLog][QtCore][QObject] Added findChildren() overload taking no name (thus optimizing this common case). Change-Id: Ifc56e5438023d079b40c67f11ae274a3e128ad5e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Android: trim down the examples manifests from obsolete tagsAssam Boudjelthia2021-07-011-62/+39
| | | | | | Pick-to: 6.2 Change-Id: I4a1fe025e59f724fb9aad8078198474f14d29feb Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Remove ministro codeAssam Boudjelthia2021-07-011-2/+0
| | | | | | | | | | | | | | Since Ministro no longer work on recent Android versions (Android 8+), and it hasn't been maintained and the repos are not updated, the existing code is practically a dead code. [ChangeLog][Android] Remove ministro code since it's been unmaintained and not working with recent Android versions. Task-number: QTBUG-85201 Pick-to: 6.2 Change-Id: I18d7b1e209cba3cfd04674060e9bf39aa5a5510f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Qt::PrintSupport is an optional component in the fontsampler exampleVolker Hilsheimer2021-06-151-0/+1
| | | | | | | | | If we don't find it we can't link to it, and then the example will never have any print functionality, in spite of having the UI. Pick-to: 6.2 Change-Id: Ib84be39a2655253c7d643520487adee054d5bd2d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use new permission api for http exampleAssam Boudjelthia2021-06-073-33/+6
| | | | | Change-Id: I265ec42205a193e9862eef26e73805bbf4188640 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move notification example from androidextras to qtbaseAssam Boudjelthia2021-06-0422-1/+613
| | | | | | | | | | | | Refactor android notification example to fit in qtbase. The example demonstrates how to use JNI and work with Java APIs and add custom Java code to a Qt app targeting Android. Task-number: QTBUG-84382 Change-Id: I5fcbbf77b36eb47a0acaa13835ef3d773e63885c Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Regular Expression example: Brush up and add a way to preview replacementsFriedemann Kleint2021-06-013-27/+99
| | | | | | | | | | | | - Set a fixed font on text edits so that parentheses stand out - Rearrange the layout to have the text at the top be prevent long texts from being wrapped - Add a replacement field where one can exercise replacement with the \1, \2... placeholders. Pick-to: 6.1 Change-Id: I140a62e1fb2cd1c6bfe02a2f01b7f06a6f3b5eb2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* vulkan: Update legacy tests and examples to the modern validation layerLaszlo Agocs2021-05-315-66/+5
| | | | | | Fixes: QTBUG-88388 Change-Id: Ib072f203ada5d692dea8d35da2b24db0deac0297 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Build examples in isolated sub-builds using ExternalProjectCraig Scott2021-05-2647-267/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Examples are intended to show how to build against an installed Qt. Building them as part of the main build means the way the Qt targets are defined and created are not representative of an end user's build. By building them as separate projects using ExternalProject, we can more closely replicate the intended audience's environment. This should allow us to catch more problems earlier. Having examples built as part of the main build also creates problems with some static builds where a tool built by the main build is needed during configure time. This happens with other repos like qtdeclarative but not (currently) with qtbase. Converting the examples in qtbase to be built using ExternalProject is intended as a demonstrator for how other repos can do similar. Until other repos are converted, they will continue to work as they did before, with examples as part of the main build for non-static builds only. The new build-externally behavior is only supported for non-prefix builds with this change. Prefix builds will continue to use the old non-external method. Support for building examples externally in prefix builds will be a separate change. Task-number: QTBUG-90820 Fixes: QTBUG-91068 Change-Id: I2304329940568dbdb7da18d54d5595ea7d8668bc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Small fix to the notepad exampleFriedemann Kleint2021-05-184-68/+28
| | | | | | | | | | | - Remove misleading note about setCentralWidget() - Connect copy/paste and undo/redo directly to the QTextEdit instead of routing them via window - Add the missing "About" menu - Check for reject of QFileDialog Change-Id: Ia7457fbedd762028bf2bcde99dfcfb50bbc97f1d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-1810-1400/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Brush up the text edit exampleFriedemann Kleint2021-05-182-82/+67
| | | | | | | | | | | | | | - Use initializer lists - Use u instead of QLatin1String() - Fix some clang warnings about else after return, constFirst() - Streamline code - Remove slot TextEdit::printPreview() which is not needed - Rename variable fileName to pdfFileName in filePrintPdf() to disambiguate from this->fileName Pick-to: 6.1 Change-Id: I377ebfd13487470b6f8eaf568dd5d99354f761f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix build of standalone painting examplesJoerg Bornemann2021-05-177-13/+18
| | | | | | | | | | | Since commit f5c69a51956 the examples/widgets/painting examples could not be built standalone anymore. Move the find_package calls out of the examples/widgets/painting/shared subdirectory and add a .cmake file that can be included to use the library conveniently. Change-Id: I35cb5bd8419a67c782d109104c4a88d64477a8be Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing PNG file to CMakeLists.txt of richtext/textedit exampleJoerg Bornemann2021-05-142-0/+4
| | | | | Change-Id: I3532646d16c14585f8800a16d3032535bc6a30a6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Style sheet example: Fix doc url for Qt 6Friedemann Kleint2021-05-081-2/+4
| | | | | | Pick-to: 6.1 Change-Id: I5c66b472b1687eec0ed1109ce2723d747b1a4193 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Support CSS text-decoration-color in underlines, overlines, strikethroughShawn Rutledge2021-05-075-0/+19
| | | | | | | | | | | | Also add a feature to the textedit example to set this value. [ChangeLog][QtGui][CSS] The CSS text-decoration-color attribute is now supported in rich text spans with underlines, overlines and strikethrough. Fixes: QTBUG-82114 Task-number: QTBUG-39617 Change-Id: I0065cb5431833da55b0f503ce7ff2b83b74b718a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Re-work the CMake project files for the plugandpaint exampleJoerg Bornemann2021-04-275-105/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the project prelude to examples/widgets/tools/plugandpaint/CMakeLists.txt to mark it as the entry point of the example project. Remove the project prelude from all its subdirectories, because the subdirs are not supposed to be built separately. Remove the wrong code that pro2cmake generated for the application's project file. That merely tried to link the basictools static plugin. Move common initialization code (CMAKE_AUTO*, INSTALL_EXAMPLESDIR) to the top-level plugandpaint project file. Remove superfluous CMAKE_INCLUDE_CURRENT_DIR. Set the output directory of the extrafilters plugin to the application's build directory such that the app can find the plugin without having to install the example. Skip regeneration in those files, to avoid scattering the project files with special case markers. Fixes: QTBUG-87449 Fixes: QTBUG-91066 Change-Id: I3ceb08f5fcda1ffea3c35cee8580f7b5e4ecfc1f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Fix build error issue in examplesJukka Passi2021-04-271-1/+5
| | | | | | | | | | Added branching to plugandpaint example to get correct library architecture to the build Fixes: QTBUG-56322 Pick-to: 5.15 Change-Id: I4d0eb4e24681642991d08c3dd2bad73d10caf962 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Rewrite the fetchmore exampleFriedemann Kleint2021-04-235-55/+89
| | | | | | | | | | | | | - Start in root folder so that large directories (/bin/, Windows) are easily reachable - Remove the line edit and navigate by double clicking instead since this is more in line with expectations - Use a QPlainTextEdit for logging - Make the log message more informative - Add icons Change-Id: Ia3cd7fc143efef80772923291f0b711913aa47be Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Port example away from deprecated QTextCharFormat APIVolker Hilsheimer2021-04-231-1/+1
| | | | | | Change-Id: I1d62f14f9e64f14809bdced4e5d906979034cbdc Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Avoid divide-by-zero in the gradients exampleShawn Rutledge2021-04-191-0/+2
| | | | | | | | | | | After 7a738daa97436478a21b5dd31ba2312b2cb2df41 we require QLineF::setLength() to take a finite length, and this code was probably always risky when HoverPoints has two points that are both 0,0. It's probably a transient condition anyway. Fixes: QTBUG-92908 Change-Id: If81122d2f78761026b0d656ceffe173132751317 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Port examples away from deprecated QTouchEvent APIsVolker Hilsheimer2021-04-175-35/+35
| | | | | | | Use the QEventPoints API instead. Change-Id: I7310fd34df110cad508f6188a41ad452a3cf848d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge integration refs/builds/qtci/dev/1618592683Qt CI Bot2021-04-161-1/+1
|\
| * Fix call to QMessageBox::informationVolker Hilsheimer2021-04-161-1/+1
| | | | | | | | | | | | | | | | | | The call assumes two arguments for QString::arg, but only one was passed. The error string became a buttontext argument, which is clearly wrong. Task-number: QTBUG-92483 Change-Id: I1fab5be88331f636185693b721f0d9688c0d9ff3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge integration refs/builds/qtci/dev/1618585460Qt CI Bot2021-04-161-1/+1
|\ \ | |/ |/|
| * Port example away from deprecated QVariant APIVolker Hilsheimer2021-04-161-1/+1
| | | | | | | | | | Change-Id: I284610f216409b593d307b8076c8f638722929e6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Revise deprecation of countriesForLanguage()Edward Welbourne2021-04-161-5/+9
|/ | | | | | | | | | | | | | | | | It was originally marked \obsolete without any comment on what was to be used to replace it, or deprecation markings in the declaration, so it got missed at 6.0. More recently it's been deprecated in favor of a territory-based name; but actually it was obsoleted by (iterating the territory() of each return from) matchingLocales() in Qt 4.8. So back out of adding territoriesForLanguage to replace it and, instead, mark it as deprecated in the declaration, in favor of matchingLocales(). Also rewrite the implementation to be exactly that replacement. Rewrote the one example using it. Fixes: QTBUG-92484 Change-Id: Iedaf30378446dd9adac5128b7ee5fee48aab1636 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add the "Territory" enumerated type for QLocaleJiDe Zhang2021-04-152-11/+10
| | | | | | | | | | | | | | | | | | | The use of "Country" is misleading as some entries in the enumeration are not countries (eg, HongKong), for all that most are. The Unicode Consortium's Common Locale Data Repository (CLDR, from which QLocale's data is taken) calls these territories, so introduce territory-based names and prepare to deprecate the country-based ones in due course. [ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for its Country enumeration, and associated territory-based names to match its country-named methods, to better match the usage in relevant standards. The country-based names shall in due course be deprecated in favor of the territory-based names. Fixes: QTBUG-91686 Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Brush up the mandelbrot exampleFriedemann Kleint2021-04-145-12/+77
| | | | | | | | | | | | | | | | | | | The example refines the image by running a number of passes with increasing number of iterations, which is not really visible to the user. Set an informational text string on the generated image which provides this information along with the elapsed time. The idea is to do the same to the corresponding Qt for Python example to have some sort of speed comparison for number crunching. Add a command line option for the number of passes. Make the window a bit larger to accommodate the information. Change-Id: I2afc1009ab53b580123d82a6aa645d9ffaa63ea2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* standarddialogs example: Fix font handlingFriedemann Kleint2021-04-071-1/+7
| | | | | | | | | | The example crashed since it passed the font label text (which receives the font key) to the QFont constructor taking the family list. Use QFont::fromString() instead. Pick-to: 6.0 6.1 Change-Id: I499fc9200b4d817b10c946a7b79ede4e7f7e69af Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix Editable Tree Model example model rowCount and model instance leakSamuel Gaist2021-03-292-1/+4
| | | | | | | | | | | | | The rowCount method has been fixed to correctly pass the "Common error test #3: the second column should NOT have the same children". It also fixes the model being leaked. Fixes: QTBUG-92178 Pick-to: 5.15 Change-Id: If92973e6f83ea9a2715bd335269f6e50d80f52c6 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Remove unnecessary int() casting in QRandomGenerator::boundedThiago Macieira2021-03-175-12/+12
| | | | | | | | | Commit 21d39168170c6833512c4a5f53985272741bd7e7 added the 64-bit version, so qsizetype now works cross-platform. The casts were added to make qtbase compile on commit df853fed66d891077ae2d04ecfa171d7e2cd5202. Change-Id: I26b8286f61534f88b649fffd166c409c5c232230 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix various documentation issuesTopi Reinio2021-03-161-3/+3
| | | | | | | | | | - Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* imageviewer example: Show the color space description when loadingFriedemann Kleint2021-03-051-2/+5
| | | | | | Change-Id: If9939676f29b9bbb43d698fb12efc42757e5c659 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Brush up the imageviewer exampleFriedemann Kleint2021-03-012-4/+5
| | | | | | | | | | | - Fix the save as file dialog being in "Open" mode by setting acceptMode - Fix clazy warnings about detaching QList by using constFirst() - Fix clazy warning about passing a context to slot connection Pick-to: 6.0 6.1 5.15 Change-Id: I0c800e9829e118fcec477322aa2a13660e3b51d2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix CMake build of network/torrent exampleJoerg Bornemann2021-02-155-77/+3
| | | | | | | | | | | | | | | | | | | | | | | | The ui_XXX.h include did not match the location of the XXX.ui file, and AUTOUIC failed with "SRC:/addtorrentdialog.h" includes the uic file "ui_addtorrentform.h", but the user interface file "addtorrentform.ui" could not be found in the following directories "SRC:" While this could be fixed by adjusting the include paths properly, this would complicate the CMake project file, and we're dealing with an example where needless complexity would cloud comprehensibility. Move the .ui file next to corresponding source files instead. This removes the need for any special cases in CMakeLists.txt, and we can remove .prev_CMakeLists.txt. Fixes: QTBUG-87457 Pick-to: 6.1 Change-Id: Ic2dec5ded7100e22d5afc571efc4b009bc62e41c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix deprecated API in network/torrent exampleJoerg Bornemann2021-02-151-1/+1
| | | | | | Pick-to: 6.1 Change-Id: Ie4493f0d93cdeff281c3826d2ca3beb4e68d7a0f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* dirview example: Show file icons on WindowsFriedemann Kleint2021-02-131-0/+2
| | | | | | | | | Use QFileIconProvider from QtWidgets. Pick-to: 6.0 Task-number: QTBUG-66177 Change-Id: I22db2f8671c64d90c45ff7160af9a6925d1cecea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Turn off the dbus examples for qmake-generated VS projectsJoerg Bornemann2021-02-091-1/+3
| | | | | | | | | | They cannot be built due to QTBUG-91033. Task-number: QTBUG-91033 Fixes: QTBUG-88758 Pick-to: 5.15 Change-Id: I6f75cac1b20208c7813addd1ebe578c9edae295a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove QtDBus includesDavid Skoland2021-01-126-31/+39
| | | | | | | | | | | | | | Per the discussion of QTBUG-88831, we determined that module-wide imports are unfortunate, especially for compile times. Following this, all QtDBus includes have been replaced with the headers for the classes actually used in each file. Additionally, some cleanup of header file order and format has been performed in the changed files. Pick-to: 6.0 Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>