summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractplayer.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-02 11:39:44 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-02 14:19:27 (GMT)
commit3ed427637dd76da371174e14b0f7f2a15801fcac (patch)
tree527b464d6d4561f37686d84a922d4bfb5f616ce1 /src/3rdparty/phonon/mmf/abstractplayer.cpp
parent7c70e69511817127aa4691339af4a6aa07c1502a (diff)
downloadQt-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/abstractplayer.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.cpp b/src/3rdparty/phonon/mmf/abstractplayer.cpp
index caf4092..13ff5fb 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractplayer.cpp
@@ -113,19 +113,23 @@ void MMF::AbstractPlayer::videoOutputChanged()
// Default behaviour is empty - overridden by VideoPlayer
}
-void MMF::AbstractPlayer::setError(Phonon::ErrorType error,
- const QString &errorMessage)
+void MMF::AbstractPlayer::setError(const QString &errorMessage)
{
TRACE_CONTEXT(AbstractPlayer::setError, EAudioInternal);
- TRACE_ENTRY("state %d error %d", m_state, error);
+ TRACE_ENTRY("state %d", m_state);
- m_error = error;
+ m_error = Phonon::NormalError;
m_errorString = errorMessage;
changeState(ErrorState);
TRACE_EXIT_0();
}
+void MMF::AbstractPlayer::setError(const QString &errorMessage, int symbianError)
+{
+ setError(errorMessage + ": " + Utils::symbianErrorToString(symbianError));
+}
+
Phonon::ErrorType MMF::AbstractPlayer::errorType() const
{
const Phonon::ErrorType result = (ErrorState == m_state)