Review Request 109817: JJ 313649 - No warning if there are no permissions to read file

Matěj Laitl matej at laitl.cz
Mon Apr 15 14:27:32 UTC 2013



> On April 14, 2013, 12:30 p.m., Matěj Laitl wrote:
> > src/core-impl/collections/daap/DaapMeta.cpp, lines 77-85
> > <http://git.reviewboard.kde.org/r/109817/diff/4/?file=138512#file138512line77>
> >
> >     Please remove this now redundant method - the base implementation + custom notPlayableReason() will suffice now.
> 
> Anmol Ahuja wrote:
>     But wouldn't that lead to a lot of unnecessary overhead, when there are several unplayable tracks? Each call to isPlayable() will generate a non-empty QString, malloc calls and all.
>     
>     PS: I'll get to work on this and the other patch [ and hopefully get down to discussing my GSoC proposal :) ] on Wednesday, exams again.

> But wouldn't that lead to a lot of unnecessary overhead, when there are several unplayable tracks? Each call to isPlayable() will generate a non-empty QString, malloc calls and all.

A bit of overhead: yes, but I think we can assume QString creation and i18n() calls are already well-optimized. However, this is only a tiny bit of time spent in the function - the Solid::Networking::status() call (which may result in DBus method call) is already orders of magnitude slower than QString handling. Same applied for methods that check the filesystem for existence/type/permissions..

> PS: I'll get to work on this and the other patch [ and hopefully get down to discussing my GSoC proposal :) ] on Wednesday, exams again.

No problem, amount of patches you've submitted is already amazing. Good luck with your exams.


- Matěj


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


On April 13, 2013, 1:38 p.m., Anmol Ahuja wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109817/
> -----------------------------------------------------------
> 
> (Updated April 13, 2013, 1:38 p.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Description
> -------
> 
> 1. Added notPlayableReason() and prettyNotPlayableReason() to class Track
> 2. Display track tooltip with the prettyNotPlayableReason() if track not playable
> 
> 
> Diffs
> -----
> 
>   src/core-impl/collections/daap/DaapMeta.cpp e66afb7 
>   src/core-impl/collections/daap/DaapMeta.h 9a9c257 
>   src/core-impl/collections/db/sql/SqlMeta.h b7f0a71 
>   src/core-impl/collections/db/sql/SqlMeta.cpp 19ec936 
>   src/core-impl/collections/ipodcollection/IpodMeta.h 1d380b1 
>   src/core-impl/collections/ipodcollection/IpodMeta.cpp 9ffcf7e 
>   src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.h 5d1b9f9 
>   src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp 2b66574 
>   src/core-impl/collections/nepomukcollection/meta/NepomukTrack.h 27ff06d 
>   src/core-impl/collections/nepomukcollection/meta/NepomukTrack.cpp 6d5bcf7 
>   src/core-impl/collections/playdarcollection/PlaydarMeta.h 7a39a4f 
>   src/core-impl/collections/playdarcollection/PlaydarMeta.cpp 5f4ec3c 
>   src/core-impl/collections/proxycollection/ProxyCollectionMeta.h ef342a4 
>   src/core-impl/collections/proxycollection/ProxyCollectionMeta.cpp e58a20a 
>   src/core-impl/collections/support/MemoryMeta.h 40061d2 
>   src/core-impl/collections/upnpcollection/UpnpMeta.h 55bc131 
>   src/core-impl/collections/upnpcollection/UpnpMeta.cpp 00cc915 
>   src/core-impl/meta/file/File.h 7d3359d 
>   src/core-impl/meta/file/File.cpp 2cd0a61 
>   src/core-impl/meta/multi/MultiTrack.h be55170 
>   src/core-impl/meta/proxy/MetaProxy.h 15967df 
>   src/core-impl/meta/proxy/MetaProxy.cpp 6a35bc5 
>   src/core-impl/meta/stream/Stream.h 3e19b45 
>   src/core-impl/meta/stream/Stream.cpp 6e35960 
>   src/core/meta/Meta.h f86cf39 
>   src/playlist/PlaylistModel.cpp 246b9a1 
>   src/services/ampache/AmpacheMeta.h 934fe75 
>   src/services/ampache/AmpacheMeta.cpp b59715c 
>   src/services/lastfm/meta/LastFmMeta.h 9c54a10 
>   src/services/lastfm/meta/LastFmMeta.cpp 424d136 
> 
> Diff: http://git.reviewboard.kde.org/r/109817/diff/
> 
> 
> Testing
> -------
> 
> Works as expected
> 
> 
> Thanks,
> 
> Anmol Ahuja
> 
>

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


More information about the Amarok-devel mailing list