This revision was automatically updated to reflect the committed changes.
Closed by commit R134:4adbb68bf405: QNetworkReply was not deleted (authored by
mlaurent).
REPOSITORY
R134 Discover Software Store
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D19799?vs=54387&id=54647
REVISION
mlaurent added a comment.
is it ok now ?
REPOSITORY
R134 Discover Software Store
REVISION DETAIL
https://phabricator.kde.org/D19799
To: mlaurent, apol, #discover_software_store
Cc: broulik, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai,
ali-mohamed, jensreuterberg, a
mlaurent updated this revision to Diff 54387.
mlaurent added a comment.
Fix QScopedPointer
REPOSITORY
R134 Discover Software Store
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D19799?vs=54015&id=54387
BRANCH
delete_qnetwork_reply (branched from master)
REVISION DETAIL
https
broulik added inline comments.
INLINE COMMENTS
> apol wrote in FlatpakBackend.cpp:143
> This will crash here because it's passed into the connect, so it will be
> deleted when the function leaves and accessed from the lambda.
Just move the `QScopedPointer` into the lambda, which is what I was t
apol added a comment.
How about connecting: `connect(reply, &QNetworkReply::finished, reply,
&QObject::deleteLater);` after instantiating and be done with it?
REPOSITORY
R134 Discover Software Store
REVISION DETAIL
https://phabricator.kde.org/D19799
To: mlaurent, apol, #discover_softwar
apol added inline comments.
INLINE COMMENTS
> FlatpakBackend.cpp:143
> auto replyGet = get(QNetworkRequest(m_url));
> -
> +QScopedPointer
> replyPtr(replyGet);
> connect(replyGet, &QNetworkReply::finished, this, [this, replyGet] {
This will crash here because it's pass
mlaurent updated this revision to Diff 54015.
mlaurent added a comment.
Use QScopedPointer
REPOSITORY
R134 Discover Software Store
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D19799?vs=53998&id=54015
BRANCH
delete_qnetwork_reply (branched from master)
REVISION DETAIL
https
broulik added inline comments.
INLINE COMMENTS
> OdrsReviewsBackend.cpp:186
> m_isFetching = false;
> + reply->deleteLater();
> return;
Can't you call this at the beginng of the method? Or let it be owned by a
`QScopedPointer replyPtr(sender());`
instead of calling `delet
mlaurent updated this revision to Diff 53998.
mlaurent added a comment.
Fix indent
REPOSITORY
R134 Discover Software Store
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D19799?vs=53990&id=53998
BRANCH
delete_qnetwork_reply (branched from master)
REVISION DETAIL
https://phabr
apol added inline comments.
INLINE COMMENTS
> OdrsReviewsBackend.cpp:186
> m_isFetching = false;
> + reply->deleteLater();
> return;
indentation
> FlatpakBackend.cpp:149
> Q_EMIT jobFinished(false, nullptr);
> + replyGet->deleteLater();
>
mlaurent created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
mlaurent requested review of this revision.
REVISION SUMMARY
delete networkreply
REPOSITORY
R134 Discover Software Store
BRANCH
delete_qnetwork_reply (branched from master)
REVISION DE
11 matches
Mail list logo