diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-24 10:33:37 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-01-25 20:06:06 +0100 |
commit | 318b58562ae89453fb98e8145cd0440e14ba60b0 (patch) | |
tree | 622bc032cf076b4569621032f3a3315d95c3ae88 /examples/opengl | |
parent | c28fde3fdac19fd5a5f614bb7983080031c924b3 (diff) | |
parent | 79352528a1726b4551ea4d9285dd2394dd0d43da (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
.qmake.conf
mkspecs/common/msvc-desktop.conf
mkspecs/common/msvc-version.conf
mkspecs/common/winrt_winphone/qmake.conf
mkspecs/features/mac/default_post.prf
mkspecs/features/mac/sdk.prf
mkspecs/features/qt.prf
mkspecs/features/uikit/default_post.prf
mkspecs/features/winrt/default_pre.prf
mkspecs/winphone-arm-msvc2013/qmake.conf
mkspecs/winphone-x86-msvc2013/qmake.conf
mkspecs/winrt-arm-msvc2013/qmake.conf
mkspecs/winrt-x64-msvc2013/qmake.conf
mkspecs/winrt-x86-msvc2013/qmake.conf
qmake/generators/win32/msvc_vcproj.cpp
src/gui/kernel/qwindowsysteminterface.cpp
src/network/kernel/qhostaddress.cpp
src/plugins/platforms/mirclient/qmirclientplugin.cpp
src/plugins/platforms/mirclient/qmirclientplugin.h
src/widgets/util/qsystemtrayicon.cpp
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
tools/configure/Makefile.mingw
tools/configure/Makefile.win32
Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
Diffstat (limited to 'examples/opengl')
-rw-r--r-- | examples/opengl/paintedwindow/paintedwindow.cpp | 4 | ||||
-rw-r--r-- | examples/opengl/qopenglwidget/mainwindow.cpp | 11 | ||||
-rw-r--r-- | examples/opengl/qopenglwindow/main.cpp | 6 |
3 files changed, 6 insertions, 15 deletions
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp index 6e031e5cb7..799431a765 100644 --- a/examples/opengl/paintedwindow/paintedwindow.cpp +++ b/examples/opengl/paintedwindow/paintedwindow.cpp @@ -95,9 +95,7 @@ PaintedWindow::PaintedWindow() 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)); + connect(this, &PaintedWindow::rotationChanged, this, QOverload<>::of(&PaintedWindow::paint)); } void PaintedWindow::exposeEvent(QExposeEvent *) diff --git a/examples/opengl/qopenglwidget/mainwindow.cpp b/examples/opengl/qopenglwidget/mainwindow.cpp index f602c9995b..1bb2aa2bf0 100644 --- a/examples/opengl/qopenglwidget/mainwindow.cpp +++ b/examples/opengl/qopenglwidget/mainwindow.cpp @@ -61,8 +61,6 @@ #include "glwidget.h" -typedef void (QWidget::*QWidgetVoidSlot)(); - MainWindow::MainWindow() : m_nextX(1), m_nextY(1) { @@ -131,14 +129,11 @@ MainWindow::MainWindow() QMenu *helpMenu = menuBar()->addMenu("&Help"); helpMenu->addAction("About Qt", qApp, &QApplication::aboutQt); - connect(m_timer, &QTimer::timeout, - glwidget, static_cast<QWidgetVoidSlot>(&QWidget::update)); + connect(m_timer, &QTimer::timeout, glwidget, QOverload<>::of(&QWidget::update)); connect(slider, &QAbstractSlider::valueChanged, glwidget, &GLWidget::setScaling); connect(transparent, &QCheckBox::toggled, glwidget, &GLWidget::setTransparent); - - typedef void (QSpinBox::*QSpinBoxIntSignal)(int); - connect(updateInterval, static_cast<QSpinBoxIntSignal>(&QSpinBox::valueChanged), + connect(updateInterval, QOverload<int>::of(&QSpinBox::valueChanged), this, &MainWindow::updateIntervalChanged); connect(timerBased, &QCheckBox::toggled, this, &MainWindow::timerUsageChanged); connect(timerBased, &QCheckBox::toggled, updateInterval, &QWidget::setEnabled); @@ -162,7 +157,7 @@ void MainWindow::addNew() return; GLWidget *w = new GLWidget(this, false, qRgb(qrand() % 256, qrand() % 256, qrand() % 256)); m_glWidgets << w; - connect(m_timer, &QTimer::timeout, w, static_cast<QWidgetVoidSlot>(&QWidget::update)); + connect(m_timer, &QTimer::timeout, w, QOverload<>::of(&QWidget::update)); m_layout->addWidget(w, m_nextY, m_nextX, 1, 1); if (m_nextX == 3) { m_nextX = 1; diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp index 4287d42d24..4f008b45a6 100644 --- a/examples/opengl/qopenglwindow/main.cpp +++ b/examples/opengl/qopenglwindow/main.cpp @@ -173,8 +173,6 @@ 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 @@ -182,11 +180,11 @@ void OpenGLWindow::setAnimating(bool enabled) // obviously assumes that the swap interval (see // QSurfaceFormat::setSwapInterval()) is non-zero. connect(this, &QOpenGLWindow::frameSwapped, - this, static_cast<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update)); + this, QOverload<>::of(&QPaintDeviceWindow::update)); update(); } else { disconnect(this, &QOpenGLWindow::frameSwapped, - this, static_cast<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update)); + this, QOverload<>::of(&QPaintDeviceWindow::update)); } } |