mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 17:45:09 -07:00
Merge branch 'master' into tooomm-qt5
This commit is contained in:
commit
4fba3c31f2
275 changed files with 66660 additions and 44237 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include <QLibraryInfo>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
#include <libcockatrice/settings/personal_settings.h>
|
||||
|
||||
QTranslator *translator, *qtTranslator;
|
||||
ThemeManager *themeManager;
|
||||
|
|
@ -21,7 +22,7 @@ bool isBackgrounded;
|
|||
|
||||
void installNewTranslator()
|
||||
{
|
||||
QString lang = SettingsCache::instance().getLang();
|
||||
QString lang = SettingsCache::instance().personal().getLang();
|
||||
|
||||
QString qtNameHint = "qt_" + lang;
|
||||
QString qtTranslationPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath);
|
||||
|
|
|
|||
|
|
@ -291,12 +291,13 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QList
|
|||
|
||||
// per-set properties
|
||||
PrintingInfo printingInfo = PrintingInfo(currentSet);
|
||||
QVariantHash printingProps;
|
||||
for (auto i = setInfoProperties.cbegin(), end = setInfoProperties.cend(); i != end; ++i) {
|
||||
QString mtgjsonProperty = i.key();
|
||||
QString xmlPropertyName = i.value();
|
||||
QString propertyValue = getStringPropertyFromMap(card, mtgjsonProperty);
|
||||
if (!propertyValue.isEmpty()) {
|
||||
printingInfo.setProperty(xmlPropertyName, propertyValue);
|
||||
printingProps.insert(xmlPropertyName, propertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +305,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QList
|
|||
QString faceFlavorName = getStringPropertyFromMap(card, "faceFlavorName");
|
||||
QString flavorName = !faceFlavorName.isEmpty() ? faceFlavorName : getStringPropertyFromMap(card, "flavorName");
|
||||
if (!flavorName.isEmpty()) {
|
||||
printingInfo.setProperty("flavorName", flavorName);
|
||||
printingProps.insert("flavorName", flavorName);
|
||||
}
|
||||
|
||||
// Identifiers
|
||||
|
|
@ -313,10 +314,12 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QList
|
|||
QString xmlPropertyName = i.value();
|
||||
QString propertyValue = getStringPropertyFromMap(card.value("identifiers").toMap(), mtgjsonProperty);
|
||||
if (!propertyValue.isEmpty()) {
|
||||
printingInfo.setProperty(xmlPropertyName, propertyValue);
|
||||
printingProps.insert(xmlPropertyName, propertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
printingInfo.setProperties(printingProps);
|
||||
|
||||
QString numComponent;
|
||||
const QString numProperty = printingInfo.getProperty("num");
|
||||
const QChar lastChar = numProperty.isEmpty() ? QChar() : numProperty.back();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include <QScrollBar>
|
||||
#include <QtConcurrent>
|
||||
#include <QtGui>
|
||||
#include <libcockatrice/settings/personal_settings.h>
|
||||
|
||||
OracleWizard::OracleWizard(QWidget *parent) : QWizard(parent)
|
||||
{
|
||||
|
|
@ -33,7 +34,7 @@ OracleWizard::OracleWizard(QWidget *parent) : QWizard(parent)
|
|||
migrateOracleSettings();
|
||||
}
|
||||
|
||||
connect(&SettingsCache::instance(), &SettingsCache::langChanged, this, &OracleWizard::updateLanguage);
|
||||
connect(&SettingsCache::instance().personal(), &PersonalSettings::langChanged, this, &OracleWizard::updateLanguage);
|
||||
|
||||
importer = new OracleImporter(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <QTextEdit>
|
||||
#include <QtConcurrent>
|
||||
#include <QtGui>
|
||||
#include <libcockatrice/settings/personal_settings.h>
|
||||
|
||||
#ifdef HAS_LZMA
|
||||
#include "lzma/decompress.h"
|
||||
|
|
@ -119,7 +120,7 @@ QString IntroPage::languageName(const QString &lang)
|
|||
|
||||
void IntroPage::languageBoxChanged(int index)
|
||||
{
|
||||
SettingsCache::instance().setLang(languageBox->itemData(index).toString());
|
||||
SettingsCache::instance().personal().setLang(languageBox->itemData(index).toString());
|
||||
}
|
||||
|
||||
void IntroPage::retranslateUi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue