17 Commits

Author SHA1 Message Date
RickyRister
658ae83157 [DeckList] Make DeckList not a QObject (#6383) 2025-12-03 00:18:46 -05:00
RickyRister
3ff2df2796 [DeckList] Move metadata into struct (#6380)
* [DeckList] Move metadata into struct

* wipe metadata if preserveMetadata is false
2025-11-30 13:09:09 +01:00
RickyRister
d57bec8ec6 [DeckList] Move decklist node classes into new folder (#6381)
* [DeckList] Move decklist node classes into new folder

* reformat

* fix
2025-11-30 13:05:49 +01:00
BruebachL
c5fde071e7 [Cleanup] Unused #includes (#6367)
* [Cleanup] Unused #includes

Took 44 minutes

* [Cleanup] More unused #includes

Took 55 minutes

* [Cleanup] Include QSet

Took 4 minutes

* [Cleanup] Include QDebug in deck_list.cpp

Took 3 minutes

* [Cleanup] Include protocol stuff in servatrice_database_interface.h

Took 3 minutes

* [Cleanup] Include QDialogButtonBox

Took 8 minutes

* [Cleanup] Include QUrl

Took 8 minutes

* [Cleanup] Include QTextOption in header.

Took 3 minutes

* [Cleanup] Include QMap in user_list_manager.h

Took 8 minutes

* [Cleanup] Adjust qjson

Took 8 minutes

* [Cleanup] include button box.

Took 3 minutes

* [Cleanup] Redo fwd declarations.

* [Cleanup] Redo last removed fwd declarations.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-29 18:53:11 +01:00
BruebachL
8abd04dab1 [Fix-Warnings] Remove more redundant empty declarations. (extra semicolons) (#6374) 2025-11-29 14:19:11 +01:00
BruebachL
9ece4bfd9b [Fix-Warnings] Mark const getters as [[nodiscard]] (#6365)
Took 45 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-28 21:38:54 +01:00
BruebachL
846f16ddaa [DeckEditor] Deck List History Manager. (#6340)
* [DeckEditor] Deck List History Manager.

Took 23 minutes

Took 17 minutes

* Add icons.

Took 2 minutes


Took 3 seconds

* Small fixes.

Took 12 minutes

* Style lint.

Took 48 seconds

* tr() things.

Took 5 minutes

* Add tooltips for buttons.

Took 3 minutes

* Add explanation label to history.

Took 3 minutes

* Refactor to .cpp, delegate undo/redo to manager, don't return memento

Took 8 minutes

* Clear history when setting deck.

Took 6 minutes

* Move to value based stacks.

Took 52 seconds

* Default constructor.

Took 31 seconds

Took 3 minutes

Took 4 minutes

Took 2 minutes

* Have it listen to deck editor additions.

Took 18 minutes

* Don't connect buttons *and* actions.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-20 14:54:32 +01:00
BruebachL
ab5d6db8a2 [DeckList] Disable copy constructor (#6339)
* [DeckList] Disable copy constructor

Took 1 hour 44 minutes

Took 1 minute

# Commit time for manual adjustment:
# Took 28 seconds


Took 33 seconds

* Revert member to pointer.

Took 19 minutes

* Revert pulling up setters/getters now that getDeckList is no longer const.

Took 6 minutes

* Revert more.

Took 2 minutes

* One more fix.

Took 1 minute

* Update cockatrice/src/interface/deck_loader/deck_loader.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-11-20 13:20:09 +01:00
RickyRister
16392c28c5 [DeckLoader] Refactor to make some methods static (#6336)
* Make forEachCard const

* Make some DeckLoader methods static

* Update usages

* Update method param documentation in deck_loader.cpp

---------

Co-authored-by: BruebachL <44814898+BruebachL@users.noreply.github.com>
2025-11-17 03:49:45 -08:00
BruebachL
73763b5ee6 Mark more functions as [[nodiscard]] (#6320)
* Fix local variable double declaration.

Took 44 seconds

* Mark functions as [[nodiscard]]

Took 31 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 01:39:24 +01:00
BruebachL
ace4063371 Helper to query deckList for DecklistCardNodes. (#6242)
* Helper to query deckList for DecklistCardNodes.

Took 30 minutes

Took 6 minutes

Took 2 minutes

* Fix unused.

Took 3 minutes


Took 1 minute

* Convert string to string list.

Took 2 minutes

* Adjust to rebase.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 17:21:43 +01:00
BruebachL
5df00de246 Avoid repeating type by using auto. (#6321)
Took 19 minutes


Took 22 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 14:06:53 +01:00
BruebachL
f24c36d6b1 Core qt module for libs (#6278)
* Move logger and key signals from libcockatrice_utility to Cockatrice.

Took 9 minutes

* Only link Qt::Core instead of COCKATRICE_QT_MODULES to libraries, if possible.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-05 18:51:08 +01:00
BruebachL
adff828415 Move models to lib (#6274)
* Move models to own library.

Took 35 minutes


Took 22 minutes

* Adjust CMakeLists

Took 20 seconds

* Reformat CMakeLists.

Took 2 minutes

* Revert "Reformat CMakeLists."

This reverts commit db5982ad1c.


Took 55 seconds

* Lint an include

Took 17 minutes

Took 9 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-05 18:33:40 +01:00
RickyRister
636aa72141 Remove redundant prefix from libcockatrice_card folders (#6237)
Took 28 minutes
2025-10-09 23:09:20 +02:00
BruebachL
d9c65d4ae0 [Move refactor] Reparent orphan classes (#6236)
* Move orphaned classes to their correct parent folders.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-09 14:15:19 +02:00
BruebachL
1ef07309d6 Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212)
---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-10-09 07:36:12 +02:00