aboutsummaryrefslogtreecommitdiff
path: root/launcher/java/JavaChecker.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-05-14 14:20:24 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-05-14 14:20:24 +0300
commitffcc58cb3e89c502cfc12183d091dd9719ab436c (patch)
treef247a5b6d21cf71ea46782286fadde926db61d84 /launcher/java/JavaChecker.cpp
parentef6cbdfa2ade6a5f1ccb7253c1647ce1e9d5442d (diff)
parentd5c6a1b4d1e6d052e42366d19ffa0047168e030d (diff)
downloadPrismLauncher-ffcc58cb3e89c502cfc12183d091dd9719ab436c.tar.gz
PrismLauncher-ffcc58cb3e89c502cfc12183d091dd9719ab436c.tar.bz2
PrismLauncher-ffcc58cb3e89c502cfc12183d091dd9719ab436c.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'launcher/java/JavaChecker.cpp')
-rw-r--r--launcher/java/JavaChecker.cpp14
1 files changed, 5 insertions, 9 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();