diff data/fileio/CSVFormat.cpp @ 897:69cc0454ed72

Make it possible to import CSV files directly into Note layers
author Chris Cannam
date Mon, 07 Apr 2014 10:47:15 +0100
parents e802e550a1f2
children 1974859baba5
line wrap: on
line diff
--- a/data/fileio/CSVFormat.cpp	Thu Mar 27 13:32:56 2014 +0000
+++ b/data/fileio/CSVFormat.cpp	Mon Apr 07 10:47:15 2014 +0100
@@ -66,7 +66,7 @@
         QString chunk = in.readLine();
         QStringList lines = chunk.split('\r', QString::SkipEmptyParts);
 
-        for (size_t li = 0; li < lines.size(); ++li) {
+        for (int li = 0; li < lines.size(); ++li) {
 
             QString line = lines[li];
             if (line.startsWith("#") || line == "") continue;
@@ -86,7 +86,7 @@
 CSVFormat::guessSeparator(QString line)
 {
     char candidates[] = { ',', '\t', ' ', '|', '/', ':' };
-    for (int i = 0; i < sizeof(candidates)/sizeof(candidates[0]); ++i) {
+    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];
             return;