D28026: further constrict line parsing of .so files

Ahmad Samir noreply at phabricator.kde.org
Fri Mar 20 12:33:12 GMT 2020


ahmadsamir added inline comments.

INLINE COMMENTS

> backtraceparsergdb.cpp:75
>          if (!regExp.cap(7).isEmpty()) { //we have file information (stuff after from|at)
>              bool file = regExp.cap(8) == QLatin1String("at"); //'at' means we have a source file (likely)
>              // Gdb isn't entirely consistent here, when it uses 'from' it always refers to a library, but

(Needs rebasing on master).
I'd move this and define "const bool file" in one place.

> backtraceparsergdb.cpp:82
> +            file = file
> +                    && completeSuffix != QStringLiteral("so") /* libf.so (so) */
> +                    && !completeSuffix.startsWith(QStringLiteral("so.")) /* libf.so.1 (so.1) */

IIUC, QLatin1String is better for string comparisons.

> backtraceparsergdb.cpp:84
> +                    && !completeSuffix.startsWith(QStringLiteral("so.")) /* libf.so.1 (so.1) */
> +                    && !completeSuffix.contains(QStringLiteral(".so") /* libf-1.0.so.1 (0.so.1)*/);
>              if (file) {

startsWith() and contains() have QLatin1String overloads.

REPOSITORY
  R871 DrKonqi

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

To: sitter, cfeck, ngraham
Cc: ahmadsamir, 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/20200320/13490df6/attachment.html>


More information about the Plasma-devel mailing list