mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-04 18:20:42 +00:00
fix bug init in statistics - check invalid dates
This commit is contained in:
parent
8e0e2721c8
commit
61c08e35dc
@ -173,7 +173,7 @@ void Statistics::updateDisabledInfo()
|
||||
void DisabledInfo::update(QDate latestDate, QDate earliestDate)
|
||||
{
|
||||
clear();
|
||||
if (AppSetting->clinicalMode()) return;
|
||||
if ( (!latestDate.isValid()) || (!earliestDate.isValid()) || (AppSetting->clinicalMode()) )return;
|
||||
qint64 complianceHours = 3600000.0 * p_profile->cpap->complianceHours(); // conbvert to ms
|
||||
totalDays = 1+earliestDate.daysTo(latestDate);
|
||||
for (QDate date = latestDate ; date >= earliestDate ; date=date.addDays(-1) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user