D26356: Optimize LoadJob::onNewEntry

Ragnar Thomsen noreply at phabricator.kde.org
Sun Apr 12 17:23:17 BST 2020


rthomsen requested changes to this revision.
rthomsen added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> jobs.cpp:36
>  #include <QFileInfo>
>  #include <QRegularExpression>
>  #include <QThread>

This can be removed now.

> jobs.cpp:324
>          // RPM filenames have the ./ prefix, and "." would be detected as the subfolder name, so we remove it.
> -        const QString fullPath = entry->fullPath().remove(QRegularExpression(QStringLiteral("^\\./")));
> +        if (fullPath.startsWith(QStringLiteral("./"))) {
> +            fullPath = fullPath.remove(0, 2);

QLatin1String is more efficient than QStringLiteral in this case, right?

REPOSITORY
  R36 Ark

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

To: nicolasfella, #ark, rthomsen
Cc: rthomsen, dakon, kde-utils-devel, fbampaloukas, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20200412/84097bb9/attachment.html>


More information about the Kde-utils-devel mailing list