D28042: [DrKonqi] Port QRegExp to QRegularExpression

Ahmad Samir noreply at phabricator.kde.org
Sat Mar 14 09:27:20 GMT 2020


ahmadsamir created this revision.
ahmadsamir added reviewers: Plasma, davidedmundson, sitter, apol.
Herald added a project: Plasma.
ahmadsamir requested review of this revision.

REVISION SUMMARY
  Port QRegExp::exactMatch() by using QRegularExpression::anchoredPattern(),
  unless the pattern is already anchored by "^" and "$".
  
  BacktraceLineGdb::parse():
  
  - set QRegularExpression::DotMatchesEverythingOption, since gdb breaks some stack frame lines to mulitple lines for readability, e.g.: "#5  0x00007f50e99f776f in QWidget::testAttribute_helper (this=0x6e6440,\n attribute=Qt::WA_WState_Created) at kernel/qwidget.cpp:9081\n" this matches QRegExp behaviour where a "." char matches new lines by default.
  - Use clustering parentheses (?:) so as not to capture groups that aren't needed, less bookkeeping for QRegularExpression/PCRE
  
  Replace QRegularExpression with QString comparison, the latter is usually
  faster.
  
  All unit tests still pass.

REPOSITORY
  R871 DrKonqi

BRANCH
  l-QRE-port (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28042

AFFECTED FILES
  src/bugzillaintegration/bugzillalib.cpp
  src/gdbhighlighter.cpp
  src/parser/backtraceparser.cpp
  src/parser/backtraceparsergdb.cpp
  src/parser/backtraceparserkdbgwin.cpp

To: ahmadsamir, #plasma, davidedmundson, sitter, apol
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200314/09f66bf6/attachment-0001.html>


More information about the Plasma-devel mailing list