Fixed compile error in eglfs plugin due to narrowing conversion.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 6 Jun 2012 06:13:53 +0000 (08:13 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 6 Jun 2012 13:29:34 +0000 (15:29 +0200)
qeglfscursor.cpp:300: error: narrowing conversion of
‘((const QRectF*)r)->QRectF::left()’ from ‘qreal’ to ‘const GLfloat’
inside { }

Change-Id: Ic4273828ad361ffac5a68068372bf400d468fb38
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/plugins/platforms/eglfs/qeglfscursor.cpp

index e72d4f6..8627cfb 100644 (file)
@@ -292,11 +292,15 @@ void QEglFSCursor::draw(const QRectF &r)
 
     glUseProgram(m_program);
 
+    const GLfloat x1 = r.left();
+    const GLfloat x2 = r.right();
+    const GLfloat y1 = r.top();
+    const GLfloat y2 = r.bottom();
     const GLfloat cursorCoordinates[] = {
-        r.left(), r.bottom(),
-        r.right(), r.bottom(),
-        r.left(), r.top(),
-        r.right(), r.top()
+        x1, y2,
+        x2, y2,
+        x1, y1,
+        x2, y1
     };
 
     const GLfloat s1 = m_cursor.textureRect.left();