From: APTX Date: Sun, 16 Feb 2014 12:32:03 +0000 (+0100) Subject: Fix SeekSlider not showing seek time when hovering over it. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=7210e1645ba0709bc56b83b0ed06ce9fc94dfab0;p=aniplayer2.git Fix SeekSlider not showing seek time when hovering over it. --- diff --git a/player/seekslider.cpp b/player/seekslider.cpp index b76bfb1..919be60 100644 --- a/player/seekslider.cpp +++ b/player/seekslider.cpp @@ -99,7 +99,7 @@ void SeekSlider::paintEvent(QPaintEvent *event) p.fillRect(markerPos + markerWidth / 2, seekerTop + 1, seekerWidth - markerPos, seekerHeight - 1, unwatchedPartColor); int i = 1; - for (QQueue::const_iterator it = previuousPos.constBegin(); it != previuousPos.constEnd(); ++it) + for (auto it = previuousPos.constBegin(); it != previuousPos.constEnd(); ++it) { int markerPos = seekerLeft + 1 + markerWidth / 2 + qRound(double(*it) / double(m_length) * double(seekerWidth - markerWidth / 2 - 1)); QColor c = previousMarkerColor; @@ -117,7 +117,7 @@ void SeekSlider::paintEvent(QPaintEvent *event) markerShadowPos = qBound(seekerLeft + 1 + markerWidth / 2, markerShadowPos, seekerLeft + seekerWidth - markerWidth / 2); p.fillRect(markerShadowPos - markerWidth / 2, seekerTop + 1, markerWidth, seekerHeight - 1, markerShadowColor); - QString time = QTime().addMSecs(pos2time(markerShadowPos)).toString("hh:mm:ss"); + QString time = QTime(0, 0).addMSecs(pos2time(markerShadowPos)).toString("hh:mm:ss"); QRect r = p.fontMetrics().boundingRect(time); int xdelta = markerShadowPos + markerWidth / 2 + 1;