diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2012-06-12 14:54:22 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-13 05:53:53 +0200 |
commit | d1b0862ad4d1dc64d8707464fb891ec397dc4b4a (patch) | |
tree | d3781c85dcffe6eb6332663f1bac80626c5088ec /src/multimedia/video/qabstractvideobuffer.cpp | |
parent | f5e3fdc4a72e1ab26342c4b97408928debc68551 (diff) |
Reduce the usage of QAbstractVideoBufferPrivate.
Move the handle type to the base class (since it's always needed) and
don't allocate the private class in the default paths.
Change-Id: I870a315310ce740f07b1d43cedecfce21feae505
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
Diffstat (limited to 'src/multimedia/video/qabstractvideobuffer.cpp')
-rw-r--r-- | src/multimedia/video/qabstractvideobuffer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp index 127cd5ea0..92cdfca2a 100644 --- a/src/multimedia/video/qabstractvideobuffer.cpp +++ b/src/multimedia/video/qabstractvideobuffer.cpp @@ -122,11 +122,9 @@ namespace Constructs an abstract video buffer of the given \a type. */ QAbstractVideoBuffer::QAbstractVideoBuffer(HandleType type) - : d_ptr(new QAbstractVideoBufferPrivate) + : d_ptr(0) + , m_type(type) { - Q_D(QAbstractVideoBuffer); - - d->handleType = type; } /*! @@ -134,10 +132,8 @@ QAbstractVideoBuffer::QAbstractVideoBuffer(HandleType type) */ QAbstractVideoBuffer::QAbstractVideoBuffer(QAbstractVideoBufferPrivate &dd, HandleType type) : d_ptr(&dd) + , m_type(type) { - Q_D(QAbstractVideoBuffer); - - d->handleType = type; } /*! @@ -168,7 +164,7 @@ void QAbstractVideoBuffer::release() */ QAbstractVideoBuffer::HandleType QAbstractVideoBuffer::handleType() const { - return d_func()->handleType; + return m_type; } /*! |