summaryrefslogtreecommitdiff
path: root/imagecache.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-02 13:25:14 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-02 13:25:14 +0200
commit07abe301396f9b0fbfca67d4b4f6df6b9fdf6e82 (patch)
tree0aae75aadd6aa1d0eeba91229922711a291bab07 /imagecache.cpp
parent7107c0f96f10303ea49bf5dc27f525e4cbc191d9 (diff)
downloadtapasboard-07abe301396f9b0fbfca67d4b4f6df6b9fdf6e82.tar.gz
tapasboard-07abe301396f9b0fbfca67d4b4f6df6b9fdf6e82.zip
use a qnetworkdiskcache for images instead of custom provider
Diffstat (limited to 'imagecache.cpp')
-rw-r--r--imagecache.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/imagecache.cpp b/imagecache.cpp
new file mode 100644
index 0000000..e59ffdf
--- /dev/null
+++ b/imagecache.cpp
@@ -0,0 +1,16 @@
+#include <QtCore/QDir>
+#include <QtCore/QDebug>
+
+#include "global.h"
+#include "imagecache.h"
+
+ImageCache::ImageCache(QObject *parent) :
+ QNetworkDiskCache(parent)
+{
+ QString cache_path = board_manager->getCachePath() + "/images";
+ QDir dir;
+ if (!dir.mkpath(cache_path)) {
+ qWarning() << "Could not create image cache path" << cache_path;
+ }
+ setCacheDirectory(cache_path);
+}