File tree Expand file tree Collapse file tree
plugins/gui/src/main_window Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646#include < QInputDialog>
4747#include < QMessageBox>
4848#include < QPushButton>
49- #include < QRegExp >
49+ #include < QRegularExpression >
5050#include < QShortcut>
5151#include < QStringList>
5252#include < QtConcurrent>
@@ -215,10 +215,11 @@ namespace hal
215215 if (it.second .empty ()) continue ; // no extensions registered
216216
217217 QString label = QString::fromStdString (it.first );
218- QRegExp re (" Default (.*) Writer" , Qt::CaseInsensitive);
219- QString txt = (re.indexIn (label) < 0 )
220- ? label.remove (QChar (' :' ))
221- : QString (" Export as " ) + re.cap (1 );
218+ QRegularExpression re (" Default (.*) Writer" , QRegularExpression::CaseInsensitiveOption);
219+ QRegularExpressionMatch match = re.match (label);
220+ QString txt = (match.hasMatch ())
221+ ? QString (" Export as " ) + match.captured (1 )
222+ : label.remove (QChar (' :' ));
222223
223224 QStringList extensions;
224225 extensions.append (txt);
You can’t perform that action at this time.
0 commit comments