summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosfiledialog.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-02-18 13:43:02 +0100
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-03-15 23:05:09 +0000
commita273ca9c439b515358607acd05fd90346b49a448 (patch)
tree9782dccbdadd55405d959fc8f86776b0e73b49cc /src/plugins/platforms/ios/qiosfiledialog.mm
parent3806dc3571c6d3a3295b752e2ad001156dcef956 (diff)
iOS: return file urls rather than asset urls from file dialog
We need to pass the asset url around as a file url in the application, so that QUrl::fromLocalFile()/toLocalFile() works. Note that QUrl::fromLocalFile() will remove double slashes. We therefore need to check for this, and restore missing slashes, when loading files in the file engine. Change-Id: I2de6b91d7a112354590cf2981f7b403eacf92a59 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosfiledialog.mm')
-rw-r--r--src/plugins/platforms/ios/qiosfiledialog.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosfiledialog.mm b/src/plugins/platforms/ios/qiosfiledialog.mm
index 1d4298a158..28b9c0d883 100644
--- a/src/plugins/platforms/ios/qiosfiledialog.mm
+++ b/src/plugins/platforms/ios/qiosfiledialog.mm
@@ -60,7 +60,8 @@
{
Q_UNUSED(picker);
NSURL *url = [info objectForKey:UIImagePickerControllerReferenceURL];
- m_fileDialog->selectedFilesChanged(QList<QUrl>() << QUrl::fromNSURL(url));
+ QUrl fileUrl = QUrl::fromLocalFile(QString::fromNSString([url description]));
+ m_fileDialog->selectedFilesChanged(QList<QUrl>() << fileUrl);
emit m_fileDialog->accept();
}