D29041: For VCS-plugin interface added pure virtual function unversionedActions() for actions in the unversioned directory (for example clone or checkout action).

Méven Car noreply at phabricator.kde.org
Tue Apr 21 17:15:40 BST 2020


meven added a comment.


  All is nice.
  Just naming is hard and I'd like to keep it the least confusing possible.
  I hope this is not annoying for you.

INLINE COMMENTS

> kversioncontrolplugin.h:183
>      /**
> -     * @return List of actions that are available for the items \p items.
> -     *         It is recommended to keep the number of returned actions small
> -     *         in case if an item is an unversioned directory that is not
> -     *         inside the hierarchy tree of the version control system. This
> -     *         prevents having a cluttered context menu for directories
> -     *         outside the version control system.
> +     * @return List of actions that are available for the versioned items \p items.
>       */

Maybe "items in a version controlled path" instead of "versioned items", since this includes unversionned files in git repos for instance.

> kversioncontrolplugin.h:185
>       */
> -    virtual QList<QAction*> actions(const KFileItemList& items) const = 0;
> +    virtual QList<QAction*> versionedActions(const KFileItemList& items) const = 0;
> +

Maybe `versionControlActions` should be clearer.

> versioncontrolobserver.cpp:125
>  
> -    return m_plugin->actions(items);
> +    if (!isVersioned()) {
> +        QList<QAction*> actions;

`isVersioned` could be renamed `isVersionControlled`

REPOSITORY
  R318 Dolphin

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

To: nikolaik, #dolphin, meven, elvisangelaccio
Cc: kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200421/bac087b6/attachment.htm>


More information about the kfm-devel mailing list