From c986506605f68177fbdf32ed7d7512a4062672e7 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 21 Oct 2014 21:13:19 +0200 Subject: [PATCH] Use Q_D instead of d_func --- src/libtomahawk/audio/AudioEngine.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/audio/AudioEngine.cpp b/src/libtomahawk/audio/AudioEngine.cpp index 556a68ff0..fece820a4 100644 --- a/src/libtomahawk/audio/AudioEngine.cpp +++ b/src/libtomahawk/audio/AudioEngine.cpp @@ -1244,14 +1244,16 @@ AudioEngine::currentTime() const qint64 AudioEngine::currentTrackTotalTime() const { + Q_D( const AudioEngine ); + // FIXME : This is too hacky. The problem is that I don't know why // libVLC doesn't report total duration for stream data (imem://) // But it's not a real problem for playback, since EndOfStream is emitted by libVLC itself // This value is only used by AudioOutput to evaluate if it's close to end of stream - if ( d_func()->audioOutput->totalTime() <= 0 && d_func()->currentTrack && d_func()->currentTrack->track() ) { - return d_func()->currentTrack->track()->duration() * 1000 + 1000; + if ( d->audioOutput->totalTime() <= 0 && d->currentTrack && d->currentTrack->track() ) { + return d->currentTrack->track()->duration() * 1000 + 1000; } - return d_func()->audioOutput->totalTime(); + return d->audioOutput->totalTime(); }