fixed typo in oracle importer
This commit is contained in:
parent
3d1052f54c
commit
da6a1a0dbd
2 changed files with 9 additions and 4 deletions
|
@ -7,8 +7,13 @@
|
||||||
OracleImporter::OracleImporter(const QString &_dataDir, QObject *parent)
|
OracleImporter::OracleImporter(const QString &_dataDir, QObject *parent)
|
||||||
: CardDatabase(parent), dataDir(_dataDir), setIndex(-1)
|
: CardDatabase(parent), dataDir(_dataDir), setIndex(-1)
|
||||||
{
|
{
|
||||||
QFile setsFile(dataDir + "/sets.xml");
|
QString fileName = dataDir + "/sets.xml";
|
||||||
setsFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
QFile setsFile(fileName);
|
||||||
|
if (!setsFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
QMessageBox::critical(0, tr("Error"), tr("Cannot open file '%1'.").arg(fileName));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QXmlStreamReader xml(&setsFile);
|
QXmlStreamReader xml(&setsFile);
|
||||||
QString edition;
|
QString edition;
|
||||||
QString editionLong;
|
QString editionLong;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
WindowMain::WindowMain(QWidget *parent)
|
WindowMain::WindowMain(QWidget *parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
importer = new OracleImporter(qApp->applicationDirPath() + "../oracle", this);
|
importer = new OracleImporter(qApp->applicationDirPath() + "/../oracle", this);
|
||||||
|
|
||||||
QVBoxLayout *checkboxLayout = new QVBoxLayout;
|
QVBoxLayout *checkboxLayout = new QVBoxLayout;
|
||||||
QList<SetToDownload> &sets = importer->getSets();
|
QList<SetToDownload> &sets = importer->getSets();
|
||||||
|
@ -103,4 +103,4 @@ void WindowMain::checkBoxChanged(int state)
|
||||||
sets[i].setImport(state);
|
sets[i].setImport(state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue