This revision was automatically updated to reflect the committed changes.
Closed by commit R169:19d09d1ef958: Kirigami.Icon: Fix loading bigger images
when source is a URL (authored by apol).
REPOSITORY
R169 Kirigami
CHANGES SINCE LAST UPDATE
apol updated this revision to Diff 63172.
apol added a comment.
Remove unneeded code
REPOSITORY
R169 Kirigami
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D22952?vs=63167=63172
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D22952
AFFECTED FILES
src/icon.cpp
apol marked an inline comment as done.
apol added inline comments.
INLINE COMMENTS
> broulik wrote in icon.cpp:424
> What happens if you leave `format` `nullptr`, does it guess?
yes, it seems to work.
REPOSITORY
R169 Kirigami
REVISION DETAIL
https://phabricator.kde.org/D22952
To: apol,
broulik added inline comments.
INLINE COMMENTS
> icon.cpp:412
> +{
> +reply->deleteLater();
> +if (!reply) {
Move this after the `!reply` check
> icon.cpp:424
> +const QString filename = reply->url().fileName();
> +if (!m_loadedImage.load(reply,
>
apol updated this revision to Diff 63167.
apol added a comment.
Also fix a memory leak
REPOSITORY
R169 Kirigami
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D22952?vs=63153=63167
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D22952
AFFECTED FILES
broulik added inline comments.
INLINE COMMENTS
> icon.cpp:406
> +m_networkReply = qnam->get(request);
> +connect(m_networkReply.data(), ::finished, this,
> [this](){handleFinished(m_networkReply); });
> }
Just noticed, doesn't the `m_networkReply` leak? It's not deleted in
apol updated this revision to Diff 63153.
apol added a comment.
simplify
REPOSITORY
R169 Kirigami
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D22952?vs=63133=63153
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D22952
AFFECTED FILES
src/icon.cpp
src/icon.h
apol created this revision.
apol added reviewers: Frameworks, Kirigami.
Herald added a project: Kirigami.
Herald added a subscriber: plasma-devel.
apol requested review of this revision.
REVISION SUMMARY
Port to using the QImage::load() that takes a QIODevice and only do it when
the