diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-28 15:16:57 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-02 10:21:56 +0000 |
commit | c726bc85da3921c6a31d4f7d014ddd8b8d7a3f88 (patch) | |
tree | ed9cef6e31acb5881a77473e4f12a90b3c9ea426 /examples/opengl/qopenglwindow/main.cpp | |
parent | 4b340402b97b83790b3d71a8244a246eec4f8abd (diff) |
Port examples/opengl to new connection syntax.
Change-Id: I486a4a2326bf57ec5ea08bccdcef79c3e5553db5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'examples/opengl/qopenglwindow/main.cpp')
-rw-r--r-- | examples/opengl/qopenglwindow/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp index 123bebbe2a..f444b5d7c7 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<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update)); update(); } else { - disconnect(this, SIGNAL(frameSwapped()), this, SLOT(update())); + disconnect(this, &QOpenGLWindow::frameSwapped, + this, static_cast<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update)); } } |