]> git.sur5r.net Git - minitube/blobdiff - src/ytchannel.cpp
Add a set of paths helper functions and use it.
[minitube] / src / ytchannel.cpp
index d5fa79508a31cc55c0671fb1ecbbad5b0c63d359..cd5531cb927f737022f7dacb89b5477915e132a4 100644 (file)
@@ -28,6 +28,7 @@ $END_LICENSE */
 #include <QtScript>
 #endif
 #include "compatibility/qurlqueryhelper.h"
+#include "compatibility/pathsservice.h"
 
 namespace The {
 NetworkAccess* http();
@@ -190,13 +191,7 @@ void YTChannel::loadThumbnail() {
 }
 
 const QString & YTChannel::getThumbnailDir() {
-    static const QString thumbDir =
-        #if QT_VERSION >= 0x050000
-            QStandardPaths::writableLocation(QStandardPaths::DataLocation)
-        #else
-            QDesktopServices::storageLocation(QDesktopServices::DataLocation)
-        #endif
-            + "/channels/";
+    static const QString thumbDir = Paths::getDataLocation() + "/channels/";
     return thumbDir;
 }