void-packages/srcpkgs/transmission/patches/patch-qt_favicon_cc

27 lines
702 B
Text

--- qt/favicon.cc.orig Fri Aug 9 04:45:47 2013
+++ qt/favicon.cc Thu Aug 22 16:39:50 2013
@@ -14,7 +14,12 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
+
+#if QT_VERSION >= 0x050000
#include <QStandardPaths>
+#else
+#include <QDesktopServices>
+#endif
#include "favicon.h"
@@ -40,7 +45,11 @@ Favicons :: ~Favicons( )
QString
Favicons :: getCacheDir( )
{
+#if QT_VERSION >= 0x050000
const QString base = QStandardPaths::writableLocation (QStandardPaths::CacheLocation);
+#else
+ const QString base = QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
+#endif
return QDir( base ).absoluteFilePath( "favicons" );
}