summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-05-15 16:46:00 +0300
committerAndrew Knight <andrew.knight@digia.com>2014-05-16 09:14:29 +0200
commit835c86e72dd4fe548e98beb8695f5ad8d840d54e (patch)
tree8831890a809bcbd2e1d293b4371c34643366bdce
parenta767530b655658df18f95e66e85410e8eeb3c1be (diff)
Fix image provider URL loading
The local file URL is passed in with the file scheme removed. This means that URL encodings to the local path may end up in the file name, which may not load on some platforms. So, reparse this as a file URL and convert it to a local file name string. Change-Id: Iac32e7adde717e9ab2dce77d9237cd1cfc526fe6 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
-rw-r--r--src/weatherimageprovider.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/weatherimageprovider.h b/src/weatherimageprovider.h
index 48319f2..2250dfe 100644
--- a/src/weatherimageprovider.h
+++ b/src/weatherimageprovider.h
@@ -63,7 +63,7 @@ public:
QImage image(requestedSize.width() > 0 ? requestedSize.width() : width,
requestedSize.height() > 0 ? requestedSize.height() : height,
QImage::Format_ARGB32);
- image.load(id);
+ image.load(QUrl("file:/" + id).toLocalFile());
return image;
}
};