tasks now emit floats rather than integers

Simplifies code for tasks.
This commit is contained in:
itsmattkc
2020-05-19 02:44:38 +10:00
parent b9cd83eff1
commit cb383d760b
10 changed files with 28 additions and 11 deletions
+5 -3
View File
@@ -77,12 +77,14 @@ void ProgressDialog::closeEvent(QCloseEvent *e)
#endif
}
void ProgressDialog::SetProgress(int value)
void ProgressDialog::SetProgress(double value)
{
bar_->setValue(value);
int percent = qRound(100.0 * value);
bar_->setValue(percent);
#ifdef Q_OS_WINDOWS
Core::instance()->main_window()->SetTaskbarButtonProgress(value, 100);
Core::instance()->main_window()->SetTaskbarButtonProgress(percent, 100);
#endif
}