StandardPaths class for Qt4, SyncFramework deleted for a future rewrite

This commit is contained in:
Rafael 2016-03-28 12:23:50 +02:00
parent b280ce1423
commit bfa84a5e99
8 changed files with 61 additions and 170 deletions

View file

@ -17,23 +17,14 @@
*****************************************************************************/
#include "ProfileDatabase.h"
#include "StandardPaths.h"
#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.setPath(StandardPaths::writableLocation(StandardPaths::DataLocation));
dir.mkdir("../gta5sync");
QString dirPath = dir.absolutePath();
QString defaultConfPath = dirPath + "/players.ini";