-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>
This change ensures proper initial distance of dices based
on their size. It also distributes them horizontally so that
they hit each other later at different angles.
Pick-to: 6.8 6.9 6.9.0
Change-Id: I7f8d2ab0c9b7b6b00996cae8fb121de950b68ca4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
This change replaces the imperative logic of DiceSpawner
with a more declarative approach using Repeater3D.
It also replaces sending properties via functions, with
property binding and property aliases.
Pick-to: 6.8 6.9 6.9.0
Change-Id: Ic5c166fb50b0ede393cc72411f1a4a7e08a6ccd7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
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>
There is a problem in QQ3DPhysics. onBodyContact may still refer to
already deleted object - which causes the application to crash.
It happens when Accelerometer spam a lot with scene.spawnDice(...)
calls.
To avoid this crash, the timer-guard for rolling dices was added.
Pick-to: 6.7 6.6
Fixes: QTBUG-120364
Change-Id: I3ca3811662fb2400d61cb256c8b34885a6fe028a
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
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>
Don't calculate this inside the for loop.
Pick-to: 6.5 6.6
Change-Id: I09d46e363325071086332d901235f0feeabbb474
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>