D6067: Make it possible to use QXmlStreamReader to read a KNS registry file

David Faure noreply at phabricator.kde.org
Sat Jun 3 09:43:09 UTC 2017


dfaure added inline comments.

INLINE COMMENTS

> entryinternal.cpp:443
> +{
> +    Q_ASSERT(xml->tokenType()==QXmlStreamReader::StartElement);
> +    QStringRef ret;

missing spaces around ==

> entryinternal.cpp:446
> +    const auto token = xml->readNext();
> +    if (token==QXmlStreamReader::Characters) {
> +        ret = xml->text();

same

> entryinternal.cpp:450
> +    }
> +    Q_ASSERT(xml->tokenType()==QXmlStreamReader::EndElement);
> +    return ret;

same

> entryinternal.cpp:527
> +
> +    Q_ASSERT(reader.tokenType() == QXmlStreamReader::EndElement);
> +

Did you test parsing a file with `<!-- ... -->` comments here and there? Just to make sure the code handles this correctly and doesn't assert.

> entryinternal.h:391
> +     */
> +    KNEWSTUFFCORE_DEPRECATED bool setEntryXML(const QDomElement &xmldata);
>  

"@deprecated since 5.36, use setEntryXML(QXmlStreamReader&) instead"

REPOSITORY
  R304 KNewStuff

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

To: apol, #frameworks
Cc: dfaure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170603/80390b4f/attachment.html>


More information about the Kde-frameworks-devel mailing list