File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -277,17 +277,16 @@ void SettingsWindow::create_parsespeed_options(QString& parsespeed)
277
277
// ---------------------------------------------------------------------------
278
278
void SettingsWindow::add_displaycaptions_to_html_selection (QString& displaycaptions, QString& html, const QString& selector)
279
279
{
280
- QRegExp reg (" class=\" displaycaptionsList form-control\" >" );
280
+ QRegularExpression reg (" class=\" displaycaptionsList form-control\" >" , QRegularExpression::InvertedGreedinessOption );
281
281
int pos = html.indexOf (selector);
282
282
283
- reg.setMinimal (true );
284
-
285
283
if (pos == -1 )
286
284
return ;
287
285
288
- if ((pos = reg.indexIn (html, pos)) != -1 )
286
+ QRegularExpressionMatch match = reg.match (html, pos);
287
+ if ((pos = match.capturedStart ()) != -1 )
289
288
{
290
- pos += reg. matchedLength ();
289
+ pos += match. capturedLength ();
291
290
html.insert (pos, displaycaptions);
292
291
}
293
292
}
You can’t perform that action at this time.
0 commit comments