diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-01-04 16:25:38 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-01-04 16:27:04 (GMT) |
commit | 5c2d319ce56fa7914afe52ae13f1a24c03608629 (patch) | |
tree | 693badecb0df7b049f59d40b4e318c4243d4ac00 /src/gui | |
parent | 4cfb341b0cc38f32fb6fba134bfeb96197337867 (diff) | |
download | Qt-5c2d319ce56fa7914afe52ae13f1a24c03608629.zip Qt-5c2d319ce56fa7914afe52ae13f1a24c03608629.tar.gz Qt-5c2d319ce56fa7914afe52ae13f1a24c03608629.tar.bz2 |
Make the ShowDirsOnly option work in QFileDialog.
This option was simply not implemented at all so it didn't work.
Task-number:QTBUG-6558
Reviewed-by:ogoffart
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 45a410f..d952c34 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -669,6 +669,9 @@ void QFileDialog::setOptions(Options options) } if (changed & HideNameFilterDetails) setNameFilters(d->nameFilters); + + if (changed & ShowDirsOnly) + setFilter((options & ShowDirsOnly) ? filter() & ~QDir::Files : filter() | QDir::Files); } QFileDialog::Options QFileDialog::options() const |