[Differential] [Requested Changes To] D1955: projectmanagerview: Add Cut command into the context menu

kfunk (Kevin Funk) noreply at phabricator.kde.org
Wed Jul 13 12:26:22 UTC 2016


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


  Just a quick code inspection; I'll try the feature as soon as I find time.

INLINE COMMENTS

> projectmanagerviewplugin.cpp:683
>  {
> -    KDevelop::ProjectItemContext* ctx = dynamic_cast<KDevelop::ProjectItemContext*>(ICore::self()->selectionController()->currentSelection());
> +    KDevelop::ProjectItemContext* ctx = dynamic_cast<KDevelop::ProjectItemContext*>(
> +        ICore::self()->selectionController()->currentSelection());

Could do `auto ctx = ...`

> projectmanagerviewplugin.cpp:687
> +    QList<QUrl> mostLocalUrls;
> +    bool dummy;
>      foreach (ProjectBaseItem* item, ctx->items()) {

Not needed

> projectmanagerviewplugin.cpp:692
> +            urls << url;
> +            mostLocalUrls << KFileItem(url).mostLocalUrl(dummy);
>          }

`KFileItem(url).mostLocalUrl()` should work?

> projectmanagerviewplugin.cpp:754
>  
> +QAction* ProjectManagerViewPlugin::createMenuSeparator()
> +{

Can be a free function inside `namespace {}`.

I'd also rename to `createSeparatorAction`

REPOSITORY
  rKDEVPLATFORM KDevPlatform

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: aspotashev, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160713/979d9c7f/attachment.html>


More information about the KDevelop-devel mailing list