diff --git a/StandardPaths.h b/StandardPaths.h
index b870d76..e612640 100755
--- a/StandardPaths.h
+++ b/StandardPaths.h
@@ -15,29 +15,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*****************************************************************************/
-
#ifndef STANDARDPATHS_H
#define STANDARDPATHS_H
#include
#if QT_VERSION >= 0x050000
-#include
-#include
-
-class StandardPaths : public QStandardPaths
-{
-public:
- static QString writableLocation(StandardLocation type);
-};
+#include "StandardPaths5.h"
#else
-#include
-#include
-
-class StandardPaths : public QDesktopServices
-{
-public:
- static QString writableLocation(StandardLocation type);
-};
+#include "StandardPaths4.h"
#endif
#endif // STANDARDPATHS_H
diff --git a/StandardPaths.cpp b/StandardPaths4.cpp
similarity index 89%
rename from StandardPaths.cpp
rename to StandardPaths4.cpp
index 29ec601..64acc44 100755
--- a/StandardPaths.cpp
+++ b/StandardPaths4.cpp
@@ -20,10 +20,5 @@
QString StandardPaths::writableLocation(StandardLocation type)
{
-#if QT_VERSION >= 0x050000
- return QStandardPaths::writableLocation(type);
-#else
-
return QDesktopServices::storageLocation(type);
-#endif
}
diff --git a/StandardPaths4.h b/StandardPaths4.h
new file mode 100755
index 0000000..b1016ea
--- /dev/null
+++ b/StandardPaths4.h
@@ -0,0 +1,30 @@
+/*****************************************************************************
+* gta5sync GRAND THEFT AUTO V SYNC
+* Copyright (C) 2016 Syping
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*****************************************************************************/
+#ifndef STANDARDPATHS4_H
+#define STANDARDPATHS4_H
+
+#include
+#include
+
+class StandardPaths : public QDesktopServices
+{
+public:
+ static QString writableLocation(StandardLocation type);
+};
+
+#endif // STANDARDPATHS4_H
diff --git a/StandardPaths5.cpp b/StandardPaths5.cpp
new file mode 100755
index 0000000..826bbef
--- /dev/null
+++ b/StandardPaths5.cpp
@@ -0,0 +1,24 @@
+/*****************************************************************************
+* gta5sync GRAND THEFT AUTO V SYNC
+* Copyright (C) 2016 Syping
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*****************************************************************************/
+
+#include "StandardPaths.h"
+
+QString StandardPaths::writableLocation(StandardLocation type)
+{
+ return QStandardPaths::writableLocation(type);
+}
diff --git a/StandardPaths5.h b/StandardPaths5.h
new file mode 100755
index 0000000..db12a86
--- /dev/null
+++ b/StandardPaths5.h
@@ -0,0 +1,30 @@
+/*****************************************************************************
+* gta5sync GRAND THEFT AUTO V SYNC
+* Copyright (C) 2016 Syping
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see .
+*****************************************************************************/
+#ifndef STANDARDPATHS5_H
+#define STANDARDPATHS5_H
+
+#include
+#include
+
+class StandardPaths : public QStandardPaths
+{
+public:
+ static QString writableLocation(StandardLocation type);
+};
+
+#endif // STANDARDPATHS5_H
diff --git a/gta5sync.pro b/gta5sync.pro
index 8014ccd..d74afd8 100755
--- a/gta5sync.pro
+++ b/gta5sync.pro
@@ -37,8 +37,7 @@ SOURCES += main.cpp \
SnapmaticWidget.cpp \
SavegameWidget.cpp \
ProfileLoader.cpp \
- AboutDialog.cpp \
- StandardPaths.cpp
+ AboutDialog.cpp
HEADERS += \
SnapmaticPicture.h \
@@ -96,3 +95,10 @@ isEqual(QT_MAJOR_VERSION, 4): SOURCES += qjson4/QJsonArray.cpp \
qjson4/QJsonValue.cpp \
qjson4/QJsonValueRef.cpp \
qjson4/QJsonParser.cpp
+
+# QT4/QT5 STANDARDPATHS CLASS
+
+isEqual(QT_MAJOR_VERSION, 4): HEADERS += StandardPaths4.h
+isEqual(QT_MAJOR_VERSION, 4): SOURCES += StandardPaths4.cpp
+greaterThan(QT_MAJOR_VERSION, 4): HEADERS += StandardPaths5.h
+greaterThan(QT_MAJOR_VERSION, 4): SOURCES += StandardPaths5.cpp