Commit Graph

6 Commits

Author SHA1 Message Date
Olivier De Cannière b322512f60 DiceSpawner: Fix qmllint warnings
-Add missing imports
-Bind ids inside of Components
-Explicitly require implcitly depended on index property
-Qualify lookups
-Cast reading as AccelerometerReading until it is exposed as the proper
 type

Also fix a binding loop when setting the die's position.

Fixes: QTBUG-138165
Pick-to: 6.10
Change-Id: I691d4a5bbf4cfbd8f7a6af0e837c15319f60343d
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-25 10:13:12 +02:00
Sami Shalayel c4d3c1690a dice demo: use qt_add_qml_module
Use qt_add_qml_module for the dice demo.

Make the demo qmllint clean by removing unused imports, unqualified
accesses and more.

Use loadFromModule instead of load, and rename main.qml to Main.qml to
be loadable. Also add a missing qmldir file for the qmake project to
work with loadFromModule, and fix the prefixes in the .pro file.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I786dcb971980f48e91b0aeaf9d65f285a78c260e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-09 08:57:19 +02:00
Nicholas Bennett 62b33327c0 Dice Demo: Add sound effects and shake to roll
Added the features in line with the spike outcome.
In addition, I modified the spawnDice function to
estimate if all dice are at rest before enabling spawning.
This prevents duplicate shake events and double tap
fumbles.

Task-number: QTBUG-116491
Pick-to: 6.6
Change-Id: Ia0dc59e469e008da5fc3afe2a7342381eadc1008
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 03:40:04 +00:00
Jonas Karlsson 41625c4721 Dice example: remove workaround
The bug is fixed but the workaround was actually not needed to begin
with since the bug only affects nodes with a position and a parent with
scale which is not the case here.

Pick-to: 6.5 6.6
Change-Id: I99766586d2671b3286085d54c7cf8cca7e0f9b7b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-07-17 12:09:56 +00:00
Kai Köhne 67d2885605 Reformat .qml files in dice example
Use qmlformat -i on all files.

Pick-to: 6.5 6.6
Change-Id: I163d1faf281fc085b824e092056cebe57fce5a6b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-22 17:27:34 +02:00
Jonas Karlsson 34ecd60038 Add the 'dice' example
Fixes: QTBUG-113600
Pick-to: 6.5 6.5.2 6.6
Change-Id: I13b8327f2dcf3e7eaec80c7c10038b22a1656df3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-21 00:50:04 +02:00