D29542: Refactor MainWindow view

Dag Andersen noreply at phabricator.kde.org
Mon May 11 10:20:30 BST 2020


danders added a comment.


  Hmmm, it seems to me you are creating a leak in your lines 544, 545? (Have not tested, I might be wrong)
  
  Afaics the problem is that a focus event is issued that accesses the view after death.
  Possibly a deleteLater() would do it, but I tried with setting paret to nullptr:
  
    while(!oldRootViews.isEmpty()) {
        KoView *v = oldRootViews.takeFirst();
        v->setParent(nullptr);
        delete v;
    }
  
  (Also in KoMainWindow dtor to be consistent.)

REPOSITORY
  R8 Calligra

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

To: anthonyfieroni, boemann, danders, #calligra:_3.0
Cc: Calligra-Devel-list, davidllewellynjones, dcaliste, ognarb, cochise, vandenoever
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20200511/5e4750f5/attachment.htm>


More information about the calligra-devel mailing list