Cockatrice/common
LunaticCat 502c901c06 Added Zach's work on storing printing information in the DeckList (#1)
* Change CardInfo's PixmapCacheKey to be the UUID of the preferred set after database loading has finished. Otherwise, and if no UUID of a preferred set is available, default to the card name.

* Refactor CardDatabase *db global variable to singleton CardDatabaseManager.

This commit refactors the global variable CardDatabase *db into a singleton encapsulated by the DatabaseManager class, accessible via DatabaseManager::getInstance(). This change centralizes access to the database instance, improving code modularity and encapsulation, resolving dependencies on main.h for code that requires access to the database instance.

- Added DatabaseManager class with getInstance() method returning a pointer to the singleton CardDatabase.
- Removed global db variable and updated references across the codebase.
 - Thread-safe static initialization for the singleton.

Impact: This refactor should have no functional impact on the application, as it maintains the same interface for accessing the CardDatabase instance. However, the codebase now benefits from improved encapsulation, lifetime management, and thread-safety.

* fixed db issue an renamed sets to set in picture loader

* canibalized zach work and added it to the decklist builder

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-19 03:39:48 +01:00
..
lib Counter expressions (#3534) 2019-02-02 13:56:49 -05:00
pb Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
sfmt update sfmt to version 1.5.1 from 1.4.1 (#4124) 2020-10-02 12:13:12 -04:00
CMakeLists.txt Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
color.h Tabs to spaces. 2014-07-08 22:53:02 -04:00
debug_pb_message.cpp Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
debug_pb_message.h implement custom protobuf debug string creation (#4532) 2022-02-23 23:46:23 +01:00
decklist.cpp Added Zach's work on storing printing information in the DeckList (#1) 2024-11-19 03:39:48 +01:00
decklist.h Added Zach's work on storing printing information in the DeckList (#1) 2024-11-19 03:39:48 +01:00
expression.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
expression.h Counter expressions (#3534) 2019-02-02 13:56:49 -05:00
featureset.cpp Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
featureset.h Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
get_pb_extension.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
get_pb_extension.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
passwordhasher.cpp miscellaneous refactors (#4521) 2022-01-16 17:58:53 -05:00
passwordhasher.h miscellaneous refactors (#4521) 2022-01-16 17:58:53 -05:00
rng_abstract.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
rng_abstract.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
rng_sfmt.cpp Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
rng_sfmt.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
room_message_type.h Fix Mac Builds (#4844) 2023-08-06 22:45:45 -04:00
server.cpp Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
server.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_abstractuserinterface.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_abstractuserinterface.h apply chat flood prevention in games next to rooms (#4387) 2021-06-28 01:57:46 -04:00
server_arrow.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_arrow.h assign new arrow id when arrow is moved to transformed card (#5012) 2024-03-27 14:47:00 +01:00
server_arrowtarget.cpp Tabs to spaces. 2014-07-08 22:53:02 -04:00
server_arrowtarget.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
server_card.cpp Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
server_card.h Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
server_cardzone.cpp Allow Judges to see all information, regardless of room settings (#5053) 2024-06-16 19:12:37 -04:00
server_cardzone.h remove cards being looked at from the count on drawing (#4671) 2022-10-17 16:35:54 -04:00
server_counter.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_counter.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_database_interface.cpp Overhaul common's CMakeLists.txt 2014-06-11 01:24:34 +02:00
server_database_interface.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_game.cpp Allow Judges to see all information, regardless of room settings (#5053) 2024-06-16 19:12:37 -04:00
server_game.h fix deprecation of QMutex::Recursive in favor of QRecursiveMutex (#4328) 2021-05-01 18:51:17 -04:00
server_player.cpp Backwards Compatibility for rolling dice 2024-06-16 21:10:07 -04:00
server_player.h Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
server_player_reference.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
server_protocolhandler.cpp Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
server_protocolhandler.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_remoteuserinterface.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_remoteuserinterface.h apply chat flood prevention in games next to rooms (#4387) 2021-06-28 01:57:46 -04:00
server_response_containers.cpp Allow Judges to see all information, regardless of room settings (#5053) 2024-06-16 19:12:37 -04:00
server_response_containers.h Allow Judges to see all information, regardless of room settings (#5053) 2024-06-16 19:12:37 -04:00
server_room.cpp Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
server_room.h Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
serverinfo_user_container.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
serverinfo_user_container.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
trice_limits.h Allow up to 100 dice to be rolled at a time (#5047) 2024-06-12 08:37:04 -04:00
user_level.h Fix Mac Builds (#4844) 2023-08-06 22:45:45 -04:00