Fixed build on MacOS with clang in C++11 mode.
authorErik Verbruggen <erik.verbruggen@digia.com>
Tue, 4 Dec 2012 09:02:22 +0000 (10:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 6 Dec 2012 09:24:05 +0000 (10:24 +0100)
avfvideowidget.mm:120:9: error: non-constant-expression cannot be narrowed from type 'int' to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
        x1, y1, zValue,
                ^~

Change-Id: I5a08bf8b53cf029dbdfaeaa03f4babd6d49d62ad
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/plugins/avfoundation/mediaplayer/avfvideowidget.mm

index 3075398..a6a2f42 100644 (file)
@@ -103,11 +103,11 @@ void AVFVideoWidget::paintGL()
         return;
 
     QRect targetRect = displayRect();
-    int x1 = targetRect.left();
-    int x2 = targetRect.right();
-    int y1 = targetRect.bottom();
-    int y2 = targetRect.top();
-    int zValue = 0;
+    GLfloat x1 = targetRect.left();
+    GLfloat x2 = targetRect.right();
+    GLfloat y1 = targetRect.bottom();
+    GLfloat y2 = targetRect.top();
+    GLfloat zValue = 0;
 
     const GLfloat textureCoordinates[] = {
         0, 0,