summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-26 15:09:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-27 19:27:26 +0000
commit2117a76136e6e3e48f70d7a444b06c0ee0ff9ec4 (patch)
treed9af91a742c9524c1975cf9502b1ba461b60693e /src/gui/kernel
parent9cdbf48c3375feb9bff2e8a4749ec47b9831b15c (diff)
QPlatformFileDialogHelper::cleanFilterList(): Allow for ',' in glob.
RCS files (text/plain) have the glob pattern "*,v", which caused the regular expression match to fail. Task-number: QTBUG-47923 Change-Id: I7d8682ef51306cb4da58a2b3880842bd99892ea3 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 25894fd504..20dc716d89 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -651,12 +651,13 @@ void QPlatformFileDialogHelper::setOptions(const QSharedPointer<QFileDialogOptio
}
const char *QPlatformFileDialogHelper::filterRegExp =
-"^(.*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
+"^(.*)\\(([a-zA-Z0-9_.,*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
// Makes a list of filters from a normal filter string "Image Files (*.png *.jpg)"
QStringList QPlatformFileDialogHelper::cleanFilterList(const QString &filter)
{
QRegExp regexp(QString::fromLatin1(filterRegExp));
+ Q_ASSERT(regexp.isValid());
QString f = filter;
int i = regexp.indexIn(f);
if (i >= 0)