Commit Graph

68 Commits

Author SHA1 Message Date
Fabian Kosmale 677229cb59 Coffee example: Fix slider synchronization
Use Synchronizer to synchronize different coffee
slider values with CoffeeConfig.

Set sugarAmount to 0 by default.

Change docs to reflect new implementation.

Fixes the synchronization issue with sugar value.

Pick-to: 6.10
Fixes: QTBUG-138676
Change-Id: Ic73066df3ab2a4281aaf885547f22d2a3bdf662d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-08-07 11:34:19 +03:00
Fabian Kosmale 89a6ad7466 coffee example: Prepare to restore Qt 6.10 compatibility
We can't have cyclic dependencies between types in 6.10.

To reduce the cyclic dependency, we are extracting the coffee settings
into their own type.
The next commit will then (targeting only 6.10) replace ApplicationFlow
properties with var properies.
Reducing the coupling further by extracting the navigation functions
into yet another type is left as a future exercise.

Also, note the opportunity to fix the PropertyChanges in Progress.qml to
not reference a non-local id (which now wouldn't work anymore) – that
wasn't caught by qmllint because PropertyChanges is custom parsed, and
the only way to avoid this is to use the new syntax – but the warning
for that has been turned off due to QDS compatabililty.

Task-number: QTBUG-138898
Change-Id: I6ae97a567350c98dcd8056ac8433858b0b8aec6f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit 5b075084fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-08-05 13:55:53 +00:00
Fabian Kosmale 25c0ec8647 Coffe Machine: Configure qmllint
We're at the point where we can enforce 0 warnings, if we decide to
explicitly ignore the custom parser one (which we need to ignore at
least for the ui.qml files).

Running the all_qmllint target will now fail the build if a new warning
is introduced (but the target is currently not run by default).

Pick-to: 6.10
Change-Id: I60a232dc838574701c0f5a9db9245ff0f8f24525
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
2025-07-18 10:04:33 +02:00
Fabian Kosmale 79d24cacfb coffee example: Clean up dataflow (7/n)
Move the orientation value into its own singleton; it's not directly
coffee related, and we want to make use of it in many places, including
ui files, where we don't really want to have a dependency
ApplicationForm (so that they can be still be opened in QDS).

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: Ib60fe29e814af2e564a33239ba36afd0d7bf9537
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:28 +02:00
Fabian Kosmale 22e0c430d0 coffee: Use loadFromModule
It's generally recommended over using load with some weird looking qrc
path.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: Ibe68c35f810d8f7339efaa6185dfb1a9ed36f1eb
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:25 +02:00
Fabian Kosmale 7ff06dc1da coffee example: Clean up dataflow (6/n)
Avoid coupling CustomToolBar to ApplicationFlow. Instead, give
CustomToolBar its own signals, and emit them when the buttons are
clicked.
Add the signal handling logic to ApplicationFlow.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: I96c98750f99cb4529bf47dd27a22a55bcecfa20f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:20 +02:00
Fabian Kosmale a23fc3087d coffee: Colors: Add some type safety
Both "light" and "dark" were plain QtObjects, who happened to have the
same additional properties. Instead, declare the properties once in an
inline component, and use it as the type instead of "var".

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: Icb9f2cad2c05aa256ea0e6d5bde47e5a0a7f6923
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:16 +02:00
Fabian Kosmale 70f1b0756e coffee example: fix some unqualified id warnings
Task-number: QTBUG-138164
Change-Id: I4d708d23218a87d568fe18b322d0b7bb182d2ea0
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:11 +02:00
Fabian Kosmale e9f81a985e coffee example: Clean up dataflow (5/n)
Set the state depending on applicationFlow in ChoosingCoffeeForm in
ChoosingCoffee instead, where it is guaranteed to be available.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: I2104adab719e44f5151e504daa9260b39d1ef2e3
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:08 +02:00
Fabian Kosmale daf3f87430 coffee example: Clean up dataflow (4/n)
Deal with Home. Home differs from the other pages, because it is used as
the initial item, and thus an actual instance is already created in the
ui.qml file, not only a Component.
As we still want to use a required property referencing the
ApplicationFlow instance, the instantiation is moved into
ApplicationFlow (instead of ApplicationFlowForm).

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: I903352e17560c056fdb12e370ee5413adbe2fd1d
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:04 +02:00
Fabian Kosmale 1c77d5ec77 coffee example: Clean up dataflow (3/n)
Apply the common pattern to the remaining sub-pages, besides Home.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: Ic79547d04b97285981afb206ba2db79309c629fd
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:04:01 +02:00
Fabian Kosmale d2bb2585f2 coffee example: Clean up dataflow (2/n)
Make the dependency on AppicationFlow explicit in Progress by using a
required property. Use that to move the binding to ApplicationFlow's
properties into Progress itself, instead of setting them up in the
"progress" component – this reduces the dependency of
ApplicationFlowForm on its derived type. Initialize the required
property when pushing the component on the StackView.

As a drive-by, use the more modern pushItem function instead of push.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: I9e483c97b7585cef2fed043aa3a5ab35a4b54b10
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:03:57 +02:00
Fabian Kosmale 12b2da0621 coffee example: Clean up dataflow (1/n)
Make the dependency on AppicationFlow explicit in Settings by using a
required property. Use that to move the binding to ApplicationFlow's
properties into settings itself, instead of setting them up in the
"settings" component – this reduces the dependency of
ApplicationFlowForm on its derived type. Initialize the required
property when pushing the component on the StackView.

As a drive-by, use the more modern pushItem function instead of push.

Pick-to: 6.10
Task-number: QTBUG-138164
Change-Id: I47f2931d57ccd66c47775923a15e23d371afa6d1
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-18 10:03:54 +02:00
Kai Köhne 1bc8cba0e2 Example: Use actual example name for project()
The project name is used in Qt Creator as root name for the project.
Using the same name as the documentation/example name makes it
clearer which example is actually open. Only drop prefixes like
'Qt Quick Demo - '.

Pick-to: 6.10
Change-Id: I863a23e26307a973bb04ce879d0c95c3731cdc53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-09 08:58:58 +02:00
Rami Potinkara 0a3912dcb2 Android: Enable QML debugging in non-release builds
This patch
-enables qmltooling in non release builds
-this will allow QML debugging to start and work
-this patch will do this to following examples:
   -calqlatr, coffee machine and dice

Task-number: QTBUG-136794
Pick-to: 6.9 6.8
Change-Id: I4699285fa20021ec9d6e29c86a7a16516af085fa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-05-16 18:36:49 +03:00
Assam Boudjelthia c2c840647a Android: set QT_ANDROID_TARGET_SDK_VERSION to 34
Setting this to 35 is not going to work properly as edge-to-edge is not
working properly yet in Qt for Android 15.

See https://developer.android.com/develop/ui/views/layout/edge-to-edge

Fixes: QTBUG-132360
Pick-to: 6.9 6.8
Change-Id: I46020d07e3aea59d57ebf1bef1b25f1f90971827
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
2025-01-24 13:13:17 +00:00
Assam Boudjelthia 689df23424 Android: set coffeemachine project config for publishing to Play Store
Also, fix few grammar and spelling in the UI.

Pick-to: 6.8
Task-number: QTBUG-124675
Change-Id: Ib04d6ccaeecfa9a8d1a8b02742132f29c42c64d4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-09-26 15:39:19 +03:00
Konsta Alajärvi c2586fe191 Examples: Remove unused imports in coffee example
Remove unused imports in coffee example.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: Ia79a86e35ccb86e1c70fad3f0e5c6e0d1fb88519
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-08-23 09:10:55 +03:00
Konsta Alajärvi 2821519ef2 Examples: Fix coffee example imports
Coffee example gives run time issues on Windows and macOS due to
QtQuick.Controls import that imports styles not customizable on
windows and macOS.

Change imports to QtQuick.Controls.Basic so the same style is imported
on every environment.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: I8f67b87a1fa16d0c8156a05ab065de95aaf363de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-08-23 08:18:17 +03:00
Assam Boudjelthia 45a82b2b73 Android: cleanup AndroidManifest.xml files in examples
Change-Id: If4712fb258052a1a74d56ecb8415503d4025b8b3
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-23 15:13:28 +03:00
Alexandru Croitor cde9cfb96c CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

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

documentviewer did not get the deployment api, because it's trickier.

Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I76322185fc824c112d77e077ee39e7ccbc193a4c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-13 09:44:04 +02:00
Konsta Alajärvi b8232a7adb Remove not needed leftover file from Coffee Machine example
Removed Cup.qml from Coffee Machine example. The file was not supposed
to be there after the example re-design as it is supposed to be
replaced by the Cup.ui.qml but apparently it was not fully removed and
was left in the file listing of coffeemachine.qrc.

With Cmake the file has not been visible in Qt Creator or Squish
but with qmake its visible in Qt Creator
and exposed to Squish as well.

Affects testing the example because the same object has different
object names in Squish between Cmake and qmake.

Task-number: QTBUG-123440
Pick-to: 6.7 6.7.1
Change-Id: I82c2a315cd8af9459e5d5caecb3a3efe8a1e5eff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
2024-05-13 06:39:30 +00:00
Konsta Alajärvi 20e9c489b8 Fix coffee machine example recursive rearranges
Coffee Machine example gives warnings about UI component recursive
rearrengements on Settings, Insert and Ready pages when orientation
changes.

Tracked issue to originate from the coffee cup image Rectangle
container trying to resize its width based on its height.

Removed the width to height bindings.

Task-number: QTBUG-123445
Pick-to: 6.7 6.7.1
Change-Id: Idd4ee13bc2446608a2f8d5d472370c120b4d05b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-13 09:39:22 +03:00
Konsta Alajärvi 36e2025667 Fix Coffee Machine example coffee cup image
Coffee Machine coffee cup image is broken with Qt 6.7.0 for unknown
reasons, more descriptive explanation in the linked bug ticket.

Modified the broken dark_cup.svgz image to expose the hidden
parts of the image.

Before Qt 6.7, Qt only supported SVG Tiny 1.2 standard. From Qt 6.7, we added some of the most used features in SVG 1.1. The file in this example uses <filter> element which was not support before, and since it was not supported it was never parsed. In Qt 6.7, this <filter> element is parsed. However, we only support a subset of the filter primitives that can be used inside the <filter> element, and since this file uses an unsupported filter primitive <feBlend>, it causes an issue.

Simply removing the reference to the <filter> element from the Svg file, fixes the issue.

Fixes: QTBUG-124707
Pick-to: 6.7 6.7.1
Change-Id: I62391fa4fc320f440045958e0ef0dc2eef69d21c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-29 11:52:59 +00:00
Konsta Alajärvi 1ed82c8dc9 Fix Coffee Machine example initial size on big displays
Fix the issue with the Coffee Machine example application window
filling the whole  virtual desktop screen space, which is wrong.

Set initial application window size to some hardcoded values which
will be used on desktop. On mobile platforms the window size will
be maximized.

Update docs to reflect this change.

Fixes: QTBUG-123414
Pick-to: 6.7
Change-Id: If8323c0c1ada4aa5230aa94cf624b2a0ff859b5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-11 08:40:35 +00:00
Lucie Gérard 0b0ba1bc42 Correct license for documentation files
According to QUIP-18 [1], all documentation files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

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

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Idbbd9c9bc1780cf97c71398a3b118d5b371b0ca3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 09:56:22 +01:00
Lucie Gérard 8b36425fab Correct build system file license under example
According to QUIP-18 [1] all files under examples
should be licensed
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: Ia2e8f62af64a384196a9b0c02ac5b2fbf5404a8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 08:20:16 +01:00
Nicholas Bennett 68049fd0db Demos: Add iOS app icon to coffee application example
Added the required folder structure, and files. Adjusted the project
CMake file.

Fixes: QTBUG-118700
Pick-to: 6.7
Change-Id: I09d6f45cbb10928d3e2bcf1b6828c1cdc5fe379a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2024-02-14 19:49:43 +00:00
Konsta Alajärvi 0cac392e36 Separate UI from business logic on re-designed Coffee Machine example
Added .ui.qml counterpart files for components that needed separation
between the UI and business logic.

Rebased to dev to get the newest changes

Added Cup snippet tags to ProgressForm.ui.qml

Added AbstractButton snippet tags to CoffeeCardForm.ui.qml

Fix ambiguous id's and corresponding property aliases in CoffeeCardForm.ui.qml

Added qdoc snippet tags to ChoosingCoffeeForm.ui.qml

Fixed incorrect file paths in snippet tags in coffee.qdoc

Moved transitions from ProgressForm.ui.qml to Progress.qml
as they did not work properly from there to make the coffee cup
animation work properly.

Added property alias "contentItem" to ProgressForm.ui.qml
to access it's properties from Progress.qml to make the progress bar
animation work properly.

Fixed x coordinates in custom sliders so that the slider handle
will not go over the slider bar and become unresponsive.

Removed "brewTime" property int from ProgressForm.ui.qml as it was
not needed there.

* Fixed x coordinate in Sliders to work like they are described
in official documentation.

* Created property int in Progress.qml to better describe cup animation
velocity factor.

Fixes: QTBUG-120280
Pick-to: 6.6 6.7
Change-Id: I3ed0e1c6777674e2d9502aab1e5c670b6099f60a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-02-08 10:18:18 +02:00
Nicholas Bennett 5fcd391653 Add app icons for Android to Coffee Machine
Added adaptable icon and monochrome icon.

Task-number: QTBUG-118700
Pick-to: 6.7
Change-Id: Id498546fcbd81202d3d5d53ec3768cf73f41581e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-07 13:07:28 +00:00
Konsta Alajärvi 37ceea97b4 Rename Coffee Machine example QML module and .qrc file
Renamed QML module and .qrc file in Coffee Machine example, because
using same name for application and QML module causes errors.

Fixes: QTBUG-120230
Change-Id: Iacb73681df83236cf01e3bae75da748de4cf4875
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-10 17:02:48 +02:00
Konsta Alajärvi 4c3e6e6152 Fix Coffee Machine clipping UI elements on lower resolution displays
Reason for these changes is that it was discovered that some of the
UI elements of the re-designed Coffee Machine example did overflow the
target device display with lower than ~1080x1920 display resolution.

Added states to coffee cards that will scale the cards and their content
down if target device screen resolution is lower than set limit.

Added state to home component where text components will be scaled
down in target device screen resolution is lower than set limit.

Added some colors to Colors.qml to remove hardcoded color values.

Added states to sliders in Settings.qml and in CustomSlider.qml
that will scale them down if target device screen resolution is
lower than set limit.

Scaled the custom buttons heights down a bit throughout the
app to make them fit on screen.

Added state to progress page that will scale the caption text
down if target device screen resotion is lower than set limit
and set minimum width and height to dialog component so that
the text will not overflow its container.

Added states to ready page that will reduce the row spacing of the
grid component and scale the caption font size down if target device
screen resolution is lower than the set limit.

Tested successfully  with Android emulators with screen resolution
ranging from 320x480 to 1440x3120.

Removed multiple property changes regarding text sizes in
Settings.qml and replaced them by binding the text objects
font size to a new property int that will be modified through state.

Added the missing when condition in state change to change
the font size in Setting.qml.

Renamed ambiguous id's

* Removed unused property aliases

* Re-applied missing qdoc snippet tags to Settings.qml which were removed
by mistake. This should fix one of the qdoc warnings in CI.

Fixes: QTBUG-116402
Pick-to: 6.7 6.6
Change-Id: I2524be43f943494f5ab7b2689b222a977996dac6
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-01-10 07:19:54 +00:00
Nicholas Bennett f167a114ea Docs: Coffee Machine application example app documentation update
Added material under Adapting to different screens.

Added section Navigating through the app pages.

Added material to Implementing start page and
Implementing Coffee selection sections.

Added code snippets that will replace the precviously used
\quotefromfile.

Added material to cover the rest of the code.

Added snippet identifiers to source code.

Removed trailing whitespaces.

* Fixed grammatical issues.

Fixes: QTBUG-116406
Pick-to: 6.6 6.7
Change-Id: I30c4d8a3f7a159d03df70b960059c11472f942bb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2023-12-18 06:26:05 +00:00
Kai Köhne 7a832db7e1 Remove unneeded license file from coffee example
The font file was removed already in commit b40aaf48ca, along
with the qt_attribution.json file, so we should also remove
the font license file.

Note that the font is still referenced in some .qml files,
but we don't ship it anymore.

Change-Id: If67f0f9ecd5ef3b3a86ab610d2e36b0ce307d8f6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-03 11:00:30 +01:00
Konsta Alajärvi b40aaf48ca Re-design for Coffee Machine example
Implementing new design for Coffee Machine example, more information
on how the new design is going to look like in QTBUG-116402 and in
its subtasks.

Removed unused imports folder.

Changed the names of Home.ui.qml to Home.qml and FilledCup.qml to
Cup.qml in Coffee.qrc file.

Changed the names of the files stated above also in qmldir.

Fixes: QTBUG-116403
Fixes: QTBUG-116402
Task-number: QTBUG-116404
Change-Id: Ib4d33e28ce1e3f268172007e85f36eb1280d11a4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-24 11:42:21 +02:00
Kai Köhne 7132a75c18 Add 'Coffee Machine', 'Thermostat' example to Embedded category
They are good application examples, but also work well for showing
how to use Qt for embedded use cases. So let's have it in both.

Pick-to: 6.5 6.6
Task-number: QTBUG-117210
Change-Id: I8edbd82c5c8f8f7b804a0fec4743ec3b3c05cf07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-10-26 09:13:46 +00:00
Jakub Wincenciak 182521e226 Fix bug in Coffe example causing app stuck when user made a second coffe
The bug was due to the fact that when the coffee was finished brewing,
the state was being set to "initial" which was unnecessary.
So I decided to remove this part of code, which solved the bug.

Task-number: QTBUG-114375
Pick-to: 6.5 6.6
Change-Id: I7c8cbc96330574f0378ea8d1ee3ac2a4732f70e3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-10 10:40:53 +02:00
Thomas Hartmann 910e28a7f1 Fix qmllint issues in coffee demo
* Removing usused imports
* Removing versions from imports
* The state property is a string

Change-Id: I2a7c8de17c414a20984830b964f9386f92a2cb00
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-19 17:47:33 +00:00
Kai Köhne 5d65a35fc9 Examples: Use private linkage where possible
Pick-to: 6.5
Change-Id: Ib5e0b7c7ace6f399b4742eec5879eb06cf67debf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-02 14:03:52 +02:00
Kai Köhne d02810b25f Examples: Use unversioned CMake commands
Prefer unversioned commands over qt6_ ones - even though the
target-based qt_add_resources command is actually new in Qt 6.
But we will evolve the API also between major Qt versions,
so it's better to work with the Qt policies mechanism instead
of relying on version numbers in the command API.

Pick-to: 6.5
Change-Id: If302abb1f22a7ab96c98a8ad2e9c871b9bedb0e9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-02 14:03:48 +02:00
Kai Köhne 835f15cfbb Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.

Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: I9bc7963d8524ef2ab061e32aef428711646247a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-02 12:03:42 +00:00
Topi Reinio b597ecb954 Doc: Use the \examplecategory macro to tag examples
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.

As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.

Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I8590894bdd31d69c38a60cdd42f7301e2cecd2ed
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-04-12 12:51:59 +00:00
Kai Köhne e2178c1b51 Doc: Put selected examples in Applications category
Mark Coffee, Calcqlatr, Photo Surface as part of the
Applications category, which we want to prominently
feature in the next generation of QtC's example screen.

While at it, also simplify the names.

Pick-to: 6.5 6.5.0
Task-number: QTBUG-108751
Change-Id: I34e7a2b3aad0db9cb2e79f683bce19554dc4002d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-16 17:32:14 +01:00
Kai Köhne 0637012c78 Doc: Fix paths for Files property in qt_attribution.json files
Pick-to: 6.2 6.4
Change-Id: I8ee14a3116d33164d471aa6cfb98e24caaa3ecd0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-07 16:25:55 +01:00
Kai Köhne bc21f7f606 Examples: Add tags for the welcome screen
Only the coffee machine example had some tags already. Add them
also for the rest, but inside the .qdoc file, instead of the
more clunky/verbose tagging in the .qdocconf file.

Pick-to: 6.4
Change-Id: I37640c2296c67413361f7987122c5e7daa1f12b0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-10-09 21:10:07 +02:00
Thomas Hartmann 7d09e80d53 Fix Coffee machine demo
By using a constant/binding we avoid that the binding for the settings
state is deleted as a side effect of having a Behavior.

This fixes the demo, but not the underlying issue.

Task-number: QTBUG-106677
Pick-to: 6.4
Change-Id: Ic4c5da9f159cb242fd4d3f039286bc0a3bdb803f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-30 09:55:25 +00:00
Lucie Gérard d490baa159 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Iec124e0bceb4335370674a222970cd9c1b90763f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 10:01:38 +02:00
Ivan Solovev 05f0d701bb Use QT_DISABLE_DEPRECATED_UP_TO instead of QT_DISABLE_DEPRECATED_BEFORE
Task-number: QTBUG-104944
Change-Id: I1e9098da5da5cc8874390571fccd83b819dc5743
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-22 12:59:46 +02:00
Lucie Gérard 37540e46fb Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I9499ba4c20f610ffe8af0fc3e29e6581247f2c40
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 14:45:33 +02:00
Lucie Gérard 6f57506953 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-07 18:23:52 +02:00