Fix support for flatpak FileChooser portal
Properly parse filters. First captured substring in QRegularExpression is at index 1, with index 0 you access the full captured string. Change-Id: I68b6e314171536a08c606e5acd0f7211c1c3c254 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
923dd4fe8f
commit
beeb748b2c
@ -262,8 +262,8 @@ void QFlatpakFileDialog::exec()
|
||||
QRegularExpression regexp(QPlatformFileDialogHelper::filterRegExp);
|
||||
QRegularExpressionMatch match = regexp.match(filter);
|
||||
if (match.hasMatch()) {
|
||||
QString userVisibleName = match.captured(0);
|
||||
QStringList filterStrings = match.captured(1).split(QLatin1String(" "));
|
||||
QString userVisibleName = match.captured(1);
|
||||
QStringList filterStrings = match.captured(2).split(QLatin1String(" "));
|
||||
|
||||
FilterConditionList filterConditions;
|
||||
for (const QString &filterString : filterStrings) {
|
||||
|
Loading…
Reference in New Issue
Block a user