UpdateChecker: Made 'currentBuildNo' a const member variable.
This commit is contained in:
parent
92e36b7e6b
commit
4128a25057
@ -73,7 +73,7 @@ namespace MUtils
|
||||
}
|
||||
update_status_t;
|
||||
|
||||
UpdateChecker(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const bool betaUpdates, const bool testMode = false);
|
||||
UpdateChecker(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const quint32 &installedBuildNo, const bool betaUpdates, const bool testMode = false);
|
||||
~UpdateChecker(void);
|
||||
|
||||
const int getUpdateStatus(void) const { return m_status; }
|
||||
@ -99,6 +99,8 @@ namespace MUtils
|
||||
const bool m_betaUpdates;
|
||||
const bool m_testMode;
|
||||
|
||||
const quint32 m_installedBuildNo;
|
||||
|
||||
const QString m_binaryWGet;
|
||||
const QString m_binaryGnuPG;
|
||||
const QString m_binaryKeys;
|
||||
|
@ -199,12 +199,13 @@ void UpdateCheckerInfo::resetInfo(void)
|
||||
// Constructor & Destructor
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
UpdateChecker::UpdateChecker(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const bool betaUpdates, const bool testMode)
|
||||
UpdateChecker::UpdateChecker(const QString &binWGet, const QString &binGnuPG, const QString &binKeys, const quint32 &installedBuildNo, const bool betaUpdates, const bool testMode)
|
||||
:
|
||||
m_updateInfo(new UpdateCheckerInfo()),
|
||||
m_binaryWGet(binWGet),
|
||||
m_binaryGnuPG(binGnuPG),
|
||||
m_binaryKeys(binKeys),
|
||||
m_installedBuildNo(installedBuildNo),
|
||||
m_betaUpdates(betaUpdates),
|
||||
m_testMode(testMode),
|
||||
m_maxProgress(getMaxProgress())
|
||||
@ -339,11 +340,11 @@ void UpdateChecker::checkForUpdates(void)
|
||||
|
||||
if(m_success)
|
||||
{
|
||||
if(m_updateInfo->m_buildNo > lamexp_version_build())
|
||||
if(m_updateInfo->m_buildNo > m_installedBuildNo)
|
||||
{
|
||||
setStatus(UpdateStatus_CompletedUpdateAvailable);
|
||||
}
|
||||
else if(m_updateInfo->m_buildNo == lamexp_version_build())
|
||||
else if(m_updateInfo->m_buildNo == m_installedBuildNo)
|
||||
{
|
||||
setStatus(UpdateStatus_CompletedNoUpdates);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user