]> git.sur5r.net Git - minitube/blobdiff - src/jsfunctions.cpp
Add a set of paths helper functions and use it.
[minitube] / src / jsfunctions.cpp
index ede450e6ca81f9e37202b865a4f436b159bba6e1..a65c844d7e2d8c7c3747978a3293533a7ff5f784 100644 (file)
@@ -20,9 +20,9 @@ $END_LICENSE */
 
 #include "jsfunctions.h"
 #include "networkaccess.h"
-#include <QDesktopServices>
 #include "constants.h"
 #include "compatibility/qurlqueryhelper.h"
+#include "compatibility/pathsservice.h"
 
 namespace The {
 NetworkAccess* http();
@@ -65,13 +65,7 @@ QString JsFunctions::jsFilename() {
 }
 
 QString JsFunctions::jsPath() {
-    return QString(
-            #if QT_VERSION >= 0x050000
-                QStandardPaths::writableLocation(QStandardPaths::DataLocation)
-            #else
-                QDesktopServices::storageLocation(QDesktopServices::DataLocation)
-            #endif
-                + "/" + jsFilename());
+    return Paths::getDataLocation() + "/" + jsFilename();
 }
 
 void JsFunctions::loadJs() {