From 07affc28403b84fc4a01ab96b67cebe6ed0d0bd5 Mon Sep 17 00:00:00 2001 From: Rafael Date: Tue, 22 Mar 2016 22:49:15 +0100 Subject: [PATCH] fixed Qt5 build --- CrewDatabase.cpp | 11 ++++++++++- ProfileDatabase.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CrewDatabase.cpp b/CrewDatabase.cpp index d86e853..09e5639 100755 --- a/CrewDatabase.cpp +++ b/CrewDatabase.cpp @@ -17,14 +17,23 @@ *****************************************************************************/ #include "CrewDatabase.h" -#include #include #include +#ifdef QT5_MODE +#include +#else +#include +#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"; diff --git a/ProfileDatabase.cpp b/ProfileDatabase.cpp index e57aed8..d737a9a 100755 --- a/ProfileDatabase.cpp +++ b/ProfileDatabase.cpp @@ -17,14 +17,23 @@ *****************************************************************************/ #include "ProfileDatabase.h" -#include #include #include +#ifdef QT5_MODE +#include +#else +#include +#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";