[Differential] [Commented On] D4665: Fix project tree state not being saved

Kevin Funk noreply at phabricator.kde.org
Mon Feb 20 08:29:27 UTC 2017


kfunk added a comment.


  Style: Please `nullptr == foo` -> `!foo`. This is the style we use throughout the KDevelop code base

INLINE COMMENTS

> projecttreeview.cpp:416
> +    if ( nullptr == parent.model() ) {
> +        restoreState( m_ctxProject );
> +    }

I'm not entirely sure what this code is supposed to do. Why do you use `m_ctxProject` in here, a variable which is only filled when you request the context menu in the project tree view?

Please add a comment in which scenario the  call to `restoreState( m_ctxProject );` actually tries to accommodate.

> projecttreeview.cpp:423
> +    if ( nullptr == parent.model() ) {
> +        saveState( m_ctxProject );
> +    }

... dito

> projecttreeview.cpp:431
> +    auto const projects = ICore::self()->projectController()->projects();
> +    for ( auto const& p: projects ) {
> +        saveState( p );

Style: `p` -> `project` please

REPOSITORY
  R33 KDevPlatform

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

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

To: bevendorff, mwolff, apol
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170220/a20adc86/attachment-0001.html>


More information about the KDevelop-devel mailing list