# HG changeset patch # User Chris Cannam # Date 1536145005 -3600 # Node ID 5f1b2a117a4f5e1d46eb71112a882954b03c8a79 # Parent 3299b42d8bdd17f5b189651571d50fcb6d980fea Debug etc diff -r 3299b42d8bdd -r 5f1b2a117a4f data/fileio/CSVFormat.cpp --- a/data/fileio/CSVFormat.cpp Wed Sep 05 11:56:39 2018 +0100 +++ b/data/fileio/CSVFormat.cpp Wed Sep 05 11:56:45 2018 +0100 @@ -91,6 +91,8 @@ for (int i = 0; i < int(sizeof(candidates)/sizeof(candidates[0])); ++i) { if (StringBits::split(line, candidates[i], m_allowQuoting).size() >= 2) { m_separator = candidates[i]; + SVDEBUG << "Estimated column separator: '" << m_separator + << "'" << endl; return; } } @@ -200,6 +202,12 @@ int timingColumnCount = 0; + SVDEBUG << "Estimated column qualities overall: "; + for (int i = 0; i < m_columnCount; ++i) { + SVDEBUG << int(m_columnQualities[i]) << " "; + } + SVDEBUG << endl; + // if our first column has zero or one entries in it and the rest // have more, then we'll default to ignoring the first column and // counting the next one as primary. (e.g. Sonic Annotator output diff -r 3299b42d8bdd -r 5f1b2a117a4f data/fileio/CSVFormat.h --- a/data/fileio/CSVFormat.h Wed Sep 05 11:56:39 2018 +0100 +++ b/data/fileio/CSVFormat.h Wed Sep 05 11:56:45 2018 +0100 @@ -117,10 +117,15 @@ void setColumnPurpose(int i, ColumnPurpose p); // read-only; only valid if format has been guessed: - QList getColumnQualities() const { return m_columnQualities; } + const QList &getColumnQualities() const { + return m_columnQualities; + } // read-only; only valid if format has been guessed: - QList getExample() const { return m_example; } + const QList &getExample() const { + return m_example; + } + int getMaxExampleCols() const { return m_maxExampleCols; } protected: