From kde-frameworks-devel Tue Oct 20 20:39:50 2015 From: "Allen Winter" Date: Tue, 20 Oct 2015 20:39:50 +0000 To: kde-frameworks-devel Subject: Re: Review Request 125711: Use deleteLater in Part::slotWidgetDestroyed(). Message-Id: <20151020203950.14267.36731 () mimi ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-frameworks-devel&m=144537361308723 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============9129122713574125577==" --===============9129122713574125577== Content-Type: multipart/alternative; boundary="===============8717892979971176818==" --===============8717892979971176818== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Oct. 20, 2015, 2:13 p.m., Allen Winter wrote: > > Does anyone object if I backport this to kdelibs KDE/4.14 ? > > Alex Merry wrote: > I certainly don't, and Michael Pyne suggested above that he might do it himself. done, backported to kdelibs KDE/4.14 branch with commit 4f7ea2f770cf062ef22293fbb21a086f3e0cbfcb - Allen ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125711/#review87140 ----------------------------------------------------------- On Oct. 20, 2015, 8:33 a.m., Alex Merry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125711/ > ----------------------------------------------------------- > > (Updated Oct. 20, 2015, 8:33 a.m.) > > > Review request for KDE Frameworks. > > > Repository: kparts > > > Description > ------- > > When a part's main widget is destroyed, we should not delete the part > immediately - both because deleting an object from inside one of its > signals is not safe generally, and because derived classes may well hold > QPointers to the widgets, expecting them to be cleared between the > widget being destroyed and the part being destroyed. > > > Diffs > ----- > > autotests/parttest.cpp c477face2f0f94f1d66deadedb4bc913eaa21842 > src/part.cpp 4a3150e8aa2a6ed2aff68c945135b3536db2059d > > Diff: https://git.reviewboard.kde.org/r/125711/diff/ > > > Testing > ------- > > Unit tests for KParts pass. > > Running akregator under valgrind no longer produces a bunch of "invalid reads" from KHTMLPart when switching around between articles. > > > Thanks, > > Alex Merry > > --===============8717892979971176818== MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125711/

On October 20th, 2015, 2:13 p.m. UTC, Allen Winter wrote:

Does anyone object if I backport this to kdelibs KDE/4.14 ?

On October 20th, 2015, 5:25 p.m. UTC, Alex Merry wrote:

I certainly don't, and Michael Pyne suggested above that he might do it himself.

done, backported to kdelibs KDE/4.14 branch with commit 4f7ea2f770cf062ef22293fbb21a086f3e0cbfcb


- Allen


On October 20th, 2015, 8:33 a.m. UTC, Alex Merry wrote:

Review request for KDE Frameworks.
By Alex Merry.

Updated Oct. 20, 2015, 8:33 a.m.

Repository: kparts

Description

When a part's main widget is destroyed, we should not delete the part
immediately - both because deleting an object from inside one of its
signals is not safe generally, and because derived classes may well hold
QPointers to the widgets, expecting them to be cleared between the
widget being destroyed and the part being destroyed.

Testing

Unit tests for KParts pass.

Running akregator under valgrind no longer produces a bunch of "invalid reads" from KHTMLPart when switching around between articles.

Diffs

  • autotests/parttest.cpp (c477face2f0f94f1d66deadedb4bc913eaa21842)
  • src/part.cpp (4a3150e8aa2a6ed2aff68c945135b3536db2059d)

View Diff

--===============8717892979971176818==-- --===============9129122713574125577== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KS2RlLWZyYW1l d29ya3MtZGV2ZWwgbWFpbGluZyBsaXN0CktkZS1mcmFtZXdvcmtzLWRldmVsQGtkZS5vcmcKaHR0 cHM6Ly9tYWlsLmtkZS5vcmcvbWFpbG1hbi9saXN0aW5mby9rZGUtZnJhbWV3b3Jrcy1kZXZlbAo= --===============9129122713574125577==--