D11012: Add Trash (empty, isEmpty, emptinessChanged)

Elvis Angelaccio noreply at phabricator.kde.org
Sun Mar 11 14:28:34 GMT 2018


elvisangelaccio accepted this revision.
elvisangelaccio added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> dolphincontextmenu.cpp:143
>      QAction* emptyTrashAction = new QAction(QIcon::fromTheme(QStringLiteral("trash-empty")), i18nc("@action:inmenu", "Empty Trash"), this);
> -    KConfig trashConfig(QStringLiteral("trashrc"), KConfig::SimpleConfig);
> -    emptyTrashAction->setEnabled(!trashConfig.group("Status").readEntry("Empty", true));
> +    emptyTrashAction->setEnabled(!Trash::instance().isEmpty());
>      addAction(emptyTrashAction);

This could just be `Trash::isEmpty()` (same with the other static methods).

REPOSITORY
  R318 Dolphin

BRANCH
  add-trash-class (branched from master)

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

To: rominf, elvisangelaccio, markg, ngraham
Cc: ngraham, markg, rkflx, elvisangelaccio, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180311/6c4243cd/attachment.htm>


More information about the kfm-devel mailing list