Mercurial > hg > svcore
comparison data/fileio/CSVFormat.cpp @ 991:1974859baba5
Handle variable columns by importing all of them (not just the minimum number)
author | Chris Cannam |
---|---|
date | Fri, 03 Oct 2014 15:27:02 +0100 |
parents | 69cc0454ed72 |
children | 1888ca033a84 |
comparison
equal
deleted
inserted
replaced
990:dc1695b90a58 | 991:1974859baba5 |
---|---|
101 if (m_separator == "") guessSeparator(line); | 101 if (m_separator == "") guessSeparator(line); |
102 | 102 |
103 QStringList list = StringBits::split(line, m_separator[0], m_allowQuoting); | 103 QStringList list = StringBits::split(line, m_separator[0], m_allowQuoting); |
104 | 104 |
105 int cols = list.size(); | 105 int cols = list.size(); |
106 if (lineno == 0 || (cols < m_columnCount)) m_columnCount = cols; | 106 if (lineno == 0 || (cols > m_columnCount)) m_columnCount = cols; |
107 if (cols != m_columnCount) m_variableColumnCount = true; | 107 if (cols != m_columnCount) m_variableColumnCount = true; |
108 | 108 |
109 // All columns are regarded as having these qualities until we see | 109 // All columns are regarded as having these qualities until we see |
110 // something that indicates otherwise: | 110 // something that indicates otherwise: |
111 | 111 |