mirror of https://github.com/qt/qtdoc.git
Use qt_standard_project_setup and qt_add_qml_module in the CMakeLists.txt file. Fix qmllint warnings: * unqualifed access by adding the required id (note that setting the ids fixed some bugs in the game where the towers were placed on the wrong place on the grid, because the root's x and y coordinate were used instead of the sprite's x and y coordinates) * unqualified access by adding required properties where missing * reformulated custom parsed PropertyChanges to not be custom parsed anymore * fix the runtime warning when using injected parameters by explicitly declaring it via "function (mouse)" * setting ComponentBehavior Bound wherever needed Ignore qmllint warnings: * about unresolved method name 'destroy' that seems to be a bug in qmllint * about unknown properties inside of the logic.js: this is a bug in qmllint and can't be fixed in user projects. In addition: fix the paths be relative to SoundEffect instead of being relative to where the SoundEffect was instantiated and remove the SoundEffect proxy to make the sounds work. This has the side-effect that the games lags because of the poor sound implementation it seems: the output prints `Failed wait for getting sink drained; was draining: true` over and over again when a lots of sounds are happening, like lots of fighting for example. Tracking this via QTBUG-127560. Add extra self-imports "import Maroon" where needed to get the qmake version working, as it does not have the fancy nested qml module that was introduced in 6.8 that fixed this in CMake builds. Adapt the documentation to the new Main.qml file name, the code snippets that references the custom parsed PropertyChanges, and removed the explanation about self-importing the module in Main.qml as that is not needed anymore. Also remove the part about implementing a SoundEffect proxy as that is removed and not needed. Remove the .qmlproject file as it does not know about modules and therefore can't load the demo's Maroon QML Module. Move the Main.qml file into a Window to use QQmlApplicationEngine in the main.cpp file. Pick-to: 6.8 Task-number: QTBUG-100100 Task-number: QTBUG-127560 Change-Id: I79c7b18a6159208608ef97b271fc24fc9fc06230 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> |
||
---|---|---|
.. | ||
images | ||
src |