Review Request: Refactoring of FileType, get Type from Database, some Code Changes as Example of the Advantage of the Refactoring
Rick W. Chen
stuffcorpse at archlinux.us
Tue Oct 19 14:03:36 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100088/#review130
-----------------------------------------------------------
shared/FileType.h
<http://git.reviewboard.kde.org/r/100088/#comment96>
Trailing whitespace
shared/FileType.h
<http://git.reviewboard.kde.org/r/100088/#comment100>
toString() is better
shared/FileType.h
<http://git.reviewboard.kde.org/r/100088/#comment97>
Trailing whitespace
shared/FileType.cpp
<http://git.reviewboard.kde.org/r/100088/#comment98>
Someone correct me if I'm wrong. Stuff in shared/ is used by the player and utilities; and since the utilities are qt only this should be too.
src/browsers/CollectionTreeItemModelBase.cpp
<http://git.reviewboard.kde.org/r/100088/#comment99>
Our coding style is having no space after the keyword. *Many* changes below should be reverted.
src/browsers/CollectionTreeItemModelBase.cpp
<http://git.reviewboard.kde.org/r/100088/#comment102>
No need to reindent this whole switch statement.
src/browsers/CollectionTreeItemModelBase.cpp
<http://git.reviewboard.kde.org/r/100088/#comment101>
It was more readable before.
src/core-impl/collections/sqlcollection/SqlMeta.h
<http://git.reviewboard.kde.org/r/100088/#comment104>
Leading whitespace.
src/core-impl/collections/sqlcollection/SqlMeta.h
<http://git.reviewboard.kde.org/r/100088/#comment105>
Leading whitespace.
src/core-impl/collections/sqlcollection/SqlMeta.cpp
<http://git.reviewboard.kde.org/r/100088/#comment106>
An indent too much.
src/core-impl/collections/support/MemoryFilter.cpp
<http://git.reviewboard.kde.org/r/100088/#comment107>
Wouldn't this return using ft as Amarok::Unknown always?
src/widgets/MetaQueryWidget.cpp
<http://git.reviewboard.kde.org/r/100088/#comment108>
can use foreach()
- Rick W.
On 2010-10-18 23:57:36, Stefan Derkits wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100088/
> -----------------------------------------------------------
>
> (Updated 2010-10-18 23:57:36)
>
>
> Review request for Amarok.
>
>
> Summary
> -------
>
> Refactoring of FileType & some Changes that use the advantages of the new FileType Class:
> -) Old enum FileType is now FileTypeEnum (still in there because it's needed to create the new FileType Objects)
> -) Created new Class & 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
>
> Please give me your Feedback on this Patch.
> One thing I don't really like that much is the Constructor. But without the enums the Constructor would have to use ugly Ints.
> An Option would be an additional Constructor that takes a QString as Argument (e.g. I could think of Amarok::FileType = "mp3"), and creates an Object by looking up the FileType in the QStringList.
>
>
> Diffs
> -----
>
> shared/FileType.h 55c80b9
> shared/FileType.cpp PRE-CREATION
> src/CMakeLists.txt c55bb83
> src/browsers/CollectionTreeItemModelBase.cpp c25549b
> src/core-impl/collections/sqlcollection/CMakeLists.txt f530d67
> src/core-impl/collections/sqlcollection/SqlMeta.h 9434b03
> src/core-impl/collections/sqlcollection/SqlMeta.cpp 97969be
> src/core-impl/collections/support/MemoryFilter.cpp ecb92ff
> src/widgets/MetaQueryWidget.cpp 5316ec6
> tests/core-impl/collections/sqlcollection/CMakeLists.txt 93d24e3
> tests/synchronization/CMakeLists.txt e5df2df
> utilities/collectionscanner/CollectionScanner.cpp 033ea84
>
> 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/20101019/9c34e824/attachment-0001.htm
More information about the Amarok-devel
mailing list