summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-01-04 16:25:38 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-01-04 16:27:04 (GMT)
commit5c2d319ce56fa7914afe52ae13f1a24c03608629 (patch)
tree693badecb0df7b049f59d40b4e318c4243d4ac00 /src/gui
parent4cfb341b0cc38f32fb6fba134bfeb96197337867 (diff)
downloadQt-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.cpp3
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