Fix a crash in QFileDialog when selecting an invalid name filter.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Fri, 26 Oct 2012 08:44:00 +0000 (10:44 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 31 Oct 2012 09:34:29 +0000 (10:34 +0100)
commit015e84b8d92ea24008341bbc71b346412d52ea48
treed26730b21401429996dbc9d6a4aa1d10927ae264
parenta9dfa72fd199dd62f91764b4321df89ad02794bf
Fix a crash in QFileDialog when selecting an invalid name filter.

When nameDetailsVisible is set to false and an invalid/empty
string is passed to selectNameFilter(), the regexp used to
strip the filter off the suffixes returns empty and a crash
occurs.

Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
(cherry picked from qtbase/d0aa81ee104107db1ce41a9bf0f91d4cb144f7de)
src/gui/dialogs/qfiledialog.cpp
tests/auto/qfiledialog/tst_qfiledialog.cpp