Review Request 120940: Added parsing of hashtag comments inside imported csv in kexi

Jarosław Staniek staniek at kde.org
Tue Nov 4 21:24:34 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120940/#review69849
-----------------------------------------------------------


Good start!
Please prepare a set of test CSV rows covering all possible cases related to comments.
Like:
1, 2 # foo
"A"# bar
Put them into kexi/plugins/importexport/csv/tests/. 
(Later we would use them in regular QTests)


kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
<https://git.reviewboard.kde.org/r/120940/#comment48881>

    add && x != S_COMMENT right?



kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
<https://git.reviewboard.kde.org/r/120940/#comment48886>

    Shouldn't 'x == m_commentSign' be added here and not in line 1120?
    Because we want this: 'fill remaining empty fields (database wants them explicitly)'



kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
<https://git.reviewboard.kde.org/r/120940/#comment48887>

    Notes for the future:
    Let's assume m_commentSign.isNull() means user doesn't want to support comments. That could be the default. That means m_commentSign == QChar('\0').
    
    Then all expression such as x == m_commentSign will be OK (always false) since x cannot be QChar('\0').
    
    For now (before there's a GUI option) we can keep m_commentSign == '#' by default.



kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
<https://git.reviewboard.kde.org/r/120940/#comment48880>

    S_COMMENT makes sense here and in 1161 too, right?
    think what state should be set here



kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
<https://git.reviewboard.kde.org/r/120940/#comment48879>

    Small optimization: this assignment changes nothing here.


- Jarosław Staniek


On Nov. 1, 2014, 11:47 p.m., Wojciech Kosowicz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120940/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2014, 11:47 p.m.)
> 
> 
> Review request for Calligra, Adam Pigg and Jarosław Staniek.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> When hash sign (#) appears in csv file at the beginning of the line or in the middle of unqouted field
> it is treated as the beginning of the comment and the following data is being ignored until the end of the row
> 
> 
> Diffs
> -----
> 
>   kexi/plugins/importexport/csv/kexicsvimportdialog.cpp a0010d7 
>   kexi/plugins/importexport/csv/kexicsvwidgets.h 1e87dbd 
>   kexi/plugins/importexport/csv/kexicsvimportdialog.h 3dc3fe4 
> 
> Diff: https://git.reviewboard.kde.org/r/120940/diff/
> 
> 
> Testing
> -------
> 
> when importing csv it should distinct comments
> 
> 
> Thanks,
> 
> Wojciech Kosowicz
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20141104/c99c1248/attachment.htm>


More information about the calligra-devel mailing list