diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-09-10 00:23:00 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-09-10 00:56:18 (GMT) |
commit | 2b1a5032018a9636a391b78ef5681e59ca6404bc (patch) | |
tree | 20eec8b621d25662f3fa7182561f06b146c061be /src/3rdparty | |
parent | ea7615d80d63b6a3d0977e3eb86e34bcbd64d7de (diff) | |
download | Qt-2b1a5032018a9636a391b78ef5681e59ca6404bc.zip Qt-2b1a5032018a9636a391b78ef5681e59ca6404bc.tar.gz Qt-2b1a5032018a9636a391b78ef5681e59ca6404bc.tar.bz2 |
QScopedPointer makes code simpler.
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/mmf/videoplayer.cpp | 6 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/videoplayer.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp index b4f3d35..4f9834a 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/videoplayer.cpp @@ -86,14 +86,14 @@ void MMF::VideoPlayer::construct() // and respond to future showEvents from the videoOutput widget. TRAPD(err, - m_player = CVideoPlayerUtility::NewL + m_player.reset(CVideoPlayerUtility::NewL ( *this, priority, preference, *m_wsSession, *m_screenDevice, *m_window, m_windowRect, m_clipRect - ) + )) ); if (KErrNone != err) { @@ -108,8 +108,6 @@ MMF::VideoPlayer::~VideoPlayer() TRACE_CONTEXT(VideoPlayer::~VideoPlayer, EVideoApi); TRACE_ENTRY_0(); - delete m_player; - TRACE_EXIT_0(); } diff --git a/src/3rdparty/phonon/mmf/videoplayer.h b/src/3rdparty/phonon/mmf/videoplayer.h index 5761ce7..4fba68b 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.h +++ b/src/3rdparty/phonon/mmf/videoplayer.h @@ -86,7 +86,7 @@ private: void updateMmfOutput(); private: - CVideoPlayerUtility* m_player; + QScopedPointer<CVideoPlayerUtility> m_player; QScopedPointer<VideoOutput> m_dummyVideoOutput; // Not owned |