]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix missing audio duration in details view
authorMarc André Wittorf <marc-a@gmx.de>
Sat, 21 Jan 2017 00:37:35 +0000 (01:37 +0100)
committerAlbert Astals Cid <aacid@kde.org>
Sat, 21 Jan 2017 00:37:35 +0000 (01:37 +0100)
Enabling the 'duration' column in a folder with audio files did only show empty information. Properly initializing the QTime object fixes this.

 Testing Done

    Find a folder with audio files
    Make sure that Baloo has indexed this folder
    Open this folder in Dolphin, detail view, enable the Audio/Duration column
    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.

REVIEW: 127799

src/kitemviews/private/kbaloorolesprovider.cpp

index e0b889e6cc6cf5ef60361bc0b25f0cb9d1d1e85b..2ce1f7bf64a99d12a847e2b4f0ae68b2488c3014 100644 (file)
@@ -181,7 +181,7 @@ QString KBalooRolesProvider::orientationFromValue(int value) const
 
 QString KBalooRolesProvider::durationFromValue(int value) const
 {
-    QTime duration;
+    QTime duration(0, 0, 0);
     duration = duration.addSecs(value);
     return duration.toString(QStringLiteral("hh:mm:ss"));
 }