[Nepomuk] Re: Load/Save queries

Sebastian Trueg trueg at kde.org
Mon Mar 21 12:54:55 CET 2011


Hi Smit,

the patch looks good, very nice.
I have some comments though:

1. Please always prefer KDE over Qt classes. In this case it means
please use KFileDialog instead of QFileDialog to make use of the
advanced KDE features and integration.

2. Instead of adding two new buttons to the window you should make use
of KDE's XMLGui stuff. This means that you create two KActions in the
main window. In this case, since both open and save are standard actions
used throughout many many KDE applications all you need to do is call
KStandardActions::open and ::save. Connect the actions to the slots
instead of the buttons. KDE should take care of putting the actions into
the menu automatically.

3. very small thing: Code formatting - for loops and ifs and so on
please leave the opening parenthesis on the same line.

4. even smaller - please remove the trailing empty lines from the method
bodies.

Cheers,
Sebastian

On 03/20/2011 06:38 AM, Who Knows wrote:
>  Hi i have added the feature to save/load a query to/from a text file, i
> have tested out and it works for me.
> 
>  - Smit Shah
> 
> 
> 
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk


More information about the Nepomuk mailing list