mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 11:10:44 +00:00
Fix LoadSummary upgrade for m_cnt fix, and m_sum load error
This commit is contained in:
parent
9ee92ecf48
commit
ffbc94bb41
@ -282,12 +282,20 @@ bool Session::LoadSummary(QString filename)
|
|||||||
settings[code] = i.value();
|
settings[code] = i.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
QHash<QString, int> zcnt;
|
if (version < 13) {
|
||||||
in >> zcnt;
|
QHash<QString, int> zcnt;
|
||||||
|
in >> zcnt;
|
||||||
for (QHash<QString, int>::iterator i = zcnt.begin(); i != zcnt.end(); i++) {
|
for (QHash<QString, int>::iterator i = zcnt.begin(); i != zcnt.end(); i++) {
|
||||||
code = schema::channel[i.key()].id();
|
code = schema::channel[i.key()].id();
|
||||||
m_cnt[code] = i.value();
|
m_cnt[code] = i.value();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QHash<QString, EventDataType> zcnt;
|
||||||
|
in >> zcnt;
|
||||||
|
for (QHash<QString, EventDataType>::iterator i = zcnt.begin(); i != zcnt.end(); i++) {
|
||||||
|
code = schema::channel[i.key()].id();
|
||||||
|
m_cnt[code] = i.value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QHash<QString, double> zsum;
|
QHash<QString, double> zsum;
|
||||||
@ -295,7 +303,7 @@ bool Session::LoadSummary(QString filename)
|
|||||||
|
|
||||||
for (QHash<QString, double>::iterator i = zsum.begin(); i != zsum.end(); i++) {
|
for (QHash<QString, double>::iterator i = zsum.begin(); i != zsum.end(); i++) {
|
||||||
code = schema::channel[i.key()].id();
|
code = schema::channel[i.key()].id();
|
||||||
m_cnt[code] = i.value();
|
m_sum[code] = i.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
QHash<QString, EventDataType> ztmp;
|
QHash<QString, EventDataType> ztmp;
|
||||||
|
Loading…
Reference in New Issue
Block a user