aboutsummaryrefslogtreecommitdiff
path: root/launcher/java
diff options
context:
space:
mode:
authorKode <TheKodeToad@proton.me>2023-05-13 19:07:03 +0100
committerGitHub <noreply@github.com>2023-05-13 19:07:03 +0100
commitf60562c5a247934e39ab33a6d1c5ce64b3127f6a (patch)
tree3e0ff5817464de7c050c580397503daa9f0ee7bd /launcher/java
parent18cfe219fef2aabc1d3260764c02cd3476615176 (diff)
parentd5c6a1b4d1e6d052e42366d19ffa0047168e030d (diff)
downloadPrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.gz
PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.bz2
PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.zip
Merge branch 'develop' into mrpack-export
Signed-off-by: Kode <TheKodeToad@proton.me>
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();
}
}