From 189e3ea348621d3649bcc45fc77b711ac4321cc3 Mon Sep 17 00:00:00 2001 From: Leo Franchi <lfranchi@kde.org> Date: Wed, 12 Oct 2011 17:24:49 -0400 Subject: [PATCH] Don't show 41 years as an age for a result if it was default set to 0. --- src/libtomahawk/playlist/trackmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/trackmodel.cpp b/src/libtomahawk/playlist/trackmodel.cpp index fdc57d128..57ec0ffe3 100644 --- a/src/libtomahawk/playlist/trackmodel.cpp +++ b/src/libtomahawk/playlist/trackmodel.cpp @@ -189,7 +189,10 @@ TrackModel::data( const QModelIndex& index, int role ) const break; case Age: - return TomahawkUtils::ageToString( QDateTime::fromTime_t( query->results().first()->modificationTime() ) ); + if ( query->results().first()->modificationTime() == 0 ) + return QString(); + else + return TomahawkUtils::ageToString( QDateTime::fromTime_t( query->results().first()->modificationTime() ) ); break; case Year: