Commit Graph

13 Commits

Author SHA1 Message Date
Volker Hilsheimer 94109a8f95 Replace QImage::mirrored with QImage::flipped in rendercontrol example
Change-Id: I09e1ddc335ea77a6d15dcb160e58ab01919ceee1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-12-02 17:24:22 +01:00
Shawn Rutledge 5e69fed692 Fix warnings in rendercontrol_rhi example
Task-number: QTBUG-130991
Pick-to: 6.8 6.8.1
Change-Id: Ie2afcc693ef13ab482229e77e62514183675e9e7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-11-12 13:55:13 +01:00
Fabian Kosmale 2a32ec77c0 examples: Consistently require Qt 6.8
This prevents policy warnings in a few cases, and we want people to
opt-in to new policies, so make our examples copy'n'paste friendly.

Pick-to: 6.8
Task-number: QTBUG-126201
Task-number: QTBUG-126468
Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2024-07-03 08:43:43 +02:00
Alexandru Croitor a6bd1dc3e0 CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

A few examples had to be adapted manually, mostly those that build
additional qml modules / plugins.

The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed, these are not needed anymore because example directory
selection is handled by the qt_internal_add_example calls.

The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_qml_app_script.

A qt_generate_deploy_qml_app_script call was added for each
executable target.

Note that the deployment step will be skipped in the CI for now,
because:
- we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus
  set QT_INTERNAL_SKIP_DEPLOYMENT to true
- standalone examples feature is not yet enabled in the CI, which
  means we continue to build examples in-tree, and deployment is
  disabled for in-tree prefix builds.
A small list of examples to deploy in the CI will be chosen in the
future, to ensure deployment coverage, without slowing down overall CI
times due to all the *deployqt invocations.

Even if deployment is disabled in the CI, the install(TARGETS) calls
for each example will still run, installing into an
'installed_examples' directory, which will not be archived by the CI.

The QtBundleQmlModuleForMacOS and bundle_shared code was removed,
because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the
deployment api, to ensure macOS bundle examples run properly in the
build dir. This works even in prefix in-tree builds, when installation
deployment is disabled.

Finally, for all examples that build additional qml module libraries or
plugins, the libraries / plugins must be installed into the bin dir of
each project, along with a qmldir file.

This is to support running the installed project for platforms that
don't have deployment api yet, like boot2qt / yocto.

If we want to have super clean install / deployment rules in the
future, we won't be able to avoid adding ugly per-platform conditions.
The current status quo is deemed an improvement over what we had
before.

Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I843d934668c25dbcd1abca52495b393579633fc5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-27 18:57:34 +01:00
Tor Arne Vestbø 655ff8592b Use new Qt configure feature for Metal
Change-Id: I603018d3f4c6a49c39f7daed25101c24edbbfc02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-25 19:03:08 +01:00
Lucie Gérard 53295d9102 Correct license for examples files
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-21 10:41:29 +01:00
Jaishree Vyas 486cc33ce5 Doc: Create separate Graphics and Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6 6.7
Change-Id: Ib0bb6217c29795fe50efdf827aa9902bbd572032
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-01-17 15:36:27 +01:00
Jaishree Vyas 46fc095ae4 Doc: Add example categories for qtquick
Task-number: QTBUG-116334
Pick-to: 6.5 6.6
Change-Id: I993b6157c3ef8a69e4e218d62596b5219ab4b34b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-26 14:08:47 +02:00
Topi Reinio 83ba6a889f Doc: Fix undocumented parameters and broken links
* src/qml/jsapi/qjsengine.cpp:
    (qdoc) warning: Can't link to 'qvariant_cast()'

* src/quick/items/qquickrhiitem.cpp:
    (qdoc) warning: Undocumented parameter 'item' in
    QQuickRhiItemRenderer::synchronize()
    (qdoc) warning: Can't link to 'msaaColorBuffer()'
    (qdoc) warning: Can't link to 'resolveTexture()'

* src/quick/scenegraph/util/qsgtextnode.cpp:
    (qdoc) warning: No such enum item 'Text.NativeRendering' in
    QSGTextNode::RenderType
    (qdoc) warning: Undocumented parameter 'color' in
    QSGTextNode::setColor()
    (qdoc) warning: Undocumented parameter 'color' in
    QSGTextNode::setSelectionColor()
    (qdoc) warning: Undocumented parameter 'viewport' in
    QSGTextNode::setViewport()

* examples/quick/rendercontrol/rendercontrol_rhi/doc/src/
  rendercontrol_rhi.qdoc:
    (qdoc) warning: Can't link to 'QWidget-based'
    (qdoc) warning: Can't link to 'QAnimationDriver'

Mark all documentation modules in qtdeclarative as free of warnings.

Change-Id: I97cc059701c351b53cdeeb5fc2feff923c5a76a8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-15 10:04:17 +00:00
Laszlo Agocs 47680a6276 rendercontrol_rhi example: Fix some broken indentation
Change-Id: I57d94e5362ea1d86dd7835678436cdd6e5ad6ad5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:16 +02:00
Laszlo Agocs 0e1e111f06 rendercontrol_rhi example: Make the custom animation driver optional
Change-Id: Ia9b25c87452eb4ede47f5464294857aa5c6fdc2e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:14 +02:00
Laszlo Agocs 33ab96f8e3 rendercontrol_rhi example: Add a checkbox to exercise mirrorVertically
Change-Id: Ia8ff0162db51e9e7c6eb6fb38df1ca28a47935fc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:11 +02:00
Laszlo Agocs 8024e182f6 Add a QRhi-based QQuickRenderControl example
Task-number: QTBUG-113331
Change-Id: I638e0f2483bf88d6fff3ad929ea6714e64fa199b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-15 14:13:32 +02:00