Opened 12 years ago
Closed 12 years ago
#10248 closed Bug Report - General (fixed)
Cannot delete recording if file is missing
Reported by: | stuartm | Owned by: | paulh |
---|---|---|---|
Priority: | major | Milestone: | 0.25 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description (last modified by )
Following [02bbb8ab] which converted PBB to use MythMenu? it's no longer possible to delete a recording if the file is missing. The reason is that m_popupMenu is not null when the delete failed event (DELETE_FAILURES) arrives and all that happens is the warning "PlaybackBox?: Delete failures not handled due to pre-existing popup."
We don't actually delete or NULL the MythMenu? object pointer until reaching the destructor of MythDialogBox?. Since QObject deletions occur last in the event loop, after queued signals/events are processed this will always be too late. Added to that the fade effect means that several event loop iterations can pass before the popup is even deleted which just increases the likelihood that m_popupMenu will not be NULL when checked or reused.
Prevent crash when invoking the menu dialog via the right mouse button in Watch Recordings. ShowMenu?() is a virtual method in MythScreenType?, it's intended purpose is to load/display the context menu but here it is displaying a menu loaded elsewhere with no guards against duplicate popups being created. Move the menu display code to DisplayPopupMenu?(), restore ShowMenu?() to behave the same as the MENU key binding and re-instate the guards against multiple menu dialogs being created. Also fixes #10248 - 'Cannot delete recording if file is missing'