Ported oracle to Qt5

This commit is contained in:
Fabio Bas
2014-06-24 18:28:09 +02:00
parent 5c13c06982
commit 80f68306b5
4 changed files with 45 additions and 5 deletions

View File

@@ -1,8 +1,25 @@
#include <QtGui>
#if QT_VERSION < 0x050000
#include <QDesktopServices>
#else
#include <QStandardPaths>
#endif
#include <QAbstractButton>
#include <QtConcurrent>
#include <QCheckBox>
#include <QFileDialog>
#include <QGridLayout>
#include <QDesktopServices>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QProgressBar>
#include <QPushButton>
#include <QRadioButton>
#include <QScrollArea>
#include <QScrollBar>
#include <QTextEdit>
#include "oraclewizard.h"
#include "oracleimporter.h"
@@ -13,7 +30,14 @@ OracleWizard::OracleWizard(QWidget *parent)
: QWizard(parent)
{
settings = new QSettings(this);
importer = new OracleImporter(QDesktopServices::storageLocation(QDesktopServices::DataLocation), this);
importer = new OracleImporter(
#if QT_VERSION < 0x050000
QDesktopServices::storageLocation(QDesktopServices::DataLocation)
#else
QStandardPaths::standardLocations(QStandardPaths::DataLocation).first()
#endif
, this);
addPage(new IntroPage);
addPage(new LoadSetsPage);
@@ -372,7 +396,12 @@ void SaveSetsPage::updateTotalProgress(int cardsImported, int setIndex, const QS
bool SaveSetsPage::validatePage()
{
bool ok = false;
const QString dataDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
const QString dataDir =
#if QT_VERSION < 0x050000
QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#else
QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();
#endif
QDir dir(dataDir);
if (!dir.exists())
dir.mkpath(dataDir);