mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Clazy: Add second batch of SIGNAL/SLOT removal
This commit is contained in:
@ -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)));
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user