D16767: Add option to toggle all hidden panel item to view menu

Chris Rizzitello noreply at phabricator.kde.org
Sun Nov 11 19:51:48 GMT 2018


rizzitello added a comment.


  In D16767#358051 <https://phabricator.kde.org/D16767#358051>, @elvisangelaccio wrote:
  
  > > ONE PROBLEM HERE: Can not get a count of hidden Items on start up. the count for hidden items is always 0. So the Menu entry always starts enabled. Any help here would be great.
  >
  > Try to delay the menu initialization using a `QTimer::singleShot(0, ...)`. The places model gets populated asynchronously.
  
  
  Nate had suggested using the QMenu::aboutToShow to enable and disable the item. Other then a crash if the panel was not created yet this worked perfectly from the start. I have added a check to see if our model if valid to avoid crashing while preserving the disable behavior.
  
  This should be ready for a final test now.

REPOSITORY
  R318 Dolphin

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

To: rizzitello, #dolphin, #vdg, elvisangelaccio, ngraham
Cc: cfeck, elvisangelaccio, veqz, davidc, ngraham, kfm-devel, alexde, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20181111/4ece0c83/attachment.htm>


More information about the kfm-devel mailing list