From feb996e3ab44e68082c97102556ea396f5df3f44 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 11 Jul 2012 17:32:16 +1000 Subject: QQuickCanvas renames QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones --- examples/quick/openglunderqml/main.qml | 2 +- examples/quick/openglunderqml/squircle.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/quick/openglunderqml/main.qml b/examples/quick/openglunderqml/main.qml index 174bb262ca..66bc08bf03 100644 --- a/examples/quick/openglunderqml/main.qml +++ b/examples/quick/openglunderqml/main.qml @@ -71,7 +71,7 @@ Item { id: label color: "black" wrapMode: Text.WordWrap - text: "The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickCanvas. This text label and its border is rendered using QML" + text: "The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML" anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom diff --git a/examples/quick/openglunderqml/squircle.cpp b/examples/quick/openglunderqml/squircle.cpp index c25e28c12f..b1340687f9 100644 --- a/examples/quick/openglunderqml/squircle.cpp +++ b/examples/quick/openglunderqml/squircle.cpp @@ -41,7 +41,7 @@ #include "squircle.h" -#include +#include #include Squircle::Squircle() @@ -52,9 +52,9 @@ Squircle::Squircle() void Squircle::itemChange(ItemChange change, const ItemChangeData &) { - // The ItemSceneChange event is sent when we are first attached to a canvas. + // The ItemSceneChange event is sent when we are first attached to a window. if (change == ItemSceneChange) { - QQuickCanvas *c = canvas(); + QQuickWindow *c = window(); // Connect our the beforeRendering signal to our paint function. // Since this call is executed on the rendering thread it must be @@ -104,7 +104,7 @@ void Squircle::paint() m_program->setAttributeArray(0, GL_FLOAT, values, 2); m_program->setUniformValue("t", (float) m_t); - glViewport(0, 0, canvas()->width(), canvas()->height()); + glViewport(0, 0, window()->width(), window()->height()); glDisable(GL_DEPTH_TEST); -- cgit v1.2.3