diff options
Diffstat (limited to 'src/widgets/widgets/qeffects.cpp')
-rw-r--r-- | src/widgets/widgets/qeffects.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp index b33ec543ab..74ac24a2b0 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; @@ -171,7 +171,7 @@ bool QAlphaWidget::eventFilter(QObject *o, QEvent *e) break; case QEvent::KeyPress: { #ifndef QT_NO_SHORTCUT - QKeyEvent *ke = (QKeyEvent*)e; + QKeyEvent *ke = static_cast<QKeyEvent *>(e); if (ke->matches(QKeySequence::Cancel)) { showWidget = false; } else @@ -292,6 +292,7 @@ void QAlphaWidget::alphaBlend() back_data += bpl; front_data += bpl; } + break; } default: break; @@ -428,7 +429,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)); |