summaryrefslogtreecommitdiffstats
path: root/api/logic/java/JavaInstallList.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-06-27 04:32:53 +0200
committerPetr Mrázek <peterix@gmail.com>2017-06-27 04:32:53 +0200
commit36f3e24cf31cfe6fad413d70ab8ad187a5251fb7 (patch)
tree8da3bebaf8f8f4aa275d348e8c2ed8028202c445 /api/logic/java/JavaInstallList.cpp
parent89d3a66658ebdb16582a4d7a2cab57cfd6906393 (diff)
downloadMultiMC-36f3e24cf31cfe6fad413d70ab8ad187a5251fb7.tar
MultiMC-36f3e24cf31cfe6fad413d70ab8ad187a5251fb7.tar.gz
MultiMC-36f3e24cf31cfe6fad413d70ab8ad187a5251fb7.tar.lz
MultiMC-36f3e24cf31cfe6fad413d70ab8ad187a5251fb7.tar.xz
MultiMC-36f3e24cf31cfe6fad413d70ab8ad187a5251fb7.zip
NOISSUE remove some bad code in various Task related classes
Diffstat (limited to 'api/logic/java/JavaInstallList.cpp')
-rw-r--r--api/logic/java/JavaInstallList.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/logic/java/JavaInstallList.cpp b/api/logic/java/JavaInstallList.cpp
index 44ac861d..39657f40 100644
--- a/api/logic/java/JavaInstallList.cpp
+++ b/api/logic/java/JavaInstallList.cpp
@@ -150,7 +150,7 @@ void JavaListLoadTask::executeTask()
QList<QString> candidate_paths = ju.FindJavaPaths();
m_job = std::shared_ptr<JavaCheckerJob>(new JavaCheckerJob("Java detection"));
- connect(m_job.get(), SIGNAL(finished(QList<JavaCheckResult>)), this, SLOT(javaCheckerFinished(QList<JavaCheckResult>)));
+ connect(m_job.get(), &Task::finished, this, &JavaListLoadTask::javaCheckerFinished);
connect(m_job.get(), &Task::progress, this, &Task::setProgress);
qDebug() << "Probing the following Java paths: ";
@@ -170,9 +170,10 @@ void JavaListLoadTask::executeTask()
m_job->start();
}
-void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results)
+void JavaListLoadTask::javaCheckerFinished()
{
QList<JavaInstallPtr> candidates;
+ auto results = m_job->getResults();
qDebug() << "Found the following valid Java installations:";
for(JavaCheckResult result : results)