summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-04-27 07:01:36 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-04-27 07:06:45 (GMT)
commit09c6d182a70f25626e12a739a9b7c3db937f47ce (patch)
treed9d80615735ae0ca058bce3621aa2984f20ce54e /src/gui/dialogs/qfiledialog_mac.mm
parent646b21ac2eb3b0c73826936bf4dba9eac97a34a0 (diff)
downloadQt-09c6d182a70f25626e12a739a9b7c3db937f47ce.zip
Qt-09c6d182a70f25626e12a739a9b7c3db937f47ce.tar.gz
Qt-09c6d182a70f25626e12a739a9b7c3db937f47ce.tar.bz2
Cocoa: Native QFileDialog has problems selecting name filter
The problem occured if you told the dialog to not show name filter details, then tried to select a filter specifying those details. The patch makes sure that we accept a filter as found in the drop down list if it matches the specified filter with or without details Task-number: QTBUG-8439 Reviewed-by: msorvig
Diffstat (limited to 'src/gui/dialogs/qfiledialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 14a5f15..28acf24 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -493,7 +493,7 @@ QT_USE_NAMESPACE
for (int i=0; i<mNameFilterDropDownList->size(); ++i) {
QString filter = hideDetails ? [self removeExtensions:filters->at(i)] : filters->at(i);
[mPopUpButton addItemWithTitle:QT_PREPEND_NAMESPACE(qt_mac_QStringToNSString)(filter)];
- if (filters->at(i) == selectedFilter)
+ if (filters->at(i).startsWith(selectedFilter))
[mPopUpButton selectItemAtIndex:i];
}
}