Commit 71a346e1 authored by dogmaphobic's avatar dogmaphobic

Fixing suffix extraction from regex

parent 189299f3
...@@ -195,7 +195,8 @@ QString QGCFileDialog::_getFirstExtensionInFilter(const QString& filter) { ...@@ -195,7 +195,8 @@ QString QGCFileDialog::_getFirstExtensionInFilter(const QString& filter) {
while (i.hasNext()) { while (i.hasNext()) {
QRegularExpressionMatch match = i.next(); QRegularExpressionMatch match = i.next();
if (match.hasMatch()) { if (match.hasMatch()) {
return match.captured(0).mid(1); //-- Return "foo" from "*.foo"
return match.captured(0).mid(2);
} }
} }
return QString(""); return QString("");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment