ResMed imported_files wasn't reading

This commit is contained in:
Mark Watkins 2018-04-26 04:04:05 +10:00
parent 916174ab71
commit 36e952d2fd
2 changed files with 7 additions and 7 deletions

View File

@ -19,6 +19,7 @@
#include <cmath>
#include "resmed_loader.h"
#include "SleepLib/session.h"
#include "SleepLib/calcs.h"
@ -1366,7 +1367,7 @@ int ResmedLoader::scanFiles(Machine * mach, QString datalog_path)
SessionID sid;
bool ok;
do {
line = impstream.readLine();
impstream >> line;
file = line.section(',',0,0);
str = line.section(',',1);
sid = str.toInt(&ok);
@ -1377,6 +1378,7 @@ int ResmedLoader::scanFiles(Machine * mach, QString datalog_path)
}
impfile.close();
QStringList dirs;
dirs.push_back(datalog_path);
@ -1724,7 +1726,7 @@ int ResmedLoader::scanFiles(Machine * mach, QString datalog_path)
if (impfile.open(QFile::WriteOnly)) {
QTextStream out(&impfile);
out << mach->serial();
out << mach->serial() << "\n";
QHash<QString, SessionID>::iterator skit;
QHash<QString, SessionID>::iterator skit_end = skipfiles.end();
for (skit = skipfiles.begin(); skit != skit_end; ++skit) {
@ -1880,7 +1882,7 @@ int ResmedLoader::Open(QString path)
dir.setFilter(QDir::Files | QDir::Hidden | QDir::Readable);
QFileInfoList flist = dir.entryInfoList();
{
int size = flist.size();
for (int i = 0; i < size; i++) {
QFileInfo fi = flist.at(i);
@ -1889,7 +1891,7 @@ int ResmedLoader::Open(QString path)
strfiles.push_back(fi.filePath());
}
}
}
strsess.clear();
ParseSTR(m, strfiles);

View File

@ -93,8 +93,6 @@ struct STRRecord
ramp_pressure = -1;
date=QDate();
}
STRRecord(const STRRecord & copy) {
@ -268,7 +266,7 @@ class ResmedLoader : public CPAPLoader
virtual MachineInfo PeekInfo(const QString & path);
//! \brief Scans for S9 SD folder structure signature, and loads any new data if found
//! \brief Scans for ResMed SD folder structure signature, and loads any new data if found
virtual int Open(QString path);
//! \brief Returns the version number of this ResMed loader