Import data from mtgjson's allsets.xml
* add multiverse id to cards.xml * remove pictures urls from cards.xml TBD: * fix/clean oracle’s gui * add support in cockatrice
This commit is contained in:
parent
0d3ec71e8f
commit
f3a57d5506
5 changed files with 193 additions and 268 deletions
|
@ -406,12 +406,27 @@ QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardInfo *info)
|
||||||
xml.writeTextElement("name", info->getName());
|
xml.writeTextElement("name", info->getName());
|
||||||
|
|
||||||
const SetList &sets = info->getSets();
|
const SetList &sets = info->getSets();
|
||||||
|
QString tmpString;
|
||||||
|
QString tmpSet;
|
||||||
for (int i = 0; i < sets.size(); i++) {
|
for (int i = 0; i < sets.size(); i++) {
|
||||||
xml.writeStartElement("set");
|
xml.writeStartElement("set");
|
||||||
xml.writeAttribute("picURL", info->getPicURL(sets[i]->getShortName()));
|
|
||||||
xml.writeAttribute("picURLHq", info->getPicURLHq(sets[i]->getShortName()));
|
tmpSet=sets[i]->getShortName();
|
||||||
xml.writeAttribute("picURLSt", info->getPicURLSt(sets[i]->getShortName()));
|
xml.writeAttribute("muId", QString::number(info->getMuId(tmpSet)));
|
||||||
xml.writeCharacters(sets[i]->getShortName());
|
|
||||||
|
tmpString = info->getPicURL(tmpSet);
|
||||||
|
if(!tmpString.isEmpty())
|
||||||
|
xml.writeAttribute("picURL", tmpString);
|
||||||
|
|
||||||
|
tmpString = info->getPicURLHq(tmpSet);
|
||||||
|
if(!tmpString.isEmpty())
|
||||||
|
xml.writeAttribute("picURLHq", tmpString);
|
||||||
|
|
||||||
|
tmpString = info->getPicURLSt(tmpSet);
|
||||||
|
if(!tmpString.isEmpty())
|
||||||
|
xml.writeAttribute("picURLSt", tmpString);
|
||||||
|
|
||||||
|
xml.writeCharacters(tmpSet);
|
||||||
xml.writeEndElement();
|
xml.writeEndElement();
|
||||||
}
|
}
|
||||||
const QStringList &colors = info->getColors();
|
const QStringList &colors = info->getColors();
|
||||||
|
|
|
@ -100,6 +100,7 @@ private:
|
||||||
QStringList colors;
|
QStringList colors;
|
||||||
int loyalty;
|
int loyalty;
|
||||||
QMap<QString, QString> picURLs, picURLsHq, picURLsSt;
|
QMap<QString, QString> picURLs, picURLsHq, picURLsSt;
|
||||||
|
QMap<QString, int> muIds;
|
||||||
bool cipt;
|
bool cipt;
|
||||||
int tableRow;
|
int tableRow;
|
||||||
QPixmap *pixmap;
|
QPixmap *pixmap;
|
||||||
|
@ -139,6 +140,7 @@ public:
|
||||||
QString getPicURL(const QString &set) const { return picURLs.value(set); }
|
QString getPicURL(const QString &set) const { return picURLs.value(set); }
|
||||||
QString getPicURLHq(const QString &set) const { return picURLsHq.value(set); }
|
QString getPicURLHq(const QString &set) const { return picURLsHq.value(set); }
|
||||||
QString getPicURLSt(const QString &set) const { return picURLsSt.value(set); }
|
QString getPicURLSt(const QString &set) const { return picURLsSt.value(set); }
|
||||||
|
int getMuId(const QString &set) const { return muIds.value(set); }
|
||||||
QString getPicURL() const;
|
QString getPicURL() const;
|
||||||
const QMap<QString, QString> &getPicURLs() const { return picURLs; }
|
const QMap<QString, QString> &getPicURLs() const { return picURLs; }
|
||||||
QString getMainCardType() const;
|
QString getMainCardType() const;
|
||||||
|
@ -149,6 +151,7 @@ public:
|
||||||
void setPicURL(const QString &_set, const QString &_picURL) { picURLs.insert(_set, _picURL); }
|
void setPicURL(const QString &_set, const QString &_picURL) { picURLs.insert(_set, _picURL); }
|
||||||
void setPicURLHq(const QString &_set, const QString &_picURL) { picURLsHq.insert(_set, _picURL); }
|
void setPicURLHq(const QString &_set, const QString &_picURL) { picURLsHq.insert(_set, _picURL); }
|
||||||
void setPicURLSt(const QString &_set, const QString &_picURL) { picURLsSt.insert(_set, _picURL); }
|
void setPicURLSt(const QString &_set, const QString &_picURL) { picURLsSt.insert(_set, _picURL); }
|
||||||
|
void setMuId(const QString &_set, const int &_muId) { muIds.insert(_set, _muId); }
|
||||||
void addToSet(CardSet *set);
|
void addToSet(CardSet *set);
|
||||||
QPixmap *loadPixmap();
|
QPixmap *loadPixmap();
|
||||||
QPixmap *getPixmap(QSize size);
|
QPixmap *getPixmap(QSize size);
|
||||||
|
|
|
@ -1,20 +1,12 @@
|
||||||
#include "oracleimporter.h"
|
#include "oracleimporter.h"
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtNetwork>
|
|
||||||
#include <QXmlStreamReader>
|
|
||||||
#include <QDomDocument>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "qt-json/json.h"
|
#include "qt-json/json.h"
|
||||||
|
|
||||||
OracleImporter::OracleImporter(const QString &_dataDir, QObject *parent)
|
OracleImporter::OracleImporter(const QString &_dataDir, QObject *parent)
|
||||||
: CardDatabase(parent), dataDir(_dataDir), setIndex(-1)
|
: CardDatabase(parent), dataDir(_dataDir)
|
||||||
{
|
{
|
||||||
buffer = new QBuffer(this);
|
|
||||||
http = new QHttp(this);
|
|
||||||
connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpRequestFinished(int, bool)));
|
|
||||||
connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
|
|
||||||
connect(http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OracleImporter::readSetsFromFile(const QString &fileName)
|
bool OracleImporter::readSetsFromFile(const QString &fileName)
|
||||||
|
@ -25,48 +17,39 @@ bool OracleImporter::readSetsFromFile(const QString &fileName)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QXmlStreamReader xml(&setsFile);
|
return readSetsFromByteArray(setsFile.readAll());
|
||||||
return readSetsFromXml(xml);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OracleImporter::readSetsFromByteArray(const QByteArray &data)
|
bool OracleImporter::readSetsFromByteArray(const QByteArray &data)
|
||||||
{
|
|
||||||
QXmlStreamReader xml(data);
|
|
||||||
return readSetsFromXml(xml);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OracleImporter::readSetsFromXml(QXmlStreamReader &xml)
|
|
||||||
{
|
{
|
||||||
QList<SetToDownload> newSetList;
|
QList<SetToDownload> newSetList;
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
setsMap = QtJson::Json::parse(QString(data), ok).toMap();
|
||||||
|
if (!ok) {
|
||||||
|
qDebug() << "error: QtJson::Json::parse()";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QListIterator<QVariant> it(setsMap.values());
|
||||||
|
QVariantMap map;
|
||||||
|
|
||||||
QString edition;
|
QString edition;
|
||||||
QString editionLong;
|
QString editionLong;
|
||||||
QString editionURL;
|
QVariant editionCards;
|
||||||
while (!xml.atEnd()) {
|
bool import;
|
||||||
if (xml.readNext() == QXmlStreamReader::EndElement)
|
|
||||||
break;
|
while (it.hasNext()) {
|
||||||
if (xml.name() == "set") {
|
map = it.next().toMap();
|
||||||
bool import = xml.attributes().value("import").toString().toInt();
|
edition = map.value("code").toString();
|
||||||
while (!xml.atEnd()) {
|
editionLong = map.value("name").toString();
|
||||||
if (xml.readNext() == QXmlStreamReader::EndElement)
|
editionCards = map.value("cards");
|
||||||
break;
|
|
||||||
if (xml.name() == "name")
|
// core and expansion sets are marked to be imported by default
|
||||||
edition = xml.readElementText();
|
import = (0 == QString::compare(map.value("type").toString(), QString("core"), Qt::CaseInsensitive) ||
|
||||||
else if (xml.name() == "longname")
|
0 == QString::compare(map.value("type").toString(), QString("expansion"), Qt::CaseInsensitive));
|
||||||
editionLong = xml.readElementText();
|
|
||||||
else if (xml.name() == "url")
|
newSetList.append(SetToDownload(edition, editionLong, editionCards, import));
|
||||||
editionURL = xml.readElementText();
|
|
||||||
}
|
|
||||||
newSetList.append(SetToDownload(edition, editionLong, editionURL, import));
|
|
||||||
edition = editionLong = editionURL = QString();
|
|
||||||
} else if (xml.name() == "picture_url")
|
|
||||||
pictureUrl = xml.readElementText();
|
|
||||||
else if (xml.name() == "picture_url_hq")
|
|
||||||
pictureUrlHq = xml.readElementText();
|
|
||||||
else if (xml.name() == "picture_url_st")
|
|
||||||
pictureUrlSt = xml.readElementText();
|
|
||||||
else if (xml.name() == "set_url")
|
|
||||||
setUrl = xml.readElementText();
|
|
||||||
}
|
}
|
||||||
if (newSetList.isEmpty())
|
if (newSetList.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
@ -140,23 +123,16 @@ CardInfo *OracleImporter::addCard(const QString &setName,
|
||||||
|
|
||||||
cardHash.insert(cardName, card);
|
cardHash.insert(cardName, card);
|
||||||
}
|
}
|
||||||
card->setPicURL(setName, getPictureUrl(pictureUrl, cardId, cardName, setName));
|
card->setMuId(setName, cardId);
|
||||||
card->setPicURLHq(setName, getPictureUrl(pictureUrlHq, cardId, cardName, setName));
|
|
||||||
card->setPicURLSt(setName, getPictureUrl(pictureUrlSt, cardId, cardName, setName));
|
|
||||||
return card;
|
return card;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OracleImporter::importTextSpoiler(CardSet *set, const QByteArray &data)
|
int OracleImporter::importTextSpoiler(CardSet *set, const QVariant &data)
|
||||||
{
|
{
|
||||||
int cards = 0;
|
int cards = 0;
|
||||||
bool ok;
|
|
||||||
QVariantMap resultMap = QtJson::Json::parse(QString(data), ok).toMap();
|
|
||||||
if (!ok) {
|
|
||||||
qDebug() << "error: QtJson::Json::parse()";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
QListIterator<QVariant> it(resultMap.value("cards").toList());
|
QListIterator<QVariant> it(data.toList());
|
||||||
QVariantMap map;
|
QVariantMap map;
|
||||||
QString cardName;
|
QString cardName;
|
||||||
QString cardCost;
|
QString cardCost;
|
||||||
|
@ -237,7 +213,7 @@ int OracleImporter::importTextSpoiler(CardSet *set, const QByteArray &data)
|
||||||
|
|
||||||
return cards;
|
return cards;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
QString OracleImporter::getPictureUrl(QString url, int cardId, QString name, const QString &setName) const
|
QString OracleImporter::getPictureUrl(QString url, int cardId, QString name, const QString &setName) const
|
||||||
{
|
{
|
||||||
if ((name == "Island") || (name == "Swamp") || (name == "Mountain") || (name == "Plains") || (name == "Forest"))
|
if ((name == "Island") || (name == "Swamp") || (name == "Mountain") || (name == "Plains") || (name == "Forest"))
|
||||||
|
@ -255,93 +231,34 @@ QString OracleImporter::getPictureUrl(QString url, int cardId, QString name, con
|
||||||
// .replace('-', '_')
|
// .replace('-', '_')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
int OracleImporter::startDownload()
|
int OracleImporter::startImport()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
setsToDownload.clear();
|
int setCards = 0, setIndex= 0;
|
||||||
for (int i = 0; i < allSets.size(); ++i)
|
QListIterator<SetToDownload> it(allSets);
|
||||||
if (allSets[i].getImport())
|
const SetToDownload * curSet;
|
||||||
setsToDownload.append(allSets[i]);
|
|
||||||
|
|
||||||
if (setsToDownload.isEmpty())
|
while (it.hasNext())
|
||||||
return 0;
|
{
|
||||||
setIndex = 0;
|
curSet = & it.next();
|
||||||
emit setIndexChanged(0, 0, setsToDownload[0].getLongName());
|
|
||||||
|
|
||||||
downloadNextFile();
|
emit setIndexChanged(0, 0, curSet->getLongName());
|
||||||
return setsToDownload.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OracleImporter::downloadNextFile()
|
CardSet *set = new CardSet(curSet->getShortName(), curSet->getLongName());
|
||||||
{
|
|
||||||
QString urlString = setsToDownload[setIndex].getUrl();
|
|
||||||
if (urlString.isEmpty())
|
|
||||||
urlString = setUrl;
|
|
||||||
urlString = urlString.replace("!name!", setsToDownload[setIndex].getShortName());
|
|
||||||
|
|
||||||
if (urlString.startsWith("http://")) {
|
|
||||||
QUrl url(urlString);
|
|
||||||
http->setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
|
|
||||||
QString path = QUrl::toPercentEncoding(urlString.mid(url.host().size() + 7).replace(' ', '+'), "?!$&'()*+,;=:@/");
|
|
||||||
|
|
||||||
buffer->close();
|
|
||||||
buffer->setData(QByteArray());
|
|
||||||
buffer->open(QIODevice::ReadWrite | QIODevice::Text);
|
|
||||||
reqId = http->get(path, buffer);
|
|
||||||
} else {
|
|
||||||
QFile file(dataDir + "/" + urlString);
|
|
||||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
|
||||||
|
|
||||||
buffer->close();
|
|
||||||
buffer->setData(file.readAll());
|
|
||||||
buffer->open(QIODevice::ReadWrite | QIODevice::Text);
|
|
||||||
reqId = 0;
|
|
||||||
httpRequestFinished(reqId, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OracleImporter::httpRequestFinished(int requestId, bool error)
|
|
||||||
{
|
|
||||||
if (error) {
|
|
||||||
QMessageBox::information(0, tr("HTTP"), tr("Error."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (requestId != reqId)
|
|
||||||
return;
|
|
||||||
|
|
||||||
CardSet *set = new CardSet(setsToDownload[setIndex].getShortName(), setsToDownload[setIndex].getLongName());
|
|
||||||
if (!setHash.contains(set->getShortName()))
|
if (!setHash.contains(set->getShortName()))
|
||||||
setHash.insert(set->getShortName(), set);
|
setHash.insert(set->getShortName(), set);
|
||||||
|
|
||||||
buffer->seek(0);
|
int setCards = importTextSpoiler(set, curSet->getCards());
|
||||||
buffer->close();
|
|
||||||
int cards = importTextSpoiler(set, buffer->data());
|
|
||||||
if (cards > 0)
|
|
||||||
++setIndex;
|
++setIndex;
|
||||||
|
|
||||||
if (setIndex == setsToDownload.size()) {
|
emit setIndexChanged(setCards, setIndex, curSet->getLongName());
|
||||||
emit setIndexChanged(cards, setIndex, QString());
|
|
||||||
setIndex = -1;
|
|
||||||
} else {
|
|
||||||
downloadNextFile();
|
|
||||||
emit setIndexChanged(cards, setIndex, setsToDownload[setIndex].getLongName());
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void OracleImporter::readResponseHeader(const QHttpResponseHeader &responseHeader)
|
emit setIndexChanged(setCards, setIndex, QString());
|
||||||
{
|
|
||||||
switch (responseHeader.statusCode()) {
|
// total number of sets
|
||||||
case 200:
|
return setIndex;
|
||||||
case 301:
|
|
||||||
case 302:
|
|
||||||
case 303:
|
|
||||||
case 307:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
QMessageBox::information(0, tr("HTTP"), tr("Download failed: %1.").arg(responseHeader.reasonPhrase()));
|
|
||||||
http->abort();
|
|
||||||
deleteLater();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,34 @@
|
||||||
#ifndef ORACLEIMPORTER_H
|
#ifndef ORACLEIMPORTER_H
|
||||||
#define ORACLEIMPORTER_H
|
#define ORACLEIMPORTER_H
|
||||||
|
|
||||||
#include <carddatabase.h>
|
#include <QMap>
|
||||||
#include <QHttp>
|
|
||||||
|
|
||||||
class QBuffer;
|
#include <carddatabase.h>
|
||||||
class QXmlStreamReader;
|
|
||||||
|
|
||||||
class SetToDownload {
|
class SetToDownload {
|
||||||
private:
|
private:
|
||||||
QString shortName, longName, url;
|
QString shortName, longName;
|
||||||
bool import;
|
bool import;
|
||||||
|
QVariant cards;
|
||||||
public:
|
public:
|
||||||
const QString &getShortName() const { return shortName; }
|
const QString &getShortName() const { return shortName; }
|
||||||
const QString &getLongName() const { return longName; }
|
const QString &getLongName() const { return longName; }
|
||||||
const QString &getUrl() const { return url; }
|
const QVariant &getCards() const { return cards; }
|
||||||
bool getImport() const { return import; }
|
bool getImport() const { return import; }
|
||||||
void setImport(bool _import) { import = _import; }
|
void setImport(bool _import) { import = _import; }
|
||||||
SetToDownload(const QString &_shortName, const QString &_longName, const QString &_url, bool _import)
|
SetToDownload(const QString &_shortName, const QString &_longName, const QVariant &_cards, bool _import)
|
||||||
: shortName(_shortName), longName(_longName), url(_url), import(_import) { }
|
: shortName(_shortName), longName(_longName), cards(_cards), import(_import) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class OracleImporter : public CardDatabase {
|
class OracleImporter : public CardDatabase {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QList<SetToDownload> allSets, setsToDownload;
|
QList<SetToDownload> allSets;
|
||||||
QString pictureUrl, pictureUrlHq, pictureUrlSt, setUrl;
|
QVariantMap setsMap;
|
||||||
QString dataDir;
|
QString dataDir;
|
||||||
int setIndex;
|
|
||||||
int reqId;
|
|
||||||
QBuffer *buffer;
|
|
||||||
QHttp *http;
|
|
||||||
QString getPictureUrl(QString url, int cardId, QString name, const QString &setName) const;
|
|
||||||
|
|
||||||
void downloadNextFile();
|
void downloadNextFile();
|
||||||
bool readSetsFromXml(QXmlStreamReader &xml);
|
|
||||||
CardInfo *addCard(const QString &setName, QString cardName, bool isToken, int cardId, const QString &cardCost, const QString &cardType, const QString &cardPT, int cardLoyalty, const QStringList &cardText);
|
CardInfo *addCard(const QString &setName, QString cardName, bool isToken, int cardId, const QString &cardCost, const QString &cardType, const QString &cardPT, int cardLoyalty, const QStringList &cardText);
|
||||||
private slots:
|
|
||||||
void httpRequestFinished(int requestId, bool error);
|
|
||||||
void readResponseHeader(const QHttpResponseHeader &responseHeader);
|
|
||||||
signals:
|
signals:
|
||||||
void setIndexChanged(int cardsImported, int setIndex, const QString &nextSetName);
|
void setIndexChanged(int cardsImported, int setIndex, const QString &nextSetName);
|
||||||
void dataReadProgress(int bytesRead, int totalBytes);
|
void dataReadProgress(int bytesRead, int totalBytes);
|
||||||
|
@ -46,8 +36,8 @@ public:
|
||||||
OracleImporter(const QString &_dataDir, QObject *parent = 0);
|
OracleImporter(const QString &_dataDir, QObject *parent = 0);
|
||||||
bool readSetsFromByteArray(const QByteArray &data);
|
bool readSetsFromByteArray(const QByteArray &data);
|
||||||
bool readSetsFromFile(const QString &fileName);
|
bool readSetsFromFile(const QString &fileName);
|
||||||
int startDownload();
|
int startImport();
|
||||||
int importTextSpoiler(CardSet *set, const QByteArray &data);
|
int importTextSpoiler(CardSet *set, const QVariant &data);
|
||||||
QList<SetToDownload> &getSets() { return allSets; }
|
QList<SetToDownload> &getSets() { return allSets; }
|
||||||
const QString &getDataDir() const { return dataDir; }
|
const QString &getDataDir() const { return dataDir; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "window_main.h"
|
#include "window_main.h"
|
||||||
#include "oracleimporter.h"
|
#include "oracleimporter.h"
|
||||||
|
|
||||||
const QString WindowMain::defaultSetsUrl = QString("http://www.woogerworks.com/files/sets.xml");
|
const QString WindowMain::defaultSetsUrl = QString("http://mtgjson.com/json/AllSets.json");
|
||||||
|
|
||||||
WindowMain::WindowMain(QWidget *parent)
|
WindowMain::WindowMain(QWidget *parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
|
@ -45,7 +45,7 @@ WindowMain::WindowMain(QWidget *parent)
|
||||||
checkAllButtonLayout->addWidget(checkAllButton);
|
checkAllButtonLayout->addWidget(checkAllButton);
|
||||||
checkAllButtonLayout->addWidget(uncheckAllButton);
|
checkAllButtonLayout->addWidget(uncheckAllButton);
|
||||||
|
|
||||||
startButton = new QPushButton(tr("&Start download"));
|
startButton = new QPushButton(tr("&Start import"));
|
||||||
connect(startButton, SIGNAL(clicked()), this, SLOT(actStart()));
|
connect(startButton, SIGNAL(clicked()), this, SLOT(actStart()));
|
||||||
|
|
||||||
QVBoxLayout *settingsLayout = new QVBoxLayout;
|
QVBoxLayout *settingsLayout = new QVBoxLayout;
|
||||||
|
@ -130,7 +130,7 @@ void WindowMain::actLoadSetsFile()
|
||||||
{
|
{
|
||||||
QFileDialog dialog(this, tr("Load sets file"));
|
QFileDialog dialog(this, tr("Load sets file"));
|
||||||
dialog.setFileMode(QFileDialog::ExistingFile);
|
dialog.setFileMode(QFileDialog::ExistingFile);
|
||||||
dialog.setNameFilter("Sets XML file (*.xml)");
|
dialog.setNameFilter("Sets JSON file (*.json)");
|
||||||
if (!dialog.exec())
|
if (!dialog.exec())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ void WindowMain::actUncheckAll()
|
||||||
|
|
||||||
void WindowMain::actStart()
|
void WindowMain::actStart()
|
||||||
{
|
{
|
||||||
int setsCount = importer->startDownload();
|
int setsCount = importer->startImport();
|
||||||
if (!setsCount) {
|
if (!setsCount) {
|
||||||
QMessageBox::critical(this, tr("Error"), tr("No sets to download selected."));
|
QMessageBox::critical(this, tr("Error"), tr("No sets to download selected."));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue