mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Automatic Spoiler Season (#2991)
* oracle now can be run in spoiler or normal mode * tests for travis * only run on relaunch * spoilers in client (not oracle now) and tray icon shows when done * spoiler status will be checked before downloading spoiler file * only download if they care about spoilers * reload db on spoiler download * manual update button, code cleanup, and fix enabling sets when new * cleanup, nullchecks, and fixes to spoiler * reload DB even if not in spoiler season; necessary as we have a check elsewhere to prevent the reload if spoiler check happens * Implement changes from 2991#issuecomment-356169374 * Change implicit nullptrs, alert on file deletion, minor changes * make reload thread safe and minor changes from 2991#issuecomment-356450302 * Fix locking * Disable update now button while process running
This commit is contained in:
parent
51ec593759
commit
d19744236e
23 changed files with 2106 additions and 913 deletions
|
|
@ -1,36 +1,36 @@
|
|||
#include "carddatabasesettings.h"
|
||||
|
||||
CardDatabaseSettings::CardDatabaseSettings(QString settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath+"cardDatabase.ini", parent)
|
||||
CardDatabaseSettings::CardDatabaseSettings(QString settingPath, QObject *parent) : SettingsManager(settingPath+"cardDatabase.ini", parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CardDatabaseSettings::setSortKey(QString shortName, unsigned int sortKey)
|
||||
{
|
||||
setValue(sortKey,"sortkey", "sets", shortName);
|
||||
setValue(sortKey, "sortkey", "sets", std::move(shortName));
|
||||
}
|
||||
|
||||
void CardDatabaseSettings::setEnabled(QString shortName, bool enabled)
|
||||
{
|
||||
setValue(enabled, "enabled", "sets", shortName);
|
||||
setValue(enabled, "enabled", "sets", std::move(shortName));
|
||||
}
|
||||
|
||||
void CardDatabaseSettings::setIsKnown(QString shortName, bool isknown)
|
||||
{
|
||||
setValue(isknown, "isknown", "sets", shortName);
|
||||
setValue(isknown, "isknown", "sets", std::move(shortName));
|
||||
}
|
||||
|
||||
unsigned int CardDatabaseSettings::getSortKey(QString shortName)
|
||||
{
|
||||
return getValue("sortkey", "sets", shortName).toUInt();
|
||||
return getValue("sortkey", "sets", std::move(shortName)).toUInt();
|
||||
}
|
||||
|
||||
bool CardDatabaseSettings::isEnabled(QString shortName)
|
||||
{
|
||||
return getValue("enabled", "sets", shortName).toBool();
|
||||
return getValue("enabled", "sets", std::move(shortName)).toBool();
|
||||
}
|
||||
|
||||
bool CardDatabaseSettings::isKnown(QString shortName)
|
||||
{
|
||||
return getValue("isknown", "sets", shortName).toBool();
|
||||
return getValue("isknown", "sets", std::move(shortName)).toBool();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue