D12044: baloodb: Improve interface

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sun Apr 8 15:13:39 UTC 2018


bruns added inline comments.

INLINE COMMENTS

> databasesanitizer.cpp:249
>          if (!(accessFilter & IgnoreAvailable)) {
> -            out << QStringLiteral("%1").arg(info.accessible ? "+" : "!") << sep;
> +            color = (useColors && !info.accessible) ? colors.first : colors.second;
> +            out << QStringLiteral("%1%2%3")

code uniformity - I prefer it as written in line 285 (acessible check first)

> databasesanitizer.cpp:324
>              if (info.isSymLink) {
> -                out << i18n("IgnoredSymbolicLink:");
> +                out << QStringLiteral("%1%2%3").arg(color.first).arg(i18n("IgnoredSymbolicLink:")).arg(color.second);
> +                ignored++;

long line, remove the format string and use operator<< for each argument

> databasesanitizer.h:84
>      DatabaseSanitizerImpl* m_pimpl;
> +    const QPair<QPair<QString, QString>, QPair<QString, QString>> colors{
> +        {QStringLiteral("\033[1;31m"),QStringLiteral("\033[0m")},

Instead of the outermost pair, just use a plain array - the types of all elements are uniform

REPOSITORY
  R293 Baloo

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

To: michaelh, #baloo, ngraham
Cc: bruns, #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180408/68afdff3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list