diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-05-09 19:10:34 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-05-09 19:10:34 +0000 |
| commit | 029b517f5bcb7e97e28032cd67d645f765ae5fe4 (patch) | |
| tree | d73f0d995bd194273fc849fc748f4717b3e63d6e /src/ui/playlist.cpp | |
| parent | edfa16a7b17a622120dcb018245bda9d2eadd44c (diff) | |
| download | qmmp-029b517f5bcb7e97e28032cd67d645f765ae5fe4.tar.gz qmmp-029b517f5bcb7e97e28032cd67d645f765ae5fe4.tar.bz2 qmmp-029b517f5bcb7e97e28032cd67d645f765ae5fe4.zip | |
fixed time format
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1726 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/playlist.cpp')
| -rw-r--r-- | src/ui/playlist.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ui/playlist.cpp b/src/ui/playlist.cpp index 234df6d26..248fb3453 100644 --- a/src/ui/playlist.cpp +++ b/src/ui/playlist.cpp @@ -530,16 +530,9 @@ void PlayList::showSortMenu() QString PlayList::formatTime (int sec) { - int minutes = sec / 60; - int seconds = sec % 60; - - QString str_minutes = QString::number (minutes); - QString str_seconds = QString::number (seconds); - - if (minutes < 10) str_minutes.prepend ("0"); - if (seconds < 10) str_seconds.prepend ("0"); - - return str_minutes + ":" + str_seconds; + if(sec > 3600) + sec /= 60; + return QString("%1:%2").arg(sec/60, 2, 10, QChar('0')).arg(sec%60, 2, 10, QChar('0')); } void PlayList::setTime(qint64 time) |
