Commit Graph

11 Commits

Author SHA1 Message Date
Sami Shalayel e6274fa50f samegame: fix .qmlproject
Amends 0c02d0545a that broke the
.qmlproject file: remove the unsupported prefer line from the qmldirs
and remove the now empty qmldir to make the .qmlproject file work. It
turns out that the .pro project does not require the prefer line either
from the qmldir files.

Pick-to: 6.8
Change-Id: I5202b589d7320542238a889db66c3975befceab6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-09-20 12:39:41 +02:00
Sami Shalayel a841c45fee samegame demo: fix qmllint warnings
Fix the qmllint unqualified warnings and custom parsed
property changes.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I3a8e310738d1521bae4e233c5610af833fcb697f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:46 +02:00
Sami Shalayel 0c02d0545a samegame demo: port to qt_add_qml_module
Make the samegame demo use qt_add_qml_module instead of qt_add_resources.
This populates build/qtdoc/examples/demos/samegame/SameGameModule
instead of build/qtdoc/examples/demos/samegame/content because content
is a bad QML module name ™️.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I23e197c99ff284f62fa9deae12afe9ddbd510861
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:41 +02:00
Olivier De Cannière 52d19782d1 Examples: Fix win logic for multiplayer games of samegame
In case player 2 had a higher score at the end of the game, the removed
line would set score to max(score, score2). This would then lead to the
image proclaiming player1 as the winner to be loaded in onModeChanged
by the game canvas in GameArea.qml.

Change-Id: I642d7dc757c4411ccbb836768ca192457057214e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-05 10:08:01 +02:00
Axel Spoerl a86081100d Revert "Port samegame to qt_add_qml_module"
This reverts commit 8fc3cd6675.

Reason for revert: As opposed to the commit message, this is not a minimal port. It changes the directory structure of the example, by starting to popuplate the previously empty samegame/samgame directory inconsistently. It breaks qtdoc build with examples.

Change-Id: I0749043047b21a34b613f73e36f2ade629e41f8d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-01-17 07:16:10 +00:00
Ulf Hermann 8fc3cd6675 Port samegame to qt_add_qml_module
This is a minimal port that only establishes the module structure
without touching any of the actual QML code.

Change-Id: I122156d15c0ee391f519b0894a51acad99551c5c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-12-21 17:32:56 +01:00
Kai Köhne bc427f00da samegame: Fix warning about undeclared function parameter
Task-number: QTBUG-119203
Pick-to: 6.5 6.6
Change-Id: I92497a7c907d0382d037690bf7803650c665b77e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-12-03 10:38:16 +01: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
Kai Koehne 7b7d6936a5 samegame: Fix deprecation warnings
Fixes warnings for

  QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }

Pick-to: 6.0
Change-Id: Ifa6065856e4947b779ab75922d05e50e8be985bd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-12-02 15:05:08 +00:00
Kai Koehne 9194f8602b examples: Do not use versioned QML import
Ignore .ui.qml files though for now, until they are properly handled
by Qt Design Studio.

Task-number: QTBUG-89033
Change-Id: I85ea1dc2f85928e9fa1f473535687ab8b0288e9d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-12-02 16:04:51 +01:00
Venugopal Shivashankar 70ce5f4d3e Move demos to qtdoc repository
These demos use several modules and moving them allows to use for
example Qt Quick Controls 2 in them.

The shared directory should be removed and the examples made
self-contained.

Change-Id: I5dc667d22388651894d7d145b65752bc5c5cf6cf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-07-09 12:43:59 +00:00