diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp index eaf8deca69e..1e16b53d5c8 100644 --- a/src/widgets/widgets/qeffects.cpp +++ b/src/widgets/widgets/qeffects.cpp @@ -115,7 +115,7 @@ void QAlphaWidget::run(int time) qApp->installEventFilter(this); widget->setWindowOpacity(0.0); widget->show(); - connect(&anim, SIGNAL(timeout()), this, SLOT(render())); + connect(&anim, &QTimer::timeout, this, &QAlphaWidget::render); anim.start(1); #else //This is roughly equivalent to calling setVisible(true) without actually showing the widget @@ -138,7 +138,7 @@ void QAlphaWidget::run(int time) show(); setEnabled(false); - connect(&anim, SIGNAL(timeout()), this, SLOT(render())); + connect(&anim, &QTimer::timeout, this, &QAlphaWidget::render); anim.start(1); } else { duration = 0; @@ -428,7 +428,7 @@ void QRollEffect::run(int time) duration = qMin(qMax(dist/3, 50), 120); } - connect(&anim, SIGNAL(timeout()), this, SLOT(scroll())); + connect(&anim, &QTimer::timeout, this, &QRollEffect::scroll); move(widget->geometry().x(),widget->geometry().y()); resize(qMin(currentWidth, totalWidth), qMin(currentHeight, totalHeight)); diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp index 754744cf673..9cecee2ef86 100644 --- a/src/widgets/widgets/qstackedwidget.cpp +++ b/src/widgets/widgets/qstackedwidget.cpp @@ -98,8 +98,10 @@ QStackedWidget::QStackedWidget(QWidget *parent) { Q_D(QStackedWidget); d->layout = new QStackedLayout(this); - connect(d->layout, SIGNAL(widgetRemoved(int)), this, SIGNAL(widgetRemoved(int))); - connect(d->layout, SIGNAL(currentChanged(int)), this, SIGNAL(currentChanged(int))); + connect(d->layout, &QStackedLayout::widgetRemoved, + this, &QStackedWidget::widgetRemoved); + connect(d->layout, &QStackedLayout::currentChanged, + this, &QStackedWidget::currentChanged); } /*! diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp index ea3913525c3..8dd1347791b 100644 --- a/src/widgets/widgets/qstatusbar.cpp +++ b/src/widgets/widgets/qstatusbar.cpp @@ -494,7 +494,7 @@ void QStatusBar::showMessage(const QString &message, int timeout) if (timeout > 0) { if (!d->timer) { d->timer = new QTimer(this); - connect(d->timer, SIGNAL(timeout()), this, SLOT(clearMessage())); + connect(d->timer, &QTimer::timeout, this, &QStatusBar::clearMessage); } d->timer->start(timeout); } else if (d->timer) { diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp index b7abd1f0dc5..d45215dee38 100644 --- a/src/widgets/widgets/qwidgetanimator.cpp +++ b/src/widgets/widgets/qwidgetanimator.cpp @@ -73,7 +73,8 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo anim->setEasingCurve(QEasingCurve::InOutQuad); anim->setEndValue(final_geometry); m_animation_map[widget] = anim; - connect(anim, SIGNAL(finished()), SLOT(animationFinished())); + connect(anim, &QPropertyAnimation::finished, + this, &QWidgetAnimator::animationFinished); anim->start(QPropertyAnimation::DeleteWhenStopped); } else #endif // animation