summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-15 15:15:34 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-15 18:08:11 +0200
commit5031aee9723939052c08adae0d300f6b54a5f010 (patch)
tree3c48b4c0dcf423cc7af08c22225b18ccb690f741 /src/plugins/platforms/windows
parent4c3a35adec28a46b45edf3b5349741d76950cbaa (diff)
Windows: Trim filter specification of the native file dialog.
In the event customer code (namely Qt Creator) does not pass a clean specification (corresponding to 4.8 behaviour). Change-Id: I8271e3a45bea4bea912fcdf0b7c0aae6c022c6a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index b4a6834dbb..8b8da82ca5 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -870,7 +870,8 @@ void QWindowsNativeFileDialogBase::setNameFilters(const QStringList &filters)
const int closingParenPos = openingParenPos != -1 ?
filterString.indexOf(QLatin1Char(')'), openingParenPos + 1) : -1;
QString filterSpec = closingParenPos == -1 ?
- QString(QLatin1Char('*')) : filterString.mid(openingParenPos + 1, closingParenPos - openingParenPos - 1);
+ QString(QLatin1Char('*')) :
+ filterString.mid(openingParenPos + 1, closingParenPos - openingParenPos - 1).trimmed();
filterSpec.replace(filterSeparatorRE, separator);
if (m_hideFiltersDetails) {
// Do not show pattern in description