[Kde-pim] Akonadi Commandline Interface Project
Bhaskar Kandiyal
bkandiyal at gmail.com
Sat Mar 1 09:37:06 GMT 2014
On Saturday 01 March 2014 12:33 AM, Kevin Krammer wrote:
>
> I'll have a look at your repository over the weekend. But sounds very
> promising :)
>
That would be great thanks :)
>> For the Clear command, just some things that I've noticed from
>> a quick look though the code:
>>
>> This is a dangerous command (extremely so!). So as to avoid any user
>> prompting for confirmation (which is not so useful for command line
>> scripting), there is a check for such commands which needs a magic
>> variable to be set in the environment in order to be able to execute
>> such commands.
>
> I think we would rather go with a special commandline switch, e.g. like
> --force
>
> Maybe even requiring either that or --dry-run (or similar), like git clean
> does.
>
> In kabcclieent I only had the dry-run/simulate option, i.e. in order to safely
> test commands, but without it would always execute unhindered.
> But since this can do a lot more explicit force might work better.
>
Adding --force and --dry-run option sounds neat! Also, maybe we can have
--dry-run as a global option for all commands?
>>> PS: I was wondering if there are any bug fixes I can do :)
>
> One thing that came to my mind was a bit of refactoring of the current
> prototype.
>
> When designing the first commands I fell into the trap of premature
> optimization, i.e. trying to delay construction of the application object
> until its event loop was really required.
>
> That makes some of the command initialization stuff needlessly complicated,
> because it needs to delay translation, etc.
>
> So if you think you would like to have a go at this, one task would be to make
> the program look more like typical Qt programs look like:
> * main created the application object
> * then creates the worker object, in this case the command
> * then (on success of the previous step) runs app.exec()
>
I'll start working on it :)
Cheers,
Bhaskar Kandiyal
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list