D6459: Fix the National Geographic PoTD dataengine

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Jul 5 13:14:12 UTC 2017


broulik added inline comments.

INLINE COMMENTS

> natgeoprovider.cpp:56
>  
> -    const QString data = QString::fromUtf8( job->data() );
> +    const auto data = QString::fromUtf8( job->data() ).split("\n");
>  

Please use `splitRef`

(Makes me wonder why it turns it into a `QString` in the first place since `QXmlStreamReader` has an `addData` that takes a `QByteArray`

> natgeoprovider.cpp:61
> +    // NatGeo has a broken DOM, ignore elements which break the DOM
> +    foreach(const auto &e, data) {
> +        if (e.contains("crossorigin")) {

Use range-for, your container is const anyway

  for (const auto &e : data) {

REPOSITORY
  R114 Plasma Addons

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

To: garg, #plasma
Cc: broulik, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170705/e3936a2c/attachment.html>


More information about the Plasma-devel mailing list