Widgets: use pmf-style connect
Use pmf-style connect for some easy-to-convert connections. Change-Id: Id0a9d3465b2dfe5966374194a72980a67e978fe8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
05d69ad42b
commit
6780195d4e
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user