diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-06-04 13:44:29 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-06-10 10:42:31 +0000 |
commit | 45edf00fa863cf0a6b311a9789793b08eaf2c054 (patch) | |
tree | a574286cd6ff06f9b6dabb647696724b074f65b3 /src/plugins/platforms/ios | |
parent | 9ca4c2e71f83cbca60918eb1459ab6f80fb6c430 (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ø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiosfileengineassetslibrary.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosfileengineassetslibrary.mm b/src/plugins/platforms/ios/qiosfileengineassetslibrary.mm index 44a7901160..f0b6afce2d 100644 --- a/src/plugins/platforms/ios/qiosfileengineassetslibrary.mm +++ b/src/plugins/platforms/ios/qiosfileengineassetslibrary.mm @@ -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://"); else - 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 |