Merge pull request #3912 from BreadFish64/fix-conversion-warnings

fix conversion warnings
This commit is contained in:
Weiyi Wang 2018-07-03 21:14:01 +03:00 committed by GitHub
commit fd5f71bcff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -931,6 +931,7 @@ void GMainWindow::OnMenuInstallCIA() {
ui.action_Install_CIA->setEnabled(false);
progress_bar->show();
progress_bar->setMaximum(INT_MAX);
QtConcurrent::run([&, filepaths] {
QString current_path;
@ -947,8 +948,8 @@ void GMainWindow::OnMenuInstallCIA() {
}
void GMainWindow::OnUpdateProgress(size_t written, size_t total) {
progress_bar->setMaximum(total);
progress_bar->setValue(written);
progress_bar->setValue(
static_cast<int>(INT_MAX * (static_cast<double>(written) / static_cast<double>(total))));
}
void GMainWindow::OnCIAInstallReport(Service::AM::InstallStatus status, QString filepath) {