Review Request 127799: Fix missing audio duration in details view

Anthony Fieroni bvbfan at abv.bg
Mon May 2 09:40:13 BST 2016



> On Май 2, 2016, 2:58 преди обяд, Aleix Pol Gonzalez wrote:
> > src/kitemviews/private/kbaloorolesprovider.cpp, line 184
> > <https://git.reviewboard.kde.org/r/127799/diff/1/?file=462017#file462017line184>
> >
> >     Shouldn't it be the same with this?
> >     `QTime duration(0, 0, value);`
> 
> Emmanuel Pescosta wrote:
>     No, this will violate the precondition (0 <= sec <= 59) whenever a song is longer than a minute.
>     
>     But I wounder why QTime::QTime() doesn't work properly, according to the doc it creates an invalid null time which is equal to QTime(0, 0, 0, 0) and QTime::addSecs() should then make it valid.
>     I am missing something or is this a bug/inconsistency in Qt?

https://code.woboq.org/qt5/qtbase/src/corelib/tools/qdatetime.h.html QTime() -> isValid = false
https://code.woboq.org/qt5/qtbase/src/corelib/tools/qdatetime.cpp.html#_ZNK5QTime8addMSecsEi adds sec or msec only if valid :)


- Anthony


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127799/#review95066
-----------------------------------------------------------


On Май 1, 2016, 1 преди обяд, Marc André Wittorf wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127799/
> -----------------------------------------------------------
> 
> (Updated Май 1, 2016, 1 преди обяд)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> Enabling the 'duration' column in a folder with audio files did only show empty information. Properly initializing the QTime object fixes this.
> 
> 
> Diffs
> -----
> 
>   src/kitemviews/private/kbaloorolesprovider.cpp e0b889e 
> 
> Diff: https://git.reviewboard.kde.org/r/127799/diff/
> 
> 
> Testing
> -------
> 
> 1. Find a folder with audio files
> 2. Make sure that Baloo has indexed this folder
> 3. Open this folder in Dolphin, detail view, enable the Audio/Duration column
> 4. Unpatched Dolphin does not display audio duration, patched Dolphin does
> 
> Tested on Gentoo x86_64 with Qt 5.5.1, KF 5.21.0 and Arch x86_64 with Qt 5.6.0 and KF 5.21.0.
> 
> 
> Thanks,
> 
> Marc André Wittorf
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20160502/cbb716ac/attachment.htm>


More information about the kfm-devel mailing list