aboutsummaryrefslogtreecommitdiff
path: root/launcher/java
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/java')
-rw-r--r--launcher/java/JavaChecker.cpp14
-rw-r--r--launcher/java/JavaCheckerJob.cpp2
2 files changed, 6 insertions, 10 deletions
diff --git a/launcher/java/JavaChecker.cpp b/launcher/java/JavaChecker.cpp
index 041583d1..b4c55b3d 100644
--- a/launcher/java/JavaChecker.cpp
+++ b/launcher/java/JavaChecker.cpp
@@ -87,15 +87,11 @@ void JavaChecker::performCheck()
process->setProcessEnvironment(CleanEnviroment());
qDebug() << "Running java checker: " + m_path + args.join(" ");;
- connect(process.get(), SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finished(int, QProcess::ExitStatus)));
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- connect(process.get(), SIGNAL(errorOccurred(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
-#else
- connect(process.get(), SIGNAL(error(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
-#endif
- connect(process.get(), SIGNAL(readyReadStandardOutput()), this, SLOT(stdoutReady()));
- connect(process.get(), SIGNAL(readyReadStandardError()), this, SLOT(stderrReady()));
- connect(&killTimer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(process.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &JavaChecker::finished);
+ connect(process.get(), &QProcess::errorOccurred, this, &JavaChecker::error);
+ connect(process.get(), &QProcess::readyReadStandardOutput, this, &JavaChecker::stdoutReady);
+ connect(process.get(), &QProcess::readyReadStandardError, this, &JavaChecker::stderrReady);
+ connect(&killTimer, &QTimer::timeout, this, &JavaChecker::timeout);
killTimer.setSingleShot(true);
killTimer.start(15000);
process->start();
diff --git a/launcher/java/JavaCheckerJob.cpp b/launcher/java/JavaCheckerJob.cpp
index 67d70066..48274974 100644
--- a/launcher/java/JavaCheckerJob.cpp
+++ b/launcher/java/JavaCheckerJob.cpp
@@ -38,7 +38,7 @@ void JavaCheckerJob::executeTask()
for (auto iter : javacheckers)
{
javaresults.append(JavaCheckResult());
- connect(iter.get(), SIGNAL(checkFinished(JavaCheckResult)), SLOT(partFinished(JavaCheckResult)));
+ connect(iter.get(), &JavaChecker::checkFinished, this, &JavaCheckerJob::partFinished);
iter->performCheck();
}
}