diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-07-26 17:55:29 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-07-26 17:55:29 +0200 |
commit | d8caab515aa641ec901592d40b5d30c6dfd282f5 (patch) | |
tree | 612b322374083309027204b656d4dc0a78780de8 /logic/java | |
parent | 6310f6569c2630f27ad72dc0a5fef9f9fec5a88c (diff) | |
download | MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.gz MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.lz MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.xz MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.zip |
GH-1053 add back update progress dialog
Diffstat (limited to 'logic/java')
-rw-r--r-- | logic/java/JavaCheckerJob.h | 2 | ||||
-rw-r--r-- | logic/java/JavaVersionList.cpp | 8 | ||||
-rw-r--r-- | logic/java/JavaVersionList.h | 1 |
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; |