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)
277277// ---------------------------------------------------------------------------
278278void SettingsWindow::add_displaycaptions_to_html_selection (QString& displaycaptions, QString& html, const QString& selector)
279279{
280- QRegExp reg (" class=\" displaycaptionsList form-control\" >" );
280+ QRegularExpression reg (" class=\" displaycaptionsList form-control\" >" , QRegularExpression::InvertedGreedinessOption );
281281 int pos = html.indexOf (selector);
282282
283- reg.setMinimal (true );
284-
285283 if (pos == -1 )
286284 return ;
287285
288- if ((pos = reg.indexIn (html, pos)) != -1 )
286+ QRegularExpressionMatch match = reg.match (html, pos);
287+ if ((pos = match.capturedStart ()) != -1 )
289288 {
290- pos += reg. matchedLength ();
289+ pos += match. capturedLength ();
291290 html.insert (pos, displaycaptions);
292291 }
293292}
You can’t perform that action at this time.
0 commit comments