[Nepomuk] Re: Review Request: Auto Indent Queries
Vishesh Handa
handa.vish at gmail.com
Tue Apr 12 18:55:08 CEST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101103/#review2593
-----------------------------------------------------------
The Sparql syntax is very similar to Trig. So at some point you might want to support statements like
?r ?p <obj1>, <obj2> ;
?p2 <obj3> .
If you don't feel like implementing it right now, you can put a TODO over there.
resourcequerywidget.cpp
<http://git.reviewboard.kde.org/r/101103/#comment2268>
I haven't tried the code out, but according to this regex, it will not replace statements like this
?r ?p ?o. or ?r ?p <obj>.
resourcequerywidget.cpp
<http://git.reviewboard.kde.org/r/101103/#comment2267>
Indentation
resourcequerywidget.cpp
<http://git.reviewboard.kde.org/r/101103/#comment2269>
You're hard coding the indentation to 4 spaces. Please store it in a const variable. That way it can be changed very easily.
resourcequerywidget.cpp
<http://git.reviewboard.kde.org/r/101103/#comment2266>
This is unlikely, but if a '@' is the last character in the query, this would make the code segfault/assert.
We NEVER want the application to crash. Even if the user provides totally idiotic inputs.
resourcequerywidget.cpp
<http://git.reviewboard.kde.org/r/101103/#comment2265>
Please fix this. You might want to read http://techbase.kde.org/Policies/Kdelibs_Coding_Style
- Vishesh
On April 12, 2011, 1:51 p.m., Smit Shah wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101103/
> -----------------------------------------------------------
>
> (Updated April 12, 2011, 1:51 p.m.)
>
>
> Review request for Nepomuk.
>
>
> Summary
> -------
>
> This patch adds one feature,
>
> Adds a button to auto indent the query.
>
>
> Diffs
> -----
>
> mainwindow.h ebf4dd5
> mainwindow.cpp d9cd450
> nepomukshellui.rc e4d59c2
> resourcequerywidget.h 22224fc
> resourcequerywidget.cpp 757674f
>
> Diff: http://git.reviewboard.kde.org/r/101103/diff
>
>
> Testing
> -------
>
> i have tested both the features on number of queries/files and it works perfectly over here.
>
>
> Thanks,
>
> Smit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110412/65a09b77/attachment.htm
More information about the Nepomuk
mailing list