From 943bd1af642651b5f600cacf237627058d38bccf Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 14 Jul 2010 08:48:13 +0200 Subject: Ensure that the view loses its selection when typing in the lineedit When QT_NO_FSCOMPLETER is defined then when selecting a file in the view in a filedialog and then changing the filename in the lineedit to a file that does not exist then the view should deselect any selection it has. The name of the slot in this case is unfortunate as it does not actually do any auto-completion. This ensures that the same behaviour works in both cases. Reviewed-by: Alexis Menard --- src/gui/dialogs/qfiledialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index cb74a3c..a0dca5d 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -2209,9 +2209,9 @@ void QFileDialogPrivate::createWidgets() #ifndef QT_NO_FSCOMPLETER completer = new QFSCompleter(model, q); qFileDialogUi->fileNameEdit->setCompleter(completer); +#endif // QT_NO_FSCOMPLETER QObject::connect(qFileDialogUi->fileNameEdit, SIGNAL(textChanged(QString)), q, SLOT(_q_autoCompleteFileName(QString))); -#endif // QT_NO_FSCOMPLETER QObject::connect(qFileDialogUi->fileNameEdit, SIGNAL(textChanged(QString)), q, SLOT(_q_updateOkButton())); -- cgit v0.12