From 577229a5cb2fe0a9e0806238808ed3c9aeb3d3cc Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Tue, 23 Mar 2010 04:37:35 +0100 Subject: Show only one dialog when using QFileDialog on Mac. The completer was trying to populate the combobox for completion even if the dialog was hidden (the native one is shown). Task-number:QTBUG-8624 Reviewed-by:richard --- src/gui/dialogs/qfiledialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index ef2b223..3b5fb9f 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -723,9 +723,15 @@ void QFileDialog::setVisible(bool visible) // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below // updates the state correctly, but skips showing the non-native version: setAttribute(Qt::WA_DontShowOnScreen); + //So the completer don't try to complete and therefore to show a popup + d->completer->setModel(0); } else { d->nativeDialogInUse = false; setAttribute(Qt::WA_DontShowOnScreen, false); + if (d->proxyModel != 0) + d->completer->setModel(d->proxyModel); + else + d->completer->setModel(d->model); } } -- cgit v0.12