Review Request: Fix crash on importing CSV files with Mac line endings
Jarosław Staniek
staniek at kde.org
Thu Aug 9 20:09:18 BST 2012
> On Aug. 7, 2012, 6:18 p.m., Adam Pigg wrote:
> > kexi/plugins/importexport/csv/kexicsvimportdialog.cpp, line 620
> > <http://git.reviewboard.kde.org/r/105843/diff/1/?file=75965#file75965line620>
> >
> > Should we be using QTextStream? I ask because we are trying to detect the type of line-ending, and could QtextStream interfere with that?
>
> Jarosław Staniek wrote:
> We're working at unicode stream's level, hence QTextStream is proper tool. Our delimiter is well defined unicode character (QChar), not a part of it (char).
>
> Adam Pigg wrote:
> im not talking about the delimiter, im talking about the line endings, does QTextStream not manipulate the \n, \r and \r\n characters? what happens when reading a windows file on unix or mac versions of kexi?
QTextStream::readLine() hides differences between \n, \r and \r\n characters. You question may come from this or similar facts. But QTextStream operator>> reads QChar, which can be \n or \r. Never \n\r combined, so we have fine-grained control over what happens and we're actually taking advantage of that.
- Jarosław
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105843/#review17062
-----------------------------------------------------------
On Aug. 9, 2012, 1:35 p.m., Jarosław Staniek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105843/
> -----------------------------------------------------------
>
> (Updated Aug. 9, 2012, 1:35 p.m.)
>
>
> Review request for Calligra, Adam Pigg, Dimitrios Tanis, and Oleg Kukharchuk.
>
>
> Description
> -------
>
> Fix crash on importing CSV files with Mac line endings
>
>
> This addresses bug 304329.
> http://bugs.kde.org/show_bug.cgi?id=304329
>
>
> Diffs
> -----
>
> kexi/plugins/importexport/csv/kexicsvimportdialog.cpp 751fb7de67d1cab4e95506cf6a37342075b660f9
>
> Diff: http://git.reviewboard.kde.org/r/105843/diff/
>
>
> Testing
> -------
>
> Imports test data properly
>
>
> Thanks,
>
> Jarosław Staniek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120809/a7ecea3f/attachment.htm>
More information about the calligra-devel
mailing list