Mercurial > hg > svcore
changeset 1509:3299b42d8bdd import-audio-data
Don't try to continue after what should have been a terminal problem
author | Chris Cannam |
---|---|
date | Wed, 05 Sep 2018 11:56:39 +0100 |
parents | b837ccdd4946 |
children | 5f1b2a117a4f |
files | data/fileio/CSVFileReader.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp Tue Sep 04 14:11:10 2018 +0100 +++ b/data/fileio/CSVFileReader.cpp Wed Sep 05 11:56:39 2018 +0100 @@ -229,7 +229,9 @@ } } - while (!in.atEnd()) { + bool abandoned = false; + + while (!in.atEnd() && !abandoned) { // QTextStream's readLine doesn't cope with old-style Mac // CR-only line endings. Why did they bother making the class @@ -249,6 +251,7 @@ if (m_reporter) { if (m_reporter->wasCancelled()) { + abandoned = true; break; } int progress; @@ -327,6 +330,7 @@ model1 = 0; model2 = 0; model2a = 0; model2b = 0; model3 = 0; modelW = 0; } + abandoned = true; break; }