D10105: baloo-widgets: Refactor filemetadataprovider for better readability

Elvis Angelaccio noreply at phabricator.kde.org
Sat Jan 27 17:21:31 UTC 2018


elvisangelaccio added inline comments.

INLINE COMMENTS

> filemetadataprovider.cpp:140
> +    } else {
>          m_data = files.first();
> +        insertSingleFileBasicData();

This will crash if `files` is empty, I think?

> filemetadataprovider.cpp:195
> +        allDirectories &= item.isDir();
> +        if (!allDirectories) break;
> +    }

Missing braces here

> filemetadataprovider.cpp:299-303
>      // There are 4 code paths -
>      // Single File -
>      //   * Not Indexed
>      //   * Indexed
>      //

Please fix this comment, now we don't have 4 code paths inside this function.

> filemetadataprovider.h:125
> +    void setFileItem();
> +    void setFilesItems();
> +    

Please call it `setFileItems()`, "fileitem" is kinda used as a single word (e.g. see `m_fileItems`).

REPOSITORY
  R824 Baloo Widgets

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

To: michaelh, elvisangelaccio, ngraham, vhanda, smithjd, #dolphin, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180127/d04172c8/attachment.html>


More information about the Kde-frameworks-devel mailing list