aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/openglunderqml/squircle.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-21 16:20:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-22 22:16:19 +0000
commit1e2e356f0f4f9f7dd424bc69cff0dce956f528e5 (patch)
tree0f000a235afa8aac621dc785e8655a99d5dc0a42 /examples/quick/scenegraph/openglunderqml/squircle.cpp
parentbc7dff35723e8f2cf09660b94f7fba9e8478860f (diff)
Port examples to new connection syntax.
Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'examples/quick/scenegraph/openglunderqml/squircle.cpp')
-rw-r--r--examples/quick/scenegraph/openglunderqml/squircle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/openglunderqml/squircle.cpp b/examples/quick/scenegraph/openglunderqml/squircle.cpp
index 2834b93e10..8bb9af1ed4 100644
--- a/examples/quick/scenegraph/openglunderqml/squircle.cpp
+++ b/examples/quick/scenegraph/openglunderqml/squircle.cpp
@@ -42,7 +42,7 @@ Squircle::Squircle()
: m_t(0)
, m_renderer(0)
{
- connect(this, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(handleWindowChanged(QQuickWindow*)));
+ connect(this, &QQuickItem::windowChanged, this, &Squircle::handleWindowChanged);
}
//! [7]
@@ -62,8 +62,8 @@ void Squircle::setT(qreal t)
void Squircle::handleWindowChanged(QQuickWindow *win)
{
if (win) {
- connect(win, SIGNAL(beforeSynchronizing()), this, SLOT(sync()), Qt::DirectConnection);
- connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(cleanup()), Qt::DirectConnection);
+ connect(win, &QQuickWindow::beforeSynchronizing, this, &Squircle::sync, Qt::DirectConnection);
+ connect(win, &QQuickWindow::sceneGraphInvalidated, this, &Squircle::cleanup, Qt::DirectConnection);
//! [1]
// If we allow QML to do the clearing, they would clear what we paint
// and nothing would show.
@@ -93,7 +93,7 @@ void Squircle::sync()
{
if (!m_renderer) {
m_renderer = new SquircleRenderer();
- connect(window(), SIGNAL(beforeRendering()), m_renderer, SLOT(paint()), Qt::DirectConnection);
+ connect(window(), &QQuickWindow::beforeRendering, m_renderer, &SquircleRenderer::paint, Qt::DirectConnection);
}
m_renderer->setViewportSize(window()->size() * window()->devicePixelRatio());
m_renderer->setT(m_t);