summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2009-12-03 15:44:55 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-01-11 13:39:30 (GMT)
commit5adaf1ed086f198e6794cc52f3380b941fd90242 (patch)
treefa00f589644b6ce618bb17634f4a249d6ba3c823
parentfc6aa860008d09b6760f969a77e660c948eabbd9 (diff)
downloadQt-5adaf1ed086f198e6794cc52f3380b941fd90242.zip
Qt-5adaf1ed086f198e6794cc52f3380b941fd90242.tar.gz
Qt-5adaf1ed086f198e6794cc52f3380b941fd90242.tar.bz2
Phonon MMF: leaves during object construction throw exceptions
Reviewed-by: Frans Englich (cherry picked from commit bbab8eabb91b95dcd946c94b5f0ac59413e7a929)
-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();
}