Fix progress percentage calculation broken in recent commit

Multiply the fractional value by 100 instead of multiplying the denominator
of the division operation by 100.
This commit is contained in:
Robert Knight 2011-08-24 11:53:13 +01:00
parent b4311d79a9
commit ddff071b8c

View file

@ -228,7 +228,7 @@ void UpdateInstaller::installFiles()
++filesInstalled; ++filesInstalled;
if (m_observer) if (m_observer)
{ {
double percentage = filesInstalled / (m_script->filesToInstall().size() * 100.0); double percentage = (1.0 * filesInstalled / m_script->filesToInstall().size()) * 100.0;
m_observer->updateProgress(static_cast<int>(percentage)); m_observer->updateProgress(static_cast<int>(percentage));
} }
} }