From d8caab515aa641ec901592d40b5d30c6dfd282f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 26 Jul 2015 17:55:29 +0200 Subject: GH-1053 add back update progress dialog --- logic/java/JavaCheckerJob.h | 2 +- logic/java/JavaVersionList.cpp | 8 +------- logic/java/JavaVersionList.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'logic/java') 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(new JavaCheckerJob("Java detection")); connect(m_job.get(), SIGNAL(finished(QList)), this, SLOT(javaCheckerFinished(QList))); - 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 results) { QList 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 results); - void checkerProgress(qint64 current, qint64 total); protected: std::shared_ptr m_job; -- cgit v1.2.3