Mercurial > hg > svcore
diff data/fileio/CSVFileReader.cpp @ 1429:48e9f538e6e9
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | 87ae75da6527 |
children | 53fa8d57b728 |
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp Thu Mar 01 14:43:40 2018 +0000 +++ b/data/fileio/CSVFileReader.cpp Thu Mar 01 18:02:22 2018 +0000 @@ -50,18 +50,18 @@ bool good = false; if (!file->exists()) { - m_error = QFile::tr("File \"%1\" does not exist").arg(path); + m_error = QFile::tr("File \"%1\" does not exist").arg(path); } else if (!file->open(QIODevice::ReadOnly | QIODevice::Text)) { - m_error = QFile::tr("Failed to open file \"%1\"").arg(path); + m_error = QFile::tr("Failed to open file \"%1\"").arg(path); } else { - good = true; + good = true; } if (good) { m_device = file; m_filename = QFileInfo(path).fileName(); } else { - delete file; + delete file; } } @@ -173,10 +173,10 @@ } else { windowSize = 1; } - if (timeUnits == CSVFormat::TimeSeconds || + if (timeUnits == CSVFormat::TimeSeconds || timeUnits == CSVFormat::TimeMilliseconds) { - sampleRate = m_mainModelSampleRate; - } + sampleRate = m_mainModelSampleRate; + } } SparseOneDimensionalModel *model1 = 0; @@ -244,22 +244,22 @@ model1 = new SparseOneDimensionalModel(sampleRate, windowSize); model = model1; break; - + case CSVFormat::TwoDimensionalModel: model2 = new SparseTimeValueModel(sampleRate, windowSize, false); model = model2; break; - + case CSVFormat::TwoDimensionalModelWithDuration: model2a = new RegionModel(sampleRate, windowSize, false); model = model2a; break; - + case CSVFormat::TwoDimensionalModelWithDurationAndPitch: model2b = new NoteModel(sampleRate, windowSize, false); model = model2b; break; - + case CSVFormat::ThreeDimensionalModel: model3 = new EditableDenseThreeDimensionalModel (sampleRate, @@ -335,7 +335,7 @@ } if (modelType == CSVFormat::OneDimensionalModel) { - + SparseOneDimensionalModel::Point point(frameNo, label); model1->addPoint(point); @@ -369,7 +369,7 @@ float value = list[i].toFloat(&ok); values.push_back(value); - + if (firstEverValue || value < min) min = value; if (firstEverValue || value > max) max = value; @@ -397,7 +397,7 @@ } } } - + // SVDEBUG << "Setting bin values for count " << lineno << ", frame " // << frameNo << ", time " << RealTime::frame2RealTime(frameNo, sampleRate) << endl; @@ -475,8 +475,8 @@ } if (model3) { - model3->setMinimumLevel(min); - model3->setMaximumLevel(max); + model3->setMinimumLevel(min); + model3->setMaximumLevel(max); } return model;