From c726bc85da3921c6a31d4f7d014ddd8b8d7a3f88 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 28 Aug 2015 15:16:57 +0200 Subject: Port examples/opengl to new connection syntax. Change-Id: I486a4a2326bf57ec5ea08bccdcef79c3e5553db5 Reviewed-by: Laszlo Agocs --- examples/opengl/qopenglwindow/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/opengl/qopenglwindow/main.cpp') diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp index 123bebbe2a3..f444b5d7c7e 100644 --- a/examples/opengl/qopenglwindow/main.cpp +++ b/examples/opengl/qopenglwindow/main.cpp @@ -163,16 +163,20 @@ void OpenGLWindow::keyPressEvent(QKeyEvent *e) void OpenGLWindow::setAnimating(bool enabled) { + typedef void (QPaintDeviceWindow::*QPaintDeviceWindowVoidSlot)(); + if (enabled) { // Animate continuously, throttled by the blocking swapBuffers() call the // QOpenGLWindow internally executes after each paint. Once that is done // (frameSwapped signal is emitted), we schedule a new update. This // obviously assumes that the swap interval (see // QSurfaceFormat::setSwapInterval()) is non-zero. - connect(this, SIGNAL(frameSwapped()), this, SLOT(update())); + connect(this, &QOpenGLWindow::frameSwapped, + this, static_cast(&QPaintDeviceWindow::update)); update(); } else { - disconnect(this, SIGNAL(frameSwapped()), this, SLOT(update())); + disconnect(this, &QOpenGLWindow::frameSwapped, + this, static_cast(&QPaintDeviceWindow::update)); } } -- cgit v1.2.3