D20024: Fixes crash when hiding devices

Elvis Angelaccio noreply at phabricator.kde.org
Sat Mar 30 17:56:14 GMT 2019


elvisangelaccio added a subscriber: ngraham.
elvisangelaccio added a comment.


  In D20024#440353 <https://phabricator.kde.org/D20024#440353>, @hallas wrote:
  
  > Hi @elvisangelaccio , I have been looking into writing a unit test for the crash, but it turns out we already have one: `PlacesModelItemTest::testHideItem`. But, the test only triggers the crash if it is run before the `testPlaceItem` test case. I have been digging in the code to figure out why the test cases are coupled in this way, but I haven't figured it out, so could you take a look? Here is a diff that triggers the crash:
  >
  >   diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp
  >   index fac0931a6..05aa02064 100644
  >   --- a/src/tests/placesitemmodeltest.cpp
  >   +++ b/src/tests/placesitemmodeltest.cpp
  >   @@ -63,13 +63,13 @@ private slots:
  >        void testModelSort();
  >        void testGroups();
  >        void testDeletePlace();
  >   +    void testHideItem();
  >        void testPlaceItem_data();
  >        void testPlaceItem();
  >        void testTearDownDevice();
  >        void testDefaultViewProperties_data();
  >        void testDefaultViewProperties();
  >        void testClear();
  >   -    void testHideItem();
  >        void testSystemItems();
  >        void testEditBookmark();
  >        void testEditAfterCreation();
  
  
  Still not crashing for me, even if I apply this diff...
  
  Can anyone else try to reproduce the crash following the Test Plan? @ngraham maybe?

REPOSITORY
  R318 Dolphin

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

To: hallas, #dolphin, elvisangelaccio
Cc: ngraham, kfm-devel, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190330/86dc84ad/attachment.htm>


More information about the kfm-devel mailing list