* Have CardDatabase::getPreferredPrintingInfo respect card provider ID overrides (pinned printings)
Took 13 minutes
Took 37 seconds
Took 10 seconds
Took 10 seconds
# Commit time for manual adjustment:
# Took 30 seconds
Took 15 seconds
Took 8 minutes
Took 21 seconds
* Move settings cache and settings card preference provider out of libcockatrice_settings and into cockatrice
Took 52 minutes
Took 9 minutes
Took 1 minute
* Temp cache.
Took 16 minutes
* Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer.
* Implement interfaces for settings that need it
Took 2 hours 38 minutes
* Adjust oracle.
Took 5 minutes
* Move abstract/noop interfaces to libcockatrice_interfaces so they can be linked against independently.
Took 52 minutes
* Clean up some links.
Took 3 minutes
* Cleanup two includes.
Took 3 minutes
* More fixes.
Took 7 minutes
* More includes that slipped past.
Took 3 minutes
* Stop mocking and start injecting for tests.
Took 15 minutes
* I don't know why remote_client was including main.
Took 4 minutes
* Include.
Took 3 minutes
* Lint.
Took 2 minutes
* Don't use Qt pointers.
Took 1 hour 7 minutes
* Make parser use CardSettingsInterface
Took 13 minutes
* Also adjust constructor lol.
Took 8 minutes
* Lint.
Took 32 minutes
* Revert "Lint."
This reverts commit ecb596c39e.
Took 3 minutes
* Test.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Untangle the card_info.cpp mess and split into individual files.
Took 53 minutes
* Auto-lint was disabled and my pre-commit hook didn't fire. Oh well.
Took 3 minutes
* Fix oracle.
Took 35 seconds
* Lint!
Took 20 seconds
* Fix tests.
Took 3 minutes
* CMakeLists.txt: The reason why I have to disable auto-lint.
Took 2 minutes
* dbconverter.
Took 3 minutes
* Oracle again.
Took 3 minutes
* dbconverter again.
Took 3 minutes
* dbconverter again again.
Took 2 minutes
* More fixes.
Took 4 minutes
Took 21 seconds
* Everything needs everything.
Took 3 minutes
* Everything means everything.
Took 4 minutes
* All the tests.
Took 4 minutes
* I hate everything about this.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* big move
* also move game_specific_terms
* fix imports
* alphabetize cmake
* fix build failure
* create database folder and move files into it
* fix includes
* run formatter
* feat: Configurable colors for card counter
This patch adds support for:
- User-defined colors for card counters;
- 3 additional types of card counters.
The colors used for counters is stored locally and not shared with other
users. This is intentional as the feature is likely to be used for
improved accessibility.
In order to preserve backwards-compatibility, and because I don't have a
better idea, counters keep their existing color-based names (Red, Green,
Yellow) in menus and in the message log. For consistency, the new
counters also get assigned color-based names (Cyan, Purple, Magenta).
This choice is a compromise, as allowing user-defined names for counters
raises many additional (UI/UX) questions that I don't know how to
answer. A good long-term solution would be to include counter names as
part of a game definition system and hence would be in scope for #1740.
The choice of adding 3 additional types of counters and the Cyan, Purple
and Magenta names are not random. The existing code for determining
counter colors goes: Red, Green, Yellow, Cyan, Purple, Magenta, Black
(unreadable) and thus 6 is the maximum number of counters that existing
versions of Cockatrice are able to support. This way, released clients
get a degraded experience (cannot interact with the new counters,
messages in the server log say "Player X places 1 on Card (now 1)"
without specifying 1 of what), but do see the counters properly.
Fixes#2020
* Do not use %n
* Use SettingsManager
* Use qSin instead of sin
Fix build failures with old GCC.
* Use letters for card counter names
* Place card counter actions in separate menu
* Remove copy-paste error
* include QtMath
* Do not color whole settings page
* derp
---------
Co-authored-by: Zach H <zahalpern+github@gmail.com>
* Parallelize picture loader.
* Queue requests instead.
* Include a status bar for the picture loader.
* Save redirect cache on destruction.
* Address comments.
* Let's not overwrite an ambigious variable name.
* Lint.
* Oracle needs the status bar too.
* We actually get a free request if we hit a cached image.
* Fix cmake list.
* toString() the url.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* add "open recent" menu option to deck editor tab
* change texts
* also get it to work with loading from deck storage tab
* add error message when fail to open
* only update recents on successful open
* only update recents on successful open
* reword to "Clear"
* 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.
* 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.
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* refactored cardzone.cpp, added doc and changed if to switch case
* started moving every files into different folders
* remove undercase to match with other files naming convention
* refactored dialog files
* ran format.sh
* refactored client/tabs folder
* refactored client/tabs folder
* refactored client/tabs folder
* refactored client folder
* refactored carddbparser
* refactored dialogs
* Create sonar-project.properties
temporary file for lint
* Create build.yml
temporary file for lint
* removed all files from root directory
* removed all files from root directory
* added current branch to workflow
* fixed most broken import
* fixed issues while renaming files
* fixed oracle importer
* fixed dbconverter
* updated translations
* made sub-folders for client
* removed linter
* removed linter folder
* fixed oracle import
* revert card_zone documentation
* renamed db parser files name and deck_view imports
* fixed dlg file issue
* ran format file and fixed test file
* fixed carddb test files
* moved player folder in game
* updated translations and format files
* fixed peglib import
* format cmake files
* removing vcpkg to try to add it back later
* tried fixing vcpkg file
* renamed filter to filters and moved database parser to cards folder
* reverted translation files
* reverted oracle translated
* Update cockatrice/src/dialogs/dlg_register.cpp
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* Update cockatrice/src/client/ui/window_main.cpp
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* removed empty line at file start
* removed useless include from tab_supervisor.cpp
* refactored cardzone.cpp, added doc and changed if to switch case
* started moving every files into different folders
* remove undercase to match with other files naming convention
* refactored dialog files
* ran format.sh
* refactored client/tabs folder
* refactored client folder
* refactored carddbparser
* refactored dialogs
* removed all files from root directory
* Create sonar-project.properties
temporary file for lint
* Create build.yml
temporary file for lint
* added current branch to workflow
* fixed most broken import
* fixed issues while renaming files
* fixed oracle importer
* fixed dbconverter
* updated translations
* made sub-folders for client
* removed linter
* removed linter folder
* fixed oracle import
* revert card_zone documentation
* renamed db parser files name and deck_view imports
* fixed dlg file issue
* ran format file and fixed test file
* fixed carddb test files
* moved player folder in game
* updated translations and format files
* fixed peglib import
* reverted translation files
* format cmake files
* removing vcpkg to try to add it back later
* tried fixing vcpkg file
* pre-updating of cockatrice changes
* removed empty line at file start
* reverted oracle translated
* Update cockatrice/src/dialogs/dlg_register.cpp
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* Update cockatrice/src/client/ui/window_main.cpp
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* removed useless include from tab_supervisor.cpp
---------
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
* remove dependency on deprecated qt5 libraries for qt6
removes the use of qt6-5compat for builds
replaces use of QRegExp with QRegularExpression
fixes incorrect usage of QRegExp
removes use of QTextCodec
fixes incorrect usage of QTextCodec
sets qtlinguist as a required component for qt6
* fix anchoredPattern not existing in qt 5.11
* merge clangify and cmakify into format.sh
update desktop lint workflow to 22.04
print cmake-format version as well
um, rename things?
add extra examples to format.sh --help
add option to not run clang-format
fix version display in .ci/lint_cpp.sh
fix relative paths in format.sh
fix formatting dirs
* run ./format.sh --cmake --branch ""
* revert formatting of cmake comments
Add lock around deleting arrows for commanding cards
Add support for Qt6 w/ Backwards Qt5
Handle Qt5/6 cross compilation better
Last cleanups
caps matter
Fix serv
Prevent crash on 6.3.0 Linux & bump to 5.8 min
Prevent out of bounds indexing
Delete shutdown timer if it exists
Fixup ticket comments, remove unneeded guards
Try to add support for missing OSes
Update .ci/release_template.md
Update PR based on comments
Update XML name after done and remove Hirsute
Address local game crash
Address comments from PR (again)
Tests don't work on mac, will see if a problem on other OSes
make soundengine more consistent across qt versions
disable tests on distros that are covered by others
Fix Oracle Crash due to bad memory access
Update Oracle to use new Qt6 way of adding translations
Add support for Qt5/Qt6 compiling of Cockatrice
Remove unneeded calls to QtMath/cmath/math.h
Update how we handle bitwise comparisons for enums with Tray Icon
Change header guards to not duplicate function
Leave comment & Fix Path for GHA Qt
Update common/server.h
Update cockatrice/src/window_main.cpp
Rollback change on cmake module path for NSIS
check docker image requirements
add size limit to ccache
put variables in quotes
properly set build type on mac
avoid names used in cmake
fix up cmake module path
cmake 3.10 does not recognize prepend
Support Tests in FindQtRuntime
set ccache size on non debug builds as well
immediately return when removing non existing client
handle incTxBytes with a signal instead
don't set common link libraries in cockatrice/CMakeLists.txt
add comments
set macos qt version to 6
Try upgrading XCode versions to latest they can be supported on
Ensure Qt gets linked
add tmate so i can see what's going on
Qt6 points two directories further down than Qt5 with regard to the top lib path, so we need to account for this
Establish Plugins directory for Qt6
Establish TLS plugins for Qt6 services
Minor change for release channel network manager
Let windows build in parallel cores
Wrong symbols
Qt6 patch up for signal
add missing qt6 package on deb builds
boolean expressions are hard
negative indexes should go to the end
Intentionally fail cache
move size checks to individual zone types
Hardcode libs needed for building on Windows, as the regex was annoying
Update wording
use the --parallel option in all builds
clean up the .ci scripts some more
tweak fedora build
add os parameter to compile.sh
I don't really like this but it seems the easiest way
I'd prefer if these types of quirks would live in the main configuration
file, the yml
fixup yml
readd appended cache key to vcpkg step
fix windows 32 quirk
the json hash is already added to the key as well
remove os parameter and clean up ci files
set name_build.sh to output relative paths
set backwards compatible version of xcode and qt on mac
set QTDIR for mac builds on qt5
has no effect for qt6
export BUILD_DIR to name_build.sh
merge mac build steps
merge homebrew steps, set package suffix
link qt5
remove brew link
set qtdir to qt5 only
compile.sh vars need to be empty not 0
fix sets manager search bar on qt 5.12/15
fix oracle subprocess errors being ignored on qt 5
clean up translation loading
move en@source translation file so it will not get included in packages
NOTE: this needs to be done at transifex as well!
Use generator platform over osname
Short circuit if not Win defined
* CardDB: merge all card properties in a new structure
* Pre Json parser changes
* Cockatrice: use qt's builtin json support
* Move qt-json src dir from cockatrice to oracle
* Add dummy cockatricexml4 parser (yet to be implemented)
* Implement a new parser and xml format
* cockatricexml4: new xml parser following the "generic properties hash" pattern;
* oracleimporter: refactor the parsing code to better adapt to cockatricexml4; rewrote split cards parsing
* carddb: change "colors" from a stringlist to a string
* carddb: move the getMainCardType() method to the cockatricexml3 parser
*
* CardInfo: show all properties (stil missing: nice name + translation)
* Rework the "add related card" feature so that it doesn't change the card name in the carddb
Also, fix token count display
* Picture loader: Added support for transform cards
* Fix side information for flip cards
Mtgjson uses side a/b for flip cards, while scryfall doesn't
* Pictureloader: dynamic tag resolution from card properties
Examples old => new
* !cardid! => !set:muid!
* !uuid! => !set:uuid!
* !collectornumber! => !set:num!
New examples:
* !prop:type!
* !prop:manacost!
* Start moving mtg-related property names to a specific file
* Clangify
* Fix tests
* Make gcc an happy puppy
* Revert "Make gcc an happy puppy"
This reverts commit 446ec5f27516c4d3b32dbfc79557f4827c5c5bdf.
* Some gcc fixes
* Share set list between different db parsers, so they won't overwrite one each other
* All glory to the hypnoclangifier!
* Fix test compilation
* Cleanup edited files in the prior PR. (#3519)
* Cleanup edited files in the prior PR.
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Fix includes
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Update carddatabase.h
* Cockatrice Picture loader uses better defined URLs now
URLs are defined on the Card Management tab
Instead of Primary/Backup, you can now define a list of URLs
List of URLs can be drag/dropped for priority ordering
Oracle now uses scryfallId > mtgjsonUUID for !uuid!
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Simplify to QStringList and remove metacall
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* fix issues brought up by Dae. Also fix how the defaults load to account for first time users.
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* clangify
* Fix save settings on row moved (#3495)
* merge model fix, and reclangify
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Sources > Resources
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
* Basic mtgjsonv4 support
* Fix set type
* [WIP] Oracle: use zx instead of zip
* clanfigy fixes
* Fix reading last block of xz
* Added back zip support
* [WIP] adding xz on ci + fixes
* typo
* resolve conflict
* Make gcc an happy puppy
* test appveyor build
* appveyor maybe
* Appveyor: add xz bindir
* Update ssl version (the old one is not available anymore)
* Windows is a really shitty platform to code on.
* test vcpkg
* again
* gosh
* nowarn
* warning 2
* static
* Maybe
* cmake fix
* fsck this pain
* FindWin32SslRuntime: add vcpkg path
* Appveyor: cache support, force usable of openssl from vcpkg
* updated as suggested
* ouch
* Import card uuids and expose this property as !uuid! for card image download
* Minor style fixes
* address changed URL
* Osx: fix qt plugin installation
* Add make install step to travis debug build
* only install under osx
* Add "styles" plugins (for native look'n'feel)
* Osx: upgrade qt from 5.5 to current (5.10.1)
* Fix osx on travis
The qt homebrew formula now installs three qt* symlinks (qt, qt5, qt5@5.x) so we can't use/don't need bash globbing anymore
* Portable mode for windows
* fix start menu in portable mode
* Make gcc an happy puppy
* Clean old installation if we are installing over an old portable mode installation
* Default to Desktop\CockatricePortable
* Settings dialog fixes
* wording