diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2011-09-19 00:57:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-21 16:54:45 +0200 |
commit | 500dc2a6f888e283c6d40730bdf7c2998ee0437b (patch) | |
tree | eb1803d6ac87fb68f211fb2ffadd59cff805c0dc /src/plugins/platforms/directfb/qdirectfbcursor.cpp | |
parent | 405894fc39cdab937c38b917adf4e8d390f80790 (diff) |
[directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers
Introduce QDirectFBPointer and use it throughout the code to
fix various resource leaks in the DirectFB backend. Fix the surface
ownership of the IDirectFBSurface in the Blittable/BackingStore
code.
Change-Id: I0d4572eaab80b3558e644f26d76222461bf37bbb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbcursor.cpp')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbcursor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp index 869dc3f97d..123d69c58e 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp +++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp @@ -46,7 +46,7 @@ QDirectFBCursor::QDirectFBCursor(QPlatformScreen *screen) : QPlatformCursor(screen) { - QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, &m_layer); + QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, m_layer.outPtr()); m_image.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0)); } @@ -69,11 +69,11 @@ void QDirectFBCursor::changeCursor(QCursor *cursor, QWindow *) map = cursor->pixmap(); } - IDirectFBSurface *surface = QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle()); + IDirectFBSurface* surface(QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.handle())); - if (m_layer->SetCooperativeLevel(m_layer, DLSCL_ADMINISTRATIVE) != DFB_OK) { + if (m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_ADMINISTRATIVE) != DFB_OK) { return; } - m_layer->SetCursorShape( m_layer, surface, xSpot, ySpot); - m_layer->SetCooperativeLevel(m_layer, DLSCL_SHARED); + m_layer->SetCursorShape(m_layer.data(), surface, xSpot, ySpot); + m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_SHARED); } |