From 5031aee9723939052c08adae0d300f6b54a5f010 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 15 May 2012 15:15:34 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3