[Kst] Problem with CSV files
syamcr at gmail.com
Fri Nov 1 02:29:27 UTC 2013
On 01-Nov-2013 3:31 AM, "Alexander Semke" <Alexander.Semke at web.de> wrote:
> > How could we change it, so it also detects empty columns?
> In labplot2 we use QString::split with QString::SkipEmptyParts to split
> line we read into its parts. By doing so with this file, we end up with
> valid columns.
I've gone through the code for tracking this issue. So far, I think Kst
uses SkipEmptyParts while identifying columns so that only two columns are
listed. But while reading data from each line, it uses a different method
than QString::split. It scans for the separator character and converts each
token to a double value. Here, the initial comma causes a problem as the
code doesn't skip blank fields.
I think we should have the same logic for recognising columns and while
reading data. What if we use KeepEmptyParts while scanning for columns? I
believe things will then work fine even if lines have missing fields.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kst