summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractplayer.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-10-23 09:52:05 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-10-23 13:52:36 (GMT)
commit58efa8aa5e845af2e3db840a8a654bd55fb98fb0 (patch)
tree3078f5035ac9daff38d220d74400a1e59cca8628 /src/3rdparty/phonon/mmf/abstractplayer.h
parent1c6bd7f61d2cbe0b8c0fa451f5f9a7efdfaf04c7 (diff)
downloadQt-58efa8aa5e845af2e3db840a8a654bd55fb98fb0.zip
Qt-58efa8aa5e845af2e3db840a8a654bd55fb98fb0.tar.gz
Qt-58efa8aa5e845af2e3db840a8a654bd55fb98fb0.tar.bz2
Improve error handling.
Errors reported via: * the DummyPlayer didn't work due to it not doing the usual state transitions/emission * MediaObject::setSource() due to errors being emitted before connections being set up. * A general state bug. Task-number: QTBUG-4752 Reviewed-by: Gareth Stockwell
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractplayer.h')
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index 08558cf..1c4ea02 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -93,7 +93,8 @@ public:
/**
* Records error and changes state to ErrorState
*/
- void setError(Phonon::ErrorType error);
+ void setError(Phonon::ErrorType error,
+ const QString &errorMessage = QString());
Phonon::State state() const;
Q_SIGNALS:
@@ -132,7 +133,10 @@ protected:
PrivateState privateState() const;
- virtual void changeState(PrivateState newState) = 0;
+ /**
+ * Changes state and emits stateChanged()
+ */
+ virtual void changeState(PrivateState newState);
/**
* Modifies m_state directly. Typically you want to call changeState(),
@@ -152,6 +156,7 @@ protected:
private:
PrivateState m_state;
Phonon::ErrorType m_error;
+ QString m_errorString;
qint32 m_tickInterval;
qint32 m_transitionTime;
qint32 m_prefinishMark;