directfb: Compile with C++11 support enabled
authorBradley T. Hughes <bradley.hughes@nokia.com>
Tue, 5 Jun 2012 06:18:41 +0000 (08:18 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 5 Jun 2012 10:30:02 +0000 (12:30 +0200)
qdirectfbblitter.cpp:146: error: narrowing conversion of 'srcRect.x()'
from 'qreal' to 'int' inside { }
qdirectfbblitter.cpp:152: error: narrowing conversion of 'rect.x()' from
'qreal' to 'int' inside { }

The same error exists for calls to y(), width(), and height() at both
locations.

Change-Id: I14f165a6a1cab9502e157e798157b835faf2300f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/plugins/platforms/directfb/qdirectfbblitter.cpp

index acd6dc9..e2f7a00 100644 (file)
@@ -143,13 +143,13 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con
     m_surface->SetPorterDuff(m_surface.data(), porterDuff);
     m_surface->SetDstBlendFunction(m_surface.data(), DSBF_INVSRCALPHA);
 
-    const DFBRectangle sRect = { srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height() };
+    const DFBRectangle sRect = { int(srcRect.x()), int(srcRect.y()), int(srcRect.width()), int(srcRect.height()) };
 
     DFBResult result;
     if (rect.width() == srcRect.width() && rect.height() == srcRect.height())
         result = m_surface->Blit(m_surface.data(), s, &sRect, rect.x(), rect.y());
     else {
-        const DFBRectangle dRect = { rect.x(), rect.y(), rect.width(), rect.height() };
+        const DFBRectangle dRect = { int(rect.x()), int(rect.y()), int(rect.width()), int(rect.height()) };
         result = m_surface->StretchBlit(m_surface.data(), s, &sRect, &dRect);
     }
     if (result != DFB_OK)