diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-12-02 11:39:44 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-12-02 14:19:27 (GMT) |
commit | 3ed427637dd76da371174e14b0f7f2a15801fcac (patch) | |
tree | 527b464d6d4561f37686d84a922d4bfb5f616ce1 /src/3rdparty/phonon/mmf/mmf_videoplayer.cpp | |
parent | 7c70e69511817127aa4691339af4a6aa07c1502a (diff) | |
download | Qt-3ed427637dd76da371174e14b0f7f2a15801fcac.zip Qt-3ed427637dd76da371174e14b0f7f2a15801fcac.tar.gz Qt-3ed427637dd76da371174e14b0f7f2a15801fcac.tar.bz2 |
Added error strings to Phonon MMF backend
Note that changing Utils from a namespace into a class, and then
using Q_DECLARE_TR_FUNCTIONS in the class declaration, was necessary
in order to be able to call tr(...) from the implementation of
Utils::symbianErrorToString.
Task-number: QTBUG-4994
Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'src/3rdparty/phonon/mmf/mmf_videoplayer.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/mmf_videoplayer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp index b6f53ae..4619f54 100644 --- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp @@ -93,7 +93,7 @@ void MMF::VideoPlayer::construct() m_dsaActive = true; if (KErrNone != err) - changeState(ErrorState); + setError("Creation of video player failed", err); TRACE_EXIT_0(); } @@ -129,7 +129,7 @@ void MMF::VideoPlayer::doPause() TRAPD(err, m_player->PauseL()); if (KErrNone != err) { TRACE("PauseL error %d", err); - setError(NormalError); + setError(tr("Pause failed"), err); } } @@ -158,7 +158,7 @@ void MMF::VideoPlayer::doSeek(qint64 ms) } else { TRACE("SetPositionL error %d", err); - setError(NormalError); + setError(tr("Seek failed"), err); } } @@ -200,7 +200,7 @@ qint64 MMF::VideoPlayer::currentTime() const // If we don't cast away constness here, we simply have to ignore // the error. - const_cast<VideoPlayer*>(this)->setError(NormalError); + const_cast<VideoPlayer*>(this)->setError(tr("Getting position failed"), err); } return result; @@ -226,7 +226,7 @@ void MMF::VideoPlayer::MvpuoOpenComplete(TInt aError) if (KErrNone == aError) m_player->Prepare(); else - setError(NormalError); + setError(tr("Opening clip failed"), aError); TRACE_EXIT_0(); } @@ -252,7 +252,7 @@ void MMF::VideoPlayer::MvpuoPrepareComplete(TInt aError) emit totalTimeChanged(totalTime()); changeState(StoppedState); } else { - setError(NormalError); + setError(tr("Buffering clip failed"), err); } TRACE_EXIT_0(); @@ -412,7 +412,7 @@ void MMF::VideoPlayer::startDirectScreenAccess() if(KErrNone == err) m_dsaActive = true; else - setError(NormalError); + setError(tr("Video display error"), err); } } @@ -424,7 +424,7 @@ bool MMF::VideoPlayer::stopDirectScreenAccess() if(KErrNone == err) m_dsaActive = false; else - setError(NormalError); + setError(tr("Video display error"), err); } return dsaWasActive; } @@ -600,7 +600,7 @@ void MMF::VideoPlayer::applyVideoWindowChange() TRAPD(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight, antialias)); if(KErrNone != err) { TRACE("SetScaleFactorL (1) err %d", err); - setError(NormalError); + setError(tr("Video display error"), err); } if(KErrNone == err) { @@ -615,13 +615,13 @@ void MMF::VideoPlayer::applyVideoWindowChange() if (KErrNone != err) { TRACE("SetDisplayWindowL err %d", err); - setError(NormalError); + setError(tr("Video display error"), err); } else { m_dsaActive = true; TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight, antialias)); if(KErrNone != err) { TRACE("SetScaleFactorL (2) err %d", err); - setError(NormalError); + setError(tr("Video display error"), err); } } } |