fixed Qt5 build

This commit is contained in:
Rafael 2016-03-22 22:49:15 +01:00
parent f49f311333
commit 07affc2840
2 changed files with 20 additions and 2 deletions

View file

@ -17,14 +17,23 @@
*****************************************************************************/
#include "CrewDatabase.h"
#include <QDesktopServices>
#include <QFile>
#include <QDir>
#ifdef QT5_MODE
#include <QStandardPaths>
#else
#include <QDesktopServices>
#endif
CrewDatabase::CrewDatabase(QObject *parent) : QObject(parent)
{
QDir dir;
#ifdef QT5_MODE
dir.setPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
#else
dir.setPath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
#endif
dir.mkdir("../gta5sync");
QString dirPath = dir.absolutePath();
QString defaultConfPath = dirPath + "/crews.ini";

View file

@ -17,14 +17,23 @@
*****************************************************************************/
#include "ProfileDatabase.h"
#include <QDesktopServices>
#include <QFile>
#include <QDir>
#ifdef QT5_MODE
#include <QStandardPaths>
#else
#include <QDesktopServices>
#endif
ProfileDatabase::ProfileDatabase(QObject *parent) : QObject(parent)
{
QDir dir;
#ifdef QT5_MODE
dir.setPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
#else
dir.setPath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
#endif
dir.mkdir("../gta5sync");
QString dirPath = dir.absolutePath();
QString defaultConfPath = dirPath + "/players.ini";