diff --git a/cockatrice/src/setsmodel.cpp b/cockatrice/src/setsmodel.cpp index 26542a6e..bd6dc006 100644 --- a/cockatrice/src/setsmodel.cpp +++ b/cockatrice/src/setsmodel.cpp @@ -25,11 +25,11 @@ QVariant SetsModel::data(const QModelIndex &index, int role) const CardSet *set = sets[index.row()]; switch (index.column()) { - case SortKeyCol: return set->getSortKey(); + case SortKeyCol: return QString("%1").arg(set->getSortKey(), 4, 10, QChar('0')); case SetTypeCol: return set->getSetType(); case ShortNameCol: return set->getShortName(); case LongNameCol: return set->getLongName(); - case ReleaseDateCol: return set->getReleaseDate(); + case ReleaseDateCol: return set->getReleaseDate().toString(Qt::ISODate); default: return QVariant(); } } @@ -41,7 +41,7 @@ QVariant SetsModel::headerData(int section, Qt::Orientation orientation, int rol switch (section) { case SortKeyCol: return tr("Key"); case SetTypeCol: return tr("Set type"); - case ShortNameCol: return tr("Short name"); + case ShortNameCol: return tr("Set code"); case LongNameCol: return tr("Long name"); case ReleaseDateCol: return tr("Release date"); default: return QVariant(); diff --git a/cockatrice/src/setsmodel.h b/cockatrice/src/setsmodel.h index 88d3497c..17911db1 100644 --- a/cockatrice/src/setsmodel.h +++ b/cockatrice/src/setsmodel.h @@ -24,7 +24,7 @@ private: static const int NUM_COLS = 5; SetList sets; public: - enum SetsColumns { SortKeyCol, SetTypeCol, ShortNameCol, LongNameCol, ReleaseDateCol }; + enum SetsColumns { SortKeyCol, LongNameCol, ShortNameCol, SetTypeCol, ReleaseDateCol }; SetsModel(CardDatabase *_db, QObject *parent = 0); ~SetsModel(); diff --git a/oracle/src/oracleimporter.cpp b/oracle/src/oracleimporter.cpp index 273203c7..54ff9958 100644 --- a/oracle/src/oracleimporter.cpp +++ b/oracle/src/oracleimporter.cpp @@ -40,6 +40,9 @@ bool OracleImporter::readSetsFromByteArray(const QByteArray &data) editionLong = map.value("name").toString(); editionCards = map.value("cards"); setType = map.value("type").toString(); + // capitalize set type + if(setType.length() > 0) + setType[0] = setType[0].toUpper(); releaseDate = map.value("releaseDate").toDate(); // core and expansion sets are marked to be imported by default @@ -236,7 +239,7 @@ int OracleImporter::startImport() const SetToDownload * curSet; // add an empty set for tokens - CardSet *tokenSet = new CardSet(TOKENS_SETNAME, tr("Dummy set containing tokens"), "tokens"); + CardSet *tokenSet = new CardSet(TOKENS_SETNAME, tr("Dummy set containing tokens"), "Tokens"); sets.insert(TOKENS_SETNAME, tokenSet); while (it.hasNext())