iOS: convert directory in qiosfiledialog to local file before checking filename

The directory URL will now have the scheme "file". So we need to convert
it to a local file before we inspect the file name

Change-Id: Ib50f879501f560a4d0fec41dce6d7d9f78f06a3c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2015-02-19 13:50:57 +01:00
parent a273ca9c43
commit ba60722b46

View File

@ -95,7 +95,8 @@ bool QIOSFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality window
Q_UNUSED(windowFlags);
Q_UNUSED(windowModality);
if (options()->initialDirectory().scheme() == QLatin1String("assets-library")) {
QString directory = options()->initialDirectory().toLocalFile();
if (directory.startsWith(QLatin1String("assets-library:"))) {
m_viewController = [[QIOSImagePickerController alloc] initWithQIOSFileDialog:this];
UIWindow *window = parent ? reinterpret_cast<UIView *>(parent->winId()).window
: [UIApplication sharedApplication].keyWindow;