aboutsummaryrefslogtreecommitdiff
path: root/launcher/java/JavaChecker.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-05-13 19:06:47 +0200
committerGitHub <noreply@github.com>2023-05-13 19:06:47 +0200
commitd5c6a1b4d1e6d052e42366d19ffa0047168e030d (patch)
tree8ba9746a188c39003213839825552543e3f1a48f /launcher/java/JavaChecker.cpp
parentc5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (diff)
parent6b6d6a01dc9cf05715f01e3a549740b169ef9ae3 (diff)
downloadPrismLauncher-d5c6a1b4d1e6d052e42366d19ffa0047168e030d.tar.gz
PrismLauncher-d5c6a1b4d1e6d052e42366d19ffa0047168e030d.tar.bz2
PrismLauncher-d5c6a1b4d1e6d052e42366d19ffa0047168e030d.zip
Merge pull request #1007 from Ryex/fix/network_and_signals
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();