From 1af5d3ec40fb95cbcd080ea8cb00259ab80c2fda Mon Sep 17 00:00:00 2001 From: Guy Scharf Date: Wed, 4 Nov 2020 10:12:19 -0700 Subject: [PATCH] Improve some qWarning messages. resmed_loader: include all timestamps in "time in future" error messages mainwindow: add qWarning message if first journal session is null pointer --- oscar/SleepLib/loader_plugins/resmed_loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/resmed_loader.cpp b/oscar/SleepLib/loader_plugins/resmed_loader.cpp index df360550..4a2700f4 100644 --- a/oscar/SleepLib/loader_plugins/resmed_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resmed_loader.cpp @@ -2142,7 +2142,7 @@ void ResDayTask::run() quint32 maskoff = resday->str.maskoff[i]; if ( (maskon > QDateTime::currentDateTime().toTime_t()) || (maskoff > QDateTime::currentDateTime().toTime_t()) ) { - qWarning() << "mask time in future" << resday->date; + qWarning() << "mask time in future" << resday->date << "now" << QDateTime::currentDateTime().toTime_t() << "maskon" << maskon << "maskoff" << maskoff; continue; } if (((maskon>0) && (maskoff>0)) && (maskon != maskoff)) { //ignore very short sessions @@ -2184,7 +2184,7 @@ void ResDayTask::run() for (int i=0; i < maskOnSize; ++i) { if ( (resday->str.maskon[i] > QDateTime::currentDateTime().toTime_t()) || (resday->str.maskoff[i] > QDateTime::currentDateTime().toTime_t()) ) { - qWarning() << "mask time in future" << resday->date; + qWarning() << "mask time in future" << resday->date << "now" << QDateTime::currentDateTime().toTime_t() << "maskon" << resday->str.maskon[i] << "maskoff" << resday->str.maskoff[i]; continue; } if (((resday->str.maskon[i]>0) || (resday->str.maskoff[i]>0)) @@ -2235,7 +2235,7 @@ void ResDayTask::run() EDFduration dur = getEDFDuration(fullpath); if ((dur.start > (QDateTime::currentDateTime().toMSecsSinceEpoch()/1000L)) || (dur.end > (QDateTime::currentDateTime().toMSecsSinceEpoch()/1000L)) ) { - qWarning() << "Future Date in" << fullpath; + qWarning() << "Future Date in" << fullpath << "now" << QDateTime::currentDateTime().toSecsSinceEpoch() << "maskon" << dur.start << "maskoff" << dur.end; continue; // skip this file } for (int i=overlaps.size()-1; i>=0; --i) {