# HG changeset patch # User Chris Cannam # Date 1440078861 -3600 # Node ID 39019ce29178aab3a03dae69d83ef9db79c3cd4e # Parent e22bfe8ca2486f952883879b935df82c65d34de1# Parent 2c43f99040689b482b52971b1edef6b697427f21 Merge through to branch for Tony 2.0 diff -r 2c43f9904068 -r 39019ce29178 data/fileio/CSVFileReader.cpp --- a/data/fileio/CSVFileReader.cpp Thu Aug 20 13:33:46 2015 +0100 +++ b/data/fileio/CSVFileReader.cpp Thu Aug 20 14:54:21 2015 +0100 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff -r 2c43f9904068 -r 39019ce29178 data/fileio/CSVFileReader.h --- a/data/fileio/CSVFileReader.h Thu Aug 20 13:33:46 2015 +0100 +++ b/data/fileio/CSVFileReader.h Thu Aug 20 14:54:21 2015 +0100 @@ -27,6 +27,7 @@ #include class QFile; +class QIODevice; class CSVFileReader : public DataFileReader { diff -r 2c43f9904068 -r 39019ce29178 data/fileio/CSVFileWriter.cpp --- a/data/fileio/CSVFileWriter.cpp Thu Aug 20 13:33:46 2015 +0100 +++ b/data/fileio/CSVFileWriter.cpp Thu Aug 20 14:54:21 2015 +0100 @@ -68,7 +68,7 @@ .arg(temp.getTemporaryFilename()); return; } - + QTextStream out(&file); out << m_model->toDelimitedDataStringWithOptions (m_delimiter, m_options); diff -r 2c43f9904068 -r 39019ce29178 data/model/SparseModel.h --- a/data/model/SparseModel.h Thu Aug 20 13:33:46 2015 +0100 +++ b/data/model/SparseModel.h Thu Aug 20 14:54:21 2015 +0100 @@ -181,7 +181,7 @@ } else { QString s; for (PointListConstIterator i = m_points.begin(); i != m_points.end(); ++i) { - if (i->frame >= f0 && i->frame < f1) { + if (i->frame >= f0 && i->frame <= f1) { s += i->toDelimitedDataString(delimiter, opts, m_sampleRate) + "\n"; } } @@ -559,8 +559,8 @@ QMutexLocker locker(&m_mutex); sv_frame_t f = 0; if (!m_points.empty()) { - PointListConstIterator i(m_points.end()); - f = (--i)->frame; + PointListConstIterator i(m_points.end()); + f = (--i)->frame; } if (m_extendTo > f) return m_extendTo; else return f;