mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 23:53:54 -07:00
Consolidate accepted decklist file extensions (#5749)
* Consolidate accepted decklist file extensions * rename the other const
This commit is contained in:
parent
42301d4f1a
commit
0fa744f6ec
5 changed files with 17 additions and 7 deletions
|
|
@ -16,9 +16,10 @@
|
|||
#include <QStringList>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
const QStringList DeckLoader::fileNameFilters = QStringList()
|
||||
<< QObject::tr("Common deck formats (*.cod *.dec *.dek *.txt *.mwDeck)")
|
||||
<< QObject::tr("All files (*.*)");
|
||||
const QStringList DeckLoader::ACCEPTED_FILE_EXTENSIONS = {"*.cod", "*.dec", "*.dek", "*.txt", "*.mwDeck"};
|
||||
|
||||
const QStringList DeckLoader::FILE_NAME_FILTERS = {
|
||||
tr("Common deck formats (%1)").arg(ACCEPTED_FILE_EXTENSIONS.join(" ")), tr("All files (*.*)")};
|
||||
|
||||
DeckLoader::DeckLoader() : DeckList(), lastFileName(QString()), lastFileFormat(CockatriceFormat), lastRemoteDeckId(-1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,16 @@ public:
|
|||
PlainTextFormat,
|
||||
CockatriceFormat
|
||||
};
|
||||
static const QStringList fileNameFilters;
|
||||
|
||||
/**
|
||||
* Supported file extensions for decklist files
|
||||
*/
|
||||
static const QStringList ACCEPTED_FILE_EXTENSIONS;
|
||||
|
||||
/**
|
||||
* For use with `QFileDialog::setNameFilters`
|
||||
*/
|
||||
static const QStringList FILE_NAME_FILTERS;
|
||||
|
||||
private:
|
||||
QString lastFileName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue