summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-07-01 14:19:14 +0200
committerSimon Rettberg2022-07-01 14:19:14 +0200
commitb17bd36ba239676c9b706bfb9b2c48fd67157915 (patch)
tree6695594b06e1d03b73e2498bcd40e65c95416800
parentcmake bullshit (diff)
downloadspeedcheck-b17bd36ba239676c9b706bfb9b2c48fd67157915.tar.gz
speedcheck-b17bd36ba239676c9b706bfb9b2c48fd67157915.tar.xz
speedcheck-b17bd36ba239676c9b706bfb9b2c48fd67157915.zip
Fix signal-slot connections by using new method
-rw-r--r--src/speedcheck.cpp10
1 files changed, 5 insertions, 5 deletions
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();
}