From 426f2ccafc8fc8336193dbdd67a949e790d7fa7e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 19 Mar 2013 09:52:31 +0100 Subject: Windows native file dialogs: Split suffix list correctly. Task-number: QTBUG-30185 Change-Id: I9a3d16eafb5417d6720a702af662fb219487549d Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowsdialoghelpers.cpp') diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 74193c47a3..daa4369d88 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1071,7 +1071,9 @@ static inline QString appendSuffix(const QString &fileName, const QString &filte if (suffixPos < 0) return fileName; suffixPos += 3; - int endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); + int endPos = filter.indexOf(QLatin1Char(' '), suffixPos + 1); + if (endPos < 0) + endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); if (endPos < 0) endPos = filter.indexOf(QLatin1Char(')'), suffixPos + 1); if (endPos < 0) -- cgit v1.2.3