Review Request: Find field names (filter keywords) even if they are translated

Matěj Laitl matej at laitl.cz
Sun Nov 6 18:10:17 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103014/#review7978
-----------------------------------------------------------



src/core-impl/collections/support/TextualQueryFilter.cpp
<http://git.reviewboard.kde.org/r/103014/#comment6860>

    Good! Now this looks much more nicer.
    
    But.. what about turing this into a switch..case now? This has additional benefit that compiler can warn about enum values not used in switch.
    
    I forgot what convention is used in Amarok for indenting switches, but it is in HACKING/conding_styel..



src/core/meta/support/MetaConstants.cpp
<http://git.reviewboard.kde.org/r/103014/#comment6863>

    You may perhaps want to wrap all these entries not to be that long, suggestion:
    
    else if( name.compare( "filename", Qt::CaseInsensitive ) == 0
          || name.compare( shortI18nForField( Meta::valUrl ), Qt::CaseInsensitive ) == 0 )
              return Meta::valUrl;



src/core/meta/support/MetaConstants.cpp
<http://git.reviewboard.kde.org/r/103014/#comment6861>

    Please accept also "first" as a special case - some users may have memorised it and now it would'n work for them.



src/core/meta/support/MetaConstants.cpp
<http://git.reviewboard.kde.org/r/103014/#comment6862>

    Please also accept "played" as a special case to be backward-compatible.


Good work, Daniel! Please fix remaining minor fix and I'll be happy to merge this. (or, do you have commit access yourself?)

- Matěj Laitl


On Nov. 6, 2011, 5:45 p.m., Daniel Faust wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103014/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2011, 5:45 p.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Description
> -------
> 
> The filters (eg. filesize, artist) can be translated but without this patch components like the EditFilterDialog won't recognize the keywords.
> 
> I haven't committed it yet because it also changes the keyword 'modifydate' to 'modified' since i think that that's a bug, too.
> 
> 
> Diffs
> -----
> 
>   src/core-impl/collections/support/TextualQueryFilter.cpp 2a44a30 
>   src/core/meta/support/MetaConstants.cpp fabb146 
> 
> Diff: http://git.reviewboard.kde.org/r/103014/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Faust
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20111106/3c935cc8/attachment-0001.html>


More information about the Amarok-devel mailing list