D19737: Fix crash at shutdown after showing a tooltip

David Hallas noreply at phabricator.kde.org
Wed Mar 13 19:33:34 GMT 2019


hallas created this revision.
hallas added reviewers: Dolphin, elvisangelaccio.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
hallas requested review of this revision.

REVISION SUMMARY
  Fix crash at shutdown after showing a tooltip. The commit
  94d7e1471e0a81b72285795ad91c4f6196157ae4 <https://phabricator.kde.org/R318:94d7e1471e0a81b72285795ad91c4f6196157ae4> introduced a crash that occurs
  when closing Dolphin after Dolphin has showed a tooltip. This happens
  because the ToolTipManager::showToolTip function calls the
  KToopTipWidget::showBelow function passing in the pointer to the
  DolphinFileMetaDataWidget. But this also passes the ownership of the
  pointer to the KToopTipWidget as long as a new tooltip is not shown. The
  problem is that at shutdown, the KToopTipWidget instance will be
  destoyed first and therefore also destroy the DolphinFileMetaDataWidget
  instance (which the ToolTipManager still owns through the
  QScopedPointer) causing it to be deleted twice. The fix for this is
  simply to swap the order of these two members so that the
  DolphinFileMetaDataWidget is destroyed first by the QScopedPointer
  thereby removing it from the KToopTipWidget if it has been set as it's
  parent.

TEST PLAN
  Open Dolphin
  Show a Tool Tip
  Close Dolphin

REPOSITORY
  R318 Dolphin

BRANCH
  fix_crash_with_tooltips (branched from master)

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

AFFECTED FILES
  src/views/tooltips/tooltipmanager.h

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


More information about the kfm-devel mailing list