[Kst] Re: branches/work/kst/portto4/kst/src/datasources/ascii
syntheticpp at gmx.net
Sat Feb 5 19:31:44 CET 2011
On 05.02.2011 17:55, Nicolas Brisset wrote:
>> - parts += QString(line).trimmed().split(QRegExp("[\\s]"), QString::SkipEmptyParts);
>> + parts += QString(line).trimmed().split(regexS, QString::SkipEmptyParts);
> Oops, that reminds me of something I had thought about and then forgotten to check: are all our regexps and split() calls so that empty strings are properly handled?
> For fields, empty makes no sense but we could give them an automatic name. As for units, empty is OK as it is just ignored later down the line (when constructing the label), whereas skipping empty units probably introduces an offset.
> I don't know if that is clear, but when we have delimiters or fixed-width columns empty fields/units can appear. I believe QString::KeepEmptyParts makes more sense then.
Are you sure it wouldn't break anything?
More information about the Kst