mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Static helpers. (#6425)
Took 2 minutes Took 29 seconds Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
64bb5355ff
commit
cd44392866
3 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#define ARCHIDEKT_DEFAULT_IMAGE "https://storage.googleapis.com/topdekt-user/images/archidekt_deck_card_shadow.jpg"
|
#define ARCHIDEKT_DEFAULT_IMAGE "https://storage.googleapis.com/topdekt-user/images/archidekt_deck_card_shadow.jpg"
|
||||||
|
|
||||||
QString timeAgo(const QString ×tamp)
|
static QString timeAgo(const QString ×tamp)
|
||||||
{
|
{
|
||||||
QDateTime dt = QDateTime::fromString(timestamp, Qt::ISODate);
|
QDateTime dt = QDateTime::fromString(timestamp, Qt::ISODate);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ bool DeckList::readElement(QXmlStreamReader *xml)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeMetadata(QXmlStreamWriter *xml, const DeckList::Metadata &metadata)
|
static void writeMetadata(QXmlStreamWriter *xml, const DeckList::Metadata &metadata)
|
||||||
{
|
{
|
||||||
xml->writeTextElement("lastLoadedTimestamp", metadata.lastLoadedTimestamp);
|
xml->writeTextElement("lastLoadedTimestamp", metadata.lastLoadedTimestamp);
|
||||||
xml->writeTextElement("deckname", metadata.name);
|
xml->writeTextElement("deckname", metadata.name);
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ bool DeckListModel::isCardLegalForCurrentFormat(const CardInfoPtr cardInfo)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int maxAllowedForLegality(const FormatRules &format, const QString &legality)
|
static int maxAllowedForLegality(const FormatRules &format, const QString &legality)
|
||||||
{
|
{
|
||||||
for (const AllowedCount &c : format.allowedCounts) {
|
for (const AllowedCount &c : format.allowedCounts) {
|
||||||
if (c.label == legality) {
|
if (c.label == legality) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue