summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-03-23 03:37:35 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-03-31 00:44:53 (GMT)
commit577229a5cb2fe0a9e0806238808ed3c9aeb3d3cc (patch)
tree5c713189ae91f7519f4da37aba54d2c56bfa2e3a /src/gui/dialogs/qfiledialog.cpp
parent34b20a1c548203f7a7c79f3a1f56b2e44738d1cb (diff)
downloadQt-577229a5cb2fe0a9e0806238808ed3c9aeb3d3cc.zip
Qt-577229a5cb2fe0a9e0806238808ed3c9aeb3d3cc.tar.gz
Qt-577229a5cb2fe0a9e0806238808ed3c9aeb3d3cc.tar.bz2
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
Diffstat (limited to 'src/gui/dialogs/qfiledialog.cpp')
-rw-r--r--src/gui/dialogs/qfiledialog.cpp6
1 files changed, 6 insertions, 0 deletions
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);
}
}