mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
Last commit accidentaly undid the one before with the ResMed fix
This commit is contained in:
parent
14964249e6
commit
aba8cc8052
@ -2673,111 +2673,10 @@ int ResmedLoader::Open(const QString & dirpath)
|
||||
emit updateMessage(QObject::tr("Finishing Up..."));
|
||||
QApplication::processEvents();
|
||||
|
||||
//int size = m->sessionlist.size();
|
||||
//int cnt=0;
|
||||
// Session * sess;
|
||||
|
||||
|
||||
// Scan through all sessions, and remove any strsess records that have a matching session already
|
||||
// for (sessit = m->sessionlist.begin(); sessit != sessend; ++sessit) {
|
||||
// sess = *sessit;
|
||||
// quint32 key = sess->settings[RMS9_MaskOnTime].toUInt();
|
||||
|
||||
// // Ugly.. need to check sessions overlaps..
|
||||
|
||||
// QMap<quint32, STRRecord>::iterator e = strsess.find(key);
|
||||
// if (e != end) {
|
||||
// strsess.erase(e);
|
||||
// }
|
||||
// }
|
||||
///
|
||||
|
||||
/* QHash<SessionID, Session *>::iterator sessit;
|
||||
QHash<SessionID, Session *>::iterator sessend = mach->sessionlist.end();;
|
||||
|
||||
QMap<SessionID, Session *>::iterator sit;
|
||||
QMap<SessionID, Session *>::iterator ns_end = new_sessions.end();
|
||||
|
||||
|
||||
QMap<quint32, STRRecord>::iterator it;
|
||||
QMap<quint32, STRRecord>::iterator end = strsess.end();
|
||||
|
||||
QList<quint32> strlist;
|
||||
for (it = strsess.begin(); it != end; ++it) {
|
||||
STRRecord & R = it.value();
|
||||
quint32 s1 = R.maskon;
|
||||
quint32 e1 = R.maskoff;
|
||||
bool fnd = false;
|
||||
for (sessit = mach->sessionlist.begin(); sessit != sessend; ++sessit) {
|
||||
sess = sessit.value();
|
||||
quint32 s2 = sess->session();
|
||||
quint32 e2 = s2 + (sess->length() / 1000L);
|
||||
|
||||
if ((s1 < e2) && (s2 < e1)) {
|
||||
strlist.push_back(it.key());
|
||||
fnd = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!fnd) for (sit = new_sessions.begin(); sit != ns_end; ++sit) {
|
||||
sess = sit.value();
|
||||
quint32 s2 = sess->session();
|
||||
quint32 e2 = s2 + (sess->length() / 1000L);
|
||||
|
||||
if ((s1 < e2) && (s2 < e1)) {
|
||||
strlist.push_back(it.key());
|
||||
fnd = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<strlist.size(); i++) {
|
||||
int k = strlist.at(i);
|
||||
strsess.remove(k);
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
//size = strsess.size();
|
||||
//cnt=0;
|
||||
quint32 ignoreolder = p_profile->session->ignoreOlderSessionsDate().toTime_t();
|
||||
|
||||
bool ignoreold = p_profile->session->ignoreOlderSessions();
|
||||
// strsess end can change above.
|
||||
end = strsess.end();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Scan through unmatched strsess records, and attempt to get at summary data
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
for (it = strsess.begin(); it != end; ++it) {
|
||||
STRRecord & R = it.value();
|
||||
|
||||
if (ignoreold && (R.maskon < ignoreolder)) {
|
||||
mach->skipSaveTask();
|
||||
continue;
|
||||
}
|
||||
|
||||
//noooo ASSERTS!!!! Q _ASSERT(R.sessionid == 0);
|
||||
|
||||
// the following should not happen
|
||||
if (R.sessionid > 0) {
|
||||
mach->skipSaveTask();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
queTask(new ResmedImportStage2(this, R, mach));
|
||||
}
|
||||
|
||||
num_new_sessions += countTasks();
|
||||
*/
|
||||
|
||||
|
||||
|
||||
finishAddingSessions();
|
||||
|
||||
mach->SaveSummary();
|
||||
|
||||
#ifdef DEBUG_EFFICIENCY
|
||||
{
|
||||
qint64 totalbytes = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user