summaryrefslogtreecommitdiffstats
path: root/examples/opengl/paintedwindow/paintedwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/paintedwindow/paintedwindow.cpp')
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index c67edb6f65..6b015bd2c3 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -83,9 +83,11 @@ PaintedWindow::PaintedWindow()
m_targetOrientation = contentOrientation();
m_nextTargetOrientation = Qt::PrimaryOrientation;
- connect(screen(), SIGNAL(orientationChanged(Qt::ScreenOrientation)), this, SLOT(orientationChanged(Qt::ScreenOrientation)));
- connect(m_animation, SIGNAL(finished()), this, SLOT(rotationDone()));
- connect(this, SIGNAL(rotationChanged(qreal)), this, SLOT(paint()));
+ connect(screen(), &QScreen::orientationChanged, this, &PaintedWindow::orientationChanged);
+ connect(m_animation, &QAbstractAnimation::finished, this, &PaintedWindow::rotationDone);
+ typedef void (PaintedWindow::*PaintedWindowVoidSlot)();
+ connect(this, &PaintedWindow::rotationChanged,
+ this, static_cast<PaintedWindowVoidSlot>(&PaintedWindow::paint));
}
void PaintedWindow::exposeEvent(QExposeEvent *)