From b17bd36ba239676c9b706bfb9b2c48fd67157915 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 1 Jul 2022 14:19:14 +0200 Subject: Fix signal-slot connections by using new method --- src/speedcheck.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/speedcheck.cpp b/src/speedcheck.cpp index 1248323..303f3e3 100644 --- a/src/speedcheck.cpp +++ b/src/speedcheck.cpp @@ -18,10 +18,10 @@ SpeedCheck::SpeedCheck(QString fileName, bool autoStart) _fileName(fileName) { _ui->setupUi(this); - connect(_ui->btnStart, SIGNAL(clicked(bool)), this, SLOT(startClicked(bool))); - connect(_ui->btnQuit, SIGNAL(clicked(bool)), this, SLOT(quitClicked(bool))); + connect(_ui->btnStart, &QPushButton::clicked, this, &SpeedCheck::startClicked); + connect(_ui->btnQuit, &QPushButton::clicked, this, &SpeedCheck::quitClicked); _timer.setInterval(200); - connect(&_timer, SIGNAL(timeout()), this, SLOT(updateTimer())); + connect(&_timer, &QTimer::timeout, this, &SpeedCheck::updateTimer); if (autoStart) { QTimer::singleShot(1, [this]() { this->startClicked(true); @@ -52,8 +52,8 @@ void SpeedCheck::startClicked(bool) _ui->btnStart->setDisabled(true); delete _thread; _thread = new CopyThread(file, this); - connect(_thread, SIGNAL(logMessage(QString)), this, SLOT(logMessage(QString)), Qt::QueuedConnection); - connect(_thread, SIGNAL(finished()), this, SLOT(testFinished()), Qt::QueuedConnection); + connect(_thread, &CopyThread::logMessage, this, &SpeedCheck::logMessage, Qt::QueuedConnection); + connect(_thread, &CopyThread::finished, this, &SpeedCheck::testFinished, Qt::QueuedConnection); _timer.start(); _thread->start(); } -- cgit v1.2.3-55-g7522