OS X: File dialog does not show "Media" section.
This bug can be reproduced (AFAIK) only on 10.9. To fix it I suggest we create NSOpenPanel/NSSavePanel _every_ time it must be displayed. Actually, that's what I've seen in all code samples I was able to found - nobody tries to retain this panel and re-use it. If we re-use it, "Media" section magically disappears. I believe this bug is not Qt's bug, but something weird in Cocoa. Task-number: QTBUG-40655 Change-Id: Ic0e76e0a9a5444a76f336d511c0ff93f9fd05797 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
da0c74550f
commit
b4af1235ef
@ -712,9 +712,8 @@ bool QCocoaFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModalit
|
|||||||
|
|
||||||
void QCocoaFileDialogHelper::createNSOpenSavePanelDelegate()
|
void QCocoaFileDialogHelper::createNSOpenSavePanelDelegate()
|
||||||
{
|
{
|
||||||
if (mDelegate)
|
|
||||||
return;
|
|
||||||
QCocoaAutoReleasePool pool;
|
QCocoaAutoReleasePool pool;
|
||||||
|
|
||||||
const SharedPointerFileDialogOptions &opts = options();
|
const SharedPointerFileDialogOptions &opts = options();
|
||||||
const QList<QUrl> selectedFiles = opts->initiallySelectedFiles();
|
const QList<QUrl> selectedFiles = opts->initiallySelectedFiles();
|
||||||
const QUrl directory = mDir.isEmpty() ? opts->initialDirectory() : mDir;
|
const QUrl directory = mDir.isEmpty() ? opts->initialDirectory() : mDir;
|
||||||
@ -726,6 +725,7 @@ void QCocoaFileDialogHelper::createNSOpenSavePanelDelegate()
|
|||||||
options:opts
|
options:opts
|
||||||
helper:this];
|
helper:this];
|
||||||
|
|
||||||
|
[static_cast<QNSOpenSavePanelDelegate *>(mDelegate) release];
|
||||||
mDelegate = delegate;
|
mDelegate = delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user