`refreshTags` is not connecting the signal to open the dialog to edit
the tags, so tags can only be edited once for a given deck.
Fix by only having the logic for creating the "Edit tags" button once
and call it from `connectDeckList`.
The divideCardSpaceInZone function introduced in #4930 is buggy and
sometimes returns an index that is too large for the current zone, which
causes us to call `cards.at(index)` with an `index` that's bigger than
the amount of cards.
This is the bug that #5609 intended to fix but was improperly diagnosed.
Remove part of #5609 as the cases it is guarding against (e.g. null card
pointer) cannot actually happen.
C++ does not require compilers to zero-initialize value types, so
depending on the platform (here: Linux), the deck editor starts up with
an uninitialized value in the `modified` flag, which is usually not
zero.
This is part of the code from #4974, including an improved drag-and-drop
API and its use to display visual feedback of card destination on the
board.
It does not include the improved logic for pushing cards around as I
still need to figure out edge cases there - the logic for choosing where
cards go is not changed, so some of the artifacts described in #4817
and #4975 (particularly around multi-card) are still present.
* Close the `TabGame`s when closing the `TabSupervisor`
This ensures that we go through the same code path (in terms of Qt
events) when closing the whole supervisor as when closing a single tab.
Also, use the `close` event instead of the `hide` event to detect when
we are closing a game.
Fixes#5697
* Compat with old Qt versions
* Old Qt, reloaded
* Review: use hideEvent and call super
* Use enum for ThemeManager brushes
This patch introduces an enum to distinguish the different brushes that
can be set by the theme (hand, stack, etc.) and generic functions taking
the enum rather than having one copy of each function for each brush.
This is preliminary work before merging StackZone and HandZone to
simplify #4974.
* Include <array> header
* Header spacing
Currently, zones must keep track of which cards they move in order to
manually call `updatePath` on arrows.
This patch sets the `ItemSendsScenePositionChanges` flag on
`ArrowTarget`s to automatically update arrow positions without requiring
zones to keep track of that information.
- Remove hardening flags to allow debug builds (otherwise GCC complains
because nix adds the FORTIFY_SOURCE flag, which is not compatible
with -O0)
- Allow ninja as build system
- Add clang-tools dependency for LSP support