> On 2010-11-05 09:44:21, Sergey Ivanov wrote: > > shared/FileType.cpp, line 52 > > <http://git.reviewboard.kde.org/r/100088/diff/4/?file=3220#file3220line52> > > > > 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.
thx for your Tips. My new Code should not iterate twice over the list and is case insensitive - Stefan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100088/#review298 ----------------------------------------------------------- On 2010-11-05 10:46:54, Stefan Derkits wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/100088/ > ----------------------------------------------------------- > > (Updated 2010-11-05 10:46:54) > > > 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 > ----- > > src/browsers/CollectionTreeItemModelBase.cpp 3f64a73 > shared/FileType.cpp PRE-CREATION > shared/FileType.h 55c80b9 > src/core-impl/collections/support/MemoryFilter.cpp e2509ac > src/widgets/MetaQueryWidget.cpp 0249edf > tests/synchronization/CMakeLists.txt e5df2df > > Diff: http://git.reviewboard.kde.org/r/100088/diff > > > Testing > ------- > > Tested in the App, found no wrong Behaviour > > > Thanks, > > Stefan > >
_______________________________________________ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel