D9113: [WIP] ensure only one kpackage per applet

David Edmundson noreply at phabricator.kde.org
Sun Dec 3 10:17:00 UTC 2017


davidedmundson added a comment.


  Please push as two separate things.
  
  The applet part looks fine aside from docs.
  
  ----
  
  UrlInterceptor.
  
  IMHO it might be worth a release that continues onwards after the reg exp (so less performance benefits)  and prints a warning if we end up in the relativePath code?

INLINE COMMENTS

> applet.h:109
>  
> +    explicit Applet(const KPackage::Package &package, QObject *parent, const QVariantList &args);
> +

docs

especially as we have N almost identical ones.

> packageurlinterceptor.cpp:99
>      //qDebug() << "Intercepted URL:" << path << type;
> +    if (path.toString().contains(QRegularExpression(QLatin1String("ui/.*\.js")))) {
> +        QString rewritten = path.toString().replace(QRegularExpression(QLatin1String("ui/(.*)\.js")), QLatin1String("code/\\1.js"));

QRegularExpression(QStringLiteral   as QRegularExpression is going to construct a QString

> packageurlinterceptor.cpp:100
> +    if (path.toString().contains(QRegularExpression(QLatin1String("ui/.*\.js")))) {
> +        QString rewritten = path.toString().replace(QRegularExpression(QLatin1String("ui/(.*)\.js")), QLatin1String("code/\\1.js"));
> +        return QUrl(rewritten);

Does use of the "data" folder go through the URL interceptor

> packageurlinterceptor.cpp:103
> +    }
> +    return path;
>  

I know you uploaded this so I could profile it,
but if we return here we don't want the code below.

REPOSITORY
  R242 Plasma Framework (Library)

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

To: mart, #plasma
Cc: davidedmundson, apol, plasma-devel, #frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171203/3a22e298/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list