D12731: Disable all the 'create new' items when in the Trash

Elvis Angelaccio noreply at phabricator.kde.org
Sun May 6 22:00:16 BST 2018


elvisangelaccio requested changes to this revision.
elvisangelaccio added a comment.
This revision now requires changes to proceed.


  Please mention T8234 <https://phabricator.kde.org/T8234> in the commit message, so we'll remember this won't be needed anymore once we have support from KIO.

INLINE COMMENTS

> dolphinmainwindow.cpp:463
> +    const bool inTheTrash = m_activeViewContainer->view()->url().scheme() == QLatin1String("trash");
> +    for (auto menuItem : m_newFileMenu->menu()->actions()) {
> +        menuItem->setEnabled(!inTheTrash);

This will detach the `actions()` container. Please use

  const auto actions = m_newFileMenu->menu()->actions();
  for (auto menuItem : actions) { ... }

REPOSITORY
  R318 Dolphin

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

To: ngraham, #dolphin, broulik, elvisangelaccio
Cc: elvisangelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180506/cca66981/attachment.htm>


More information about the kfm-devel mailing list