From 02887507c79ae9e4b80b77221999b1e7048b1c1f Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Thu, 21 Jul 2011 22:03:06 +1000 Subject: [PATCH] Craploads of temporary but annoying debug messages --- SleepLib/loader_plugins/prs1_loader.cpp | 28 ------------------------- SleepLib/machine.cpp | 3 +++ SleepLib/session.cpp | 10 +++++++-- mainwindow.cpp | 4 ++++ 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/SleepLib/loader_plugins/prs1_loader.cpp b/SleepLib/loader_plugins/prs1_loader.cpp index 6366d23a..8b57d8ef 100644 --- a/SleepLib/loader_plugins/prs1_loader.cpp +++ b/SleepLib/loader_plugins/prs1_loader.cpp @@ -980,7 +980,6 @@ bool PRS1Loader::OpenWaveforms(Session *session,QString filename) if (diff || corrupt) { qDebug() << "Timestamp restarts" << diff << corrupt << duration; - for (int i=0;iAddWaveform(w); } - - int froog=3; - /* file.read(headerbytes,sizeof(PRS1Header)); - file.read(waveheaderbytes,sizeof(PRS1Header)); - int ns=waveheader.num_signals; - WaveHeaderList ws[ns]; - char * wsc=&ws[0]; - file.read(wsc,waveheader.num_signals*3); - chksum8=0; - for (int i=0;i<15;i++) chksum8+=headerbytes[i]; - for (int i=0;i<5;i++) chksum8+=waveheaderbytes[i]; - for (int i=0;isecond->begin(); s!=d->second->end(); s++) { cnt++; if (qprogress) qprogress->setValue(66.0+(float(cnt)/float(size)*33.0)); if ((*s)->IsChanged()) (*s)->Store(path); } + qDebug() << "Day Save Completed"; + } return true; } diff --git a/SleepLib/session.cpp b/SleepLib/session.cpp index 1230a88f..f8f50927 100644 --- a/SleepLib/session.cpp +++ b/SleepLib/session.cpp @@ -247,7 +247,9 @@ bool Session::OpenEvents() { if(s_events_loaded) return true; bool b; + qDebug() << "Open Events() Start"; b=LoadEvents(s_eventfile); + qDebug() << "Open Events() Done"; if (!b) { qWarning() << "Error Unkpacking Events" << s_eventfile; } @@ -259,7 +261,9 @@ bool Session::OpenWaveforms() { if (s_waves_loaded) return true; bool b; + qDebug() << "OpenWaveforms() Start"; b=LoadWaveforms(s_wavefile); + qDebug() << "OpenWaveforms() Done"; if (!b) { qWarning() << "Error Unkpacking Wavefile" << s_wavefile; } @@ -274,7 +278,6 @@ bool Session::Store(QString path) // Storing Session Data in our format // {DataDir}/{MachineID}/{SessionID}.{ext} { - QDir dir(path); if (!dir.exists(path)) dir.mkpath(path); @@ -282,11 +285,14 @@ bool Session::Store(QString path) QString base; base.sprintf("%08lx",s_session); base=path+"/"+base; - //qDebug(("Storing Session: "+base).toLatin1()); + qDebug() << "Storing Session: " << base; bool a,b,c; a=StoreSummary(base+".000"); // if actually has events + qDebug() << " Summary done"; if (events.size()>0) b=StoreEvents(base+".001"); + qDebug() << " Events done"; if (waveforms.size()>0) c=StoreWaveforms(base+".002"); + qDebug() << " Waveform done"; if (a) { s_changed=false; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 75480aa0..34e1ab8d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -162,13 +162,17 @@ void MainWindow::on_action_Import_Data_triggered() } c+=d; } + qDebug() << "Finished Importing data" << c; if (c) { profile->Save(); + qDebug() << " profile->Save();"; if (daily) daily->ReloadGraphs(); + qDebug() << " daily->ReloadGraphs();"; if (overview) { overview->ReloadGraphs(); overview->UpdateGraphs(); } + qDebug() << "overview->ReloadGraphs();"; } qstatus->setText(tr("Ready")); qprogress->hide();