Review Request: Helper Methods for FileType Enum in new Class FileTypeSupport, get Type in TagDialog from Database instead of Extension, some Code Changes as Example of the Advantage of the Helper Methods

Sergey Ivanov 123kash at gmail.com
Fri Nov 5 10:44:20 CET 2010


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



shared/FileType.cpp
<http://git.reviewboard.kde.org/r/100088/#comment242>

    QStringList::contains by default uses case sensitive search. 



shared/FileType.cpp
<http://git.reviewboard.kde.org/r/100088/#comment243>

    indexOf also case sensitive. May be just write something like:
    int pos = -1;
    if( ( pos = s_fileTypeString.indexOf( extension.toLower() ) ) != -1 )
        return Amarok::FileType( pos );
    else
        return Amarok::Unknown;
    
    It also exclude double run over list.


- Sergey


On 2010-11-04 21:24:56, Stefan Derkits wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100088/
> -----------------------------------------------------------
> 
> (Updated 2010-11-04 21:24:56)
> 
> 
> Review request for Amarok.
> 
> 
> Summary
> -------
> 
> -) Created new Class with some Helper Functions
> -) Changed MetaQueryWidget to use the QStringList that contains all Filetypes
> -) Meta::SqlTrack.type() now gets it's Information from the Database instead of the FileExtension
> 
> 
> Diffs
> -----
> 
>   shared/FileType.cpp PRE-CREATION 
>   src/browsers/CollectionTreeItemModelBase.cpp b5daa4d 
>   src/core-impl/collections/support/MemoryFilter.cpp e2509ac 
>   src/widgets/MetaQueryWidget.cpp 0249edf 
>   tests/synchronization/CMakeLists.txt e5df2df 
>   shared/FileType.h 55c80b9 
> 
> Diff: http://git.reviewboard.kde.org/r/100088/diff
> 
> 
> Testing
> -------
> 
> Tested in the App, found no wrong Behaviour
> 
> 
> Thanks,
> 
> Stefan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20101105/8c0b8b44/attachment.htm 


More information about the Amarok-devel mailing list