diff options
authorRichard Moe Gustavsen <>2015-06-04 13:44:29 +0200
committerRichard Moe Gustavsen <>2015-06-10 10:42:31 +0000
commit45edf00fa863cf0a6b311a9789793b08eaf2c054 (patch)
parent9ca4c2e71f83cbca60918eb1459ab6f80fb6c430 (diff)
iOS: handle loading assets with different format than jpg
The current implementation assumed that the image format of the file loaded would be jpg. This has proven not to be correct, e.g sometimes the format is png. This patch will change how the image url is reconstructed so we doesn't loose/hard code the format. Change-Id: I22d8ca0108e52d3670c2601f0bb9255406b896cf Reviewed-by: Tor Arne VestbΓΈ <>
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/ b/src/plugins/platforms/ios/
index 44a7901160..f0b6afce2d 100644
--- a/src/plugins/platforms/ios/
+++ b/src/plugins/platforms/ios/
@@ -429,11 +429,11 @@ void QIOSFileEngineAssetsLibrary::setFileName(const QString &file)
// QUrl::fromLocalFile() will remove double slashes. Since the asset url is
// passed around as a file name in the app (and converted to/from a file url, e.g
// in QFileDialog), we need to ensure that m_assetUrl ends up being valid.
- int index = file.indexOf(QLatin1String("asset.JPG?"));
+ int index = file.indexOf(QLatin1String("/asset"));
if (index == -1)
m_assetUrl = QLatin1String("assets-library://");
- m_assetUrl = QLatin1String("assets-library://asset/") + file.mid(index);
+ m_assetUrl = QLatin1String("assets-library:/") + file.mid(index);
QStringList QIOSFileEngineAssetsLibrary::entryList(QDir::Filters filters, const QStringList &filterNames) const