summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-03 15:44:55 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-08 10:45:54 (GMT)
commitbbab8eabb91b95dcd946c94b5f0ac59413e7a929 (patch)
treea6b65e9e18d3148f955beebb31fa050743a37029
parent99b10b64fd5f68c63e0c406558b507e429eea248 (diff)
downloadQt-bbab8eabb91b95dcd946c94b5f0ac59413e7a929.zip
Qt-bbab8eabb91b95dcd946c94b5f0ac59413e7a929.tar.gz
Qt-bbab8eabb91b95dcd946c94b5f0ac59413e7a929.tar.bz2
Phonon MMF: leaves during object construction throw exceptions
Reviewed-by: Frans Englich
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/mmf_videoplayer.cpp10
2 files changed, 7 insertions, 9 deletions
diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp
index 72d6684..2ce10db 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.cpp
+++ b/src/3rdparty/phonon/mmf/audioplayer.cpp
@@ -50,9 +50,9 @@ void MMF::AudioPlayer::construct()
TRACE_CONTEXT(AudioPlayer::AudioPlayer, EAudioApi);
TRACE_ENTRY_0();
- TRAPD(err, m_player.reset(CPlayerType::NewL(*this, 0, EMdaPriorityPreferenceNone)));
- if (KErrNone != err)
- setError("Creation of audio player failed", err);
+ CPlayerType *player = 0;
+ QT_TRAP_THROWING(player = CPlayerType::NewL(*this, 0, EMdaPriorityPreferenceNone));
+ m_player.reset(player);
TRACE_EXIT_0();
}
diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
index 66bbe38..0a1c78f 100644
--- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp
@@ -78,23 +78,21 @@ void MMF::VideoPlayer::construct()
const TInt priority = 0;
const TMdaPriorityPreference preference = EMdaPriorityPreferenceNone;
- TRAPD(err,
- m_player.reset(CVideoPlayerUtility::NewL
+ CVideoPlayerUtility *player = 0;
+ QT_TRAP_THROWING(player = CVideoPlayerUtility::NewL
(
*this,
priority, preference,
m_wsSession, m_screenDevice,
*m_window,
m_videoRect, m_videoRect
- ))
+ )
);
+ m_player.reset(player);
// CVideoPlayerUtility::NewL starts DSA
m_dsaActive = true;
- if (KErrNone != err)
- setError("Creation of video player failed", err);
-
TRACE_EXIT_0();
}