D8811: [knewstuff] Do not leak ImageLoader on error

Dan Leinir Turthra Jensen noreply at phabricator.kde.org
Wed Nov 15 11:49:51 UTC 2017


leinir added inline comments.

INLINE COMMENTS

> engine.cpp:536
> +    connect(l, &ImageLoader::signalError, this, [=]() {
> +        qCDebug(KNEWSTUFFCORE) << "ERROR preview: " << entry.name() << type;
> +        --m_numPictureJobs;

A more descriptive error message would be good, but this is already an improvement over no error message at all :) As pointed out elsewhere, since you're explicitly passing the ImageLoader instance through the signal, might it not make sense to output the description of the error (which is available on the httpjob, which in turn is available through ImageHandler::job, so you could just add l to the capture to access that)?

REPOSITORY
  R304 KNewStuff

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

To: anthonyfieroni, leinir, dfaure
Cc: broulik, #frameworks, ZrenBot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171115/5f85349f/attachment.html>


More information about the Kde-frameworks-devel mailing list