iOS: only use image picker dialog as native dialog for loading files
The user cannot use the image picker dialog for selecting file names for saving. So ensure we fall back to use the normal file dialog when that is the case. Change-Id: Ic73571d34d87c47c68b75dfe0bad1810ad91aa57 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>bb10
parent
32e6a4a976
commit
53a9ff2a45
|
|
@ -95,8 +95,10 @@ bool QIOSFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality window
|
|||
Q_UNUSED(windowFlags);
|
||||
Q_UNUSED(windowModality);
|
||||
|
||||
bool acceptOpen = options()->acceptMode() == QFileDialogOptions::AcceptOpen;
|
||||
QString directory = options()->initialDirectory().toLocalFile();
|
||||
if (directory.startsWith(QLatin1String("assets-library:"))) {
|
||||
|
||||
if (acceptOpen && directory.startsWith(QLatin1String("assets-library:"))) {
|
||||
m_viewController = [[QIOSImagePickerController alloc] initWithQIOSFileDialog:this];
|
||||
UIWindow *window = parent ? reinterpret_cast<UIView *>(parent->winId()).window
|
||||
: [UIApplication sharedApplication].keyWindow;
|
||||
|
|
|
|||
Loading…
Reference in New Issue