Code improvements

Updated Qt connect syntax
This commit is contained in:
Valentino Orlandi 2023-01-23 22:02:55 +01:00
parent 6c91de1838
commit 9e87951349
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ void SnakeGame::on_button_Play_clicked()
this->ui->stackedWidget_GameDisplay->setCurrentIndex( 1 );
// start playing
this->game_loop = new QTimer(this);
connect(this->game_loop, SIGNAL(timeout()), this, SLOT(processGameLogic()));
connect(this->game_loop, &QTimer::timeout, this, &SnakeGame::processGameLogic);
this->game_loop->start(175);
this->playing = true;
}

View File

@ -66,7 +66,7 @@ void Crapup::versionCheck( const float v )
int err = 1;
this->img_timer = new QTimer(this);
connect(this->img_timer, SIGNAL(timeout()), this, SLOT(rotateImg()));
connect(this->img_timer, &QTimer::timeout, this, &Crapup::rotateImg);
this->img_timer->start(100);
QByteArray ua = QByteArray::fromStdString("LogDoctor/"+std::to_string(v)+" (version check)");
@ -93,7 +93,7 @@ void Crapup::versionCheck( const float v )
}
this->request_timer = new QTimer(this);
this->request_timer->setSingleShot( true );
connect(this->request_timer, SIGNAL(timeout()), this, SLOT(requestTimeout()));
connect(this->request_timer, &QTimer::timeout, this, &Crapup::requestTimeout);
// set the URL and make the request
QNetworkRequest request;