summaryrefslogtreecommitdiffstats
path: root/logic/java
diff options
context:
space:
mode:
Diffstat (limited to 'logic/java')
-rw-r--r--logic/java/JavaCheckerJob.h2
-rw-r--r--logic/java/JavaVersionList.cpp8
-rw-r--r--logic/java/JavaVersionList.h1
3 files changed, 2 insertions, 9 deletions
diff --git a/logic/java/JavaCheckerJob.h b/logic/java/JavaCheckerJob.h
index 4e2038ca..23003a03 100644
--- a/logic/java/JavaCheckerJob.h
+++ b/logic/java/JavaCheckerJob.h
@@ -36,7 +36,7 @@ public:
// if this is already running, the action needs to be started right away!
if (isRunning())
{
- emit progress(current_progress, total_progress);
+ setProgress(current_progress, total_progress);
connect(base.get(), SIGNAL(checkFinished(JavaCheckResult)), SLOT(partFinished(JavaCheckResult)));
base->performCheck();
diff --git a/logic/java/JavaVersionList.cpp b/logic/java/JavaVersionList.cpp
index 52f2e62f..a463ca6c 100644
--- a/logic/java/JavaVersionList.cpp
+++ b/logic/java/JavaVersionList.cpp
@@ -162,7 +162,7 @@ void JavaListLoadTask::executeTask()
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(), SIGNAL(progress(qint64,qint64)), this, SLOT(checkerProgress(qint64, qint64)));
+ connect(m_job.get(), &Task::progress, this, &Task::setProgress);
qDebug() << "Probing the following Java paths: ";
int id = 0;
@@ -181,12 +181,6 @@ void JavaListLoadTask::executeTask()
m_job->start();
}
-void JavaListLoadTask::checkerProgress(qint64 current, qint64 total)
-{
- float progress = (current * 100.0) / total;
- this->setProgress((int) progress);
-}
-
void JavaListLoadTask::javaCheckerFinished(QList<JavaCheckResult> results)
{
QList<JavaVersionPtr> candidates;
diff --git a/logic/java/JavaVersionList.h b/logic/java/JavaVersionList.h
index f0176673..d78f9e7c 100644
--- a/logic/java/JavaVersionList.h
+++ b/logic/java/JavaVersionList.h
@@ -89,7 +89,6 @@ public:
virtual void executeTask();
public slots:
void javaCheckerFinished(QList<JavaCheckResult> results);
- void checkerProgress(qint64 current, qint64 total);
protected:
std::shared_ptr<JavaCheckerJob> m_job;