Clazy: Add second batch of SIGNAL/SLOT removal

This commit is contained in:
Felix Kauselmann
2021-06-03 16:17:07 +02:00
parent f813a018d2
commit ae8e47d863
19 changed files with 80 additions and 80 deletions

View File

@ -126,7 +126,7 @@ Comic::~Comic()
//-----------------------------------------------------------------------------
void Comic::setup()
{
connect(this, SIGNAL(pageChanged(int)), this, SLOT(checkIsBookmark(int)));
connect(this, &Comic::pageChanged, this, &Comic::checkIsBookmark);
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(updateBookmarkImage(int)));
connect(this, SIGNAL(imageLoaded(int)), this, SLOT(setPageLoaded(int)));

View File

@ -44,8 +44,8 @@ void HttpWorker::run()
QTimer tT;
tT.setSingleShot(true);
connect(&tT, SIGNAL(timeout()), &q, SLOT(quit()));
connect(&manager, SIGNAL(finished(QNetworkReply *)), &q, SLOT(quit()));
connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
QNetworkReply *reply = manager.get(QNetworkRequest(url));
tT.start(5000); // 5s timeout

View File

@ -9,9 +9,9 @@ OnStartFlowSelectionDialog::OnStartFlowSelectionDialog(QWidget *parent)
{
setModal(true);
QPushButton *acceptHW = new QPushButton(this);
connect(acceptHW, SIGNAL(clicked()), this, SLOT(accept()));
connect(acceptHW, &QAbstractButton::clicked, this, &QDialog::accept);
QPushButton *rejectHW = new QPushButton(this); //and use SW flow
connect(rejectHW, SIGNAL(clicked()), this, SLOT(reject()));
connect(rejectHW, &QAbstractButton::clicked, this, &QDialog::reject);
acceptHW->setGeometry(90, 165, 110, 118);
acceptHW->setFlat(true);

View File

@ -984,7 +984,7 @@ PictureFlow::PictureFlow(QWidget *parent, FlowType flowType)
d->animator = new PictureFlowAnimator;
d->animator->state = d->state;
QObject::connect(&d->animator->animateTimer, SIGNAL(timeout()), this, SLOT(updateAnimation()));
QObject::connect(&d->animator->animateTimer, &QTimer::timeout, this, &PictureFlow::updateAnimation);
QObject::connect(&d->triggerTimer, SIGNAL(timeout()), this, SLOT(render()));
@ -1299,9 +1299,9 @@ void PictureFlow::updateAnimation() //bucle principal
if (d->animator->animating == true) {
int difference = 10 - now.elapsed();
if (difference >= 0 && !frameSkiped)
QTimer::singleShot(difference, this, SLOT(updateAnimation()));
QTimer::singleShot(difference, this, &PictureFlow::updateAnimation);
else {
QTimer::singleShot(0, this, SLOT(updateAnimation()));
QTimer::singleShot(0, this, &PictureFlow::updateAnimation);
if (!frameSkiped)
framesSkip = -((difference - 10) / 10);
}