Mercurial > hg > svcore
comparison data/fileio/CSVFormat.cpp @ 406:d095214ffbaf
* Fix deadlock in Serialiser
author | Chris Cannam |
---|---|
date | Tue, 29 Apr 2008 10:59:19 +0000 |
parents | 183ee2a55fc7 |
children | 001db550bd48 |
comparison
equal
deleted
inserted
replaced
405:65311fb86166 | 406:d095214ffbaf |
---|---|
80 m_separator = " "; | 80 m_separator = " "; |
81 m_behaviour = QString::SkipEmptyParts; | 81 m_behaviour = QString::SkipEmptyParts; |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 std::cerr << "separator = \"" << m_separator.toStdString() << "\"" << std::endl; | 85 // std::cerr << "separator = \"" << m_separator.toStdString() << "\"" << std::endl; |
86 | 86 |
87 QStringList list = line.split(m_separator, m_behaviour); | 87 QStringList list = line.split(m_separator, m_behaviour); |
88 QStringList tidyList; | 88 QStringList tidyList; |
89 | 89 |
90 for (int i = 0; i < list.size(); ++i) { | 90 for (int i = 0; i < list.size(); ++i) { |
96 s = s.mid(1, s.length() - 2); | 96 s = s.mid(1, s.length() - 2); |
97 } else if (s.length() >= 2 && s.startsWith("'") && s.endsWith("'")) { | 97 } else if (s.length() >= 2 && s.startsWith("'") && s.endsWith("'")) { |
98 s = s.mid(1, s.length() - 2); | 98 s = s.mid(1, s.length() - 2); |
99 } else { | 99 } else { |
100 float f = s.toFloat(&numeric); | 100 float f = s.toFloat(&numeric); |
101 std::cerr << "converted \"" << s.toStdString() << "\" to float, got " << f << " and success = " << numeric << std::endl; | 101 // std::cerr << "converted \"" << s.toStdString() << "\" to float, got " << f << " and success = " << numeric << std::endl; |
102 } | 102 } |
103 | 103 |
104 tidyList.push_back(s); | 104 tidyList.push_back(s); |
105 | 105 |
106 if (lineno == 0 || (list.size() < itemCount)) { | 106 if (lineno == 0 || (list.size() < itemCount)) { |