diff options
Diffstat (limited to 'examples/quick/scenegraph')
4 files changed, 13 insertions, 13 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); diff --git a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp index 272b903ef2..95fd377dcf 100644 --- a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp +++ b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp @@ -228,7 +228,7 @@ void ThreadRenderer::ready() m_renderThread->moveToThread(m_renderThread); - connect(window(), SIGNAL(sceneGraphInvalidated()), m_renderThread, SLOT(shutDown()), Qt::QueuedConnection); + connect(window(), &QQuickWindow::sceneGraphInvalidated, m_renderThread, &RenderThread::shutDown, Qt::QueuedConnection); m_renderThread->start(); update(); @@ -274,10 +274,10 @@ QSGNode *ThreadRenderer::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * * * This FBO rendering pipeline is throttled by vsync on the scene graph rendering thread. */ - connect(m_renderThread, SIGNAL(textureReady(int,QSize)), node, SLOT(newTexture(int,QSize)), Qt::DirectConnection); - connect(node, SIGNAL(pendingNewTexture()), window(), SLOT(update()), Qt::QueuedConnection); - connect(window(), SIGNAL(beforeRendering()), node, SLOT(prepareNode()), Qt::DirectConnection); - connect(node, SIGNAL(textureInUse()), m_renderThread, SLOT(renderNext()), Qt::QueuedConnection); + connect(m_renderThread, &RenderThread::textureReady, node, &TextureNode::newTexture, Qt::DirectConnection); + connect(node, &TextureNode::pendingNewTexture, window(), &QQuickWindow::update, Qt::QueuedConnection); + connect(window(), &QQuickWindow::beforeRendering, node, &TextureNode::prepareNode, Qt::DirectConnection); + connect(node, &TextureNode::textureInUse, m_renderThread, &RenderThread::renderNext, Qt::QueuedConnection); // Get the production of FBO textures started.. QMetaObject::invokeMethod(m_renderThread, "renderNext", Qt::QueuedConnection); diff --git a/examples/quick/scenegraph/threadedanimation/spinner.cpp b/examples/quick/scenegraph/threadedanimation/spinner.cpp index 04b91e5449..6fefc33f4d 100644 --- a/examples/quick/scenegraph/threadedanimation/spinner.cpp +++ b/examples/quick/scenegraph/threadedanimation/spinner.cpp @@ -49,8 +49,8 @@ public: , m_spinning(false) , m_window(window) { - connect(window, SIGNAL(beforeRendering()), this, SLOT(maybeRotate())); - connect(window, SIGNAL(frameSwapped()), this, SLOT(maybeUpdate())); + connect(window, &QQuickWindow::beforeRendering, this, &SpinnerNode::maybeRotate); + connect(window, &QQuickWindow::frameSwapped, this, &SpinnerNode::maybeUpdate); QImage image(":/scenegraph/threadedanimation/spinner.png"); m_texture = window->createTextureFromImage(image); diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp index 384d118809..0dd035ffea 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp @@ -151,8 +151,8 @@ public: // If this node is used as in a shader effect source, we need to propegate // changes that will occur in this node outwards. - connect(m_provider1, SIGNAL(textureChanged()), this, SLOT(textureChange()), Qt::DirectConnection); - connect(m_provider2, SIGNAL(textureChanged()), this, SLOT(textureChange()), Qt::DirectConnection); + connect(m_provider1.data(), &QSGTextureProvider::textureChanged, this, &XorNode::textureChange, Qt::DirectConnection); + connect(m_provider2.data(), &QSGTextureProvider::textureChanged, this, &XorNode::textureChange, Qt::DirectConnection); } void preprocess() { |