[Card DB] Various little fixes and cleanups (#6174)

* Simplify add card.

Took 25 minutes


Took 6 minutes

* Simplify guessCard.

Took 2 minutes

* Simplify loadCardDatabases.

Took 3 minutes

Took 6 seconds

* Clean up mutexes instead of manually locking/unlocking.

Took 5 minutes

* Fix null/empty check.

Took 3 minutes

* Move some stuff around inside the file.

Took 4 minutes

* Move some more things.

Took 2 minutes

* Clean up refreshCachedReverseRelatedCards.

Took 2 minutes

Took 6 seconds

* Clean up getCardFromSameSet.

Took 2 minutes

* Lint.

Took 5 minutes

* Fix compiler warning.

Took 4 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-09-25 19:36:46 +02:00 committed by GitHub
parent 23612ba6ec
commit 762ea47b8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 207 additions and 219 deletions

View file

@ -92,6 +92,7 @@ public:
* function, so you don't need to simplify it beforehand.
*/
[[nodiscard]] CardInfoPtr getCardBySimpleName(const QString &cardName) const;
CardInfoPtr lookupCardByName(const QString &name) const;
CardSetPtr getSet(const QString &setName);
const CardNameMap &getCardList() const
@ -112,6 +113,7 @@ public:
void enableAllUnknownSets();
void markAllSetsAsKnown();
void notifyEnabledSetsChanged();
static QStringList collectCustomDatabasePaths();
public slots:
LoadStatus loadCardDatabases();