D8825: do not show edit bookmarks action if keditbookmarks is not installed

Harald Sitter noreply at phabricator.kde.org
Wed Nov 15 07:42:33 UTC 2017


sitter created this revision.
sitter added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  keditbookmarks lives in applications, making it very likely that it is
  not installed. this does already raise an error window explaining that
  the binary is not installed, unfortunately that is fairly poor user
  experience. instead do not show the edit action if we have no editor
  installed.
  
  this is a bit unfortunate design-wise KBookmarkOwner is meant to control
  if the edit action is shown, it does however encourage deriving from it
  to control this behavior making it more than likely that devs simply derive
  and override enableOption always returning true to enable all features
  (while technically unnecessary). to deal with this we make the executable
  lookup in the menu implementation, in addition to checking enableOption.
  effectively we now have "does the owner want us to show the edit option,
  and if so can we even edit?"

TEST PLAN
  - uninstall keditbookmarks
  - konsole has no edit entry
  - install again
  - konsole has edit entry

REPOSITORY
  R294 KBookmarks

BRANCH
  master

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

AFFECTED FILES
  src/kbookmarkmanager.cpp
  src/kbookmarkmenu.cpp
  src/kbookmarkmenu_p.h

To: sitter, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171115/361efb63/attachment.html>


More information about the Kde-frameworks-devel mailing list