Review Request: in Kcmdlineargs, no-<whatever> is now a normal option

Oswald Buddenhagen ossi at kde.org
Sun Oct 17 09:26:47 BST 2010



> On 2010-10-16 19:13:47, Parker Coates wrote:
> > I think a more robust solution would be to let a "no" prefix negate an option only if the remainder of the word is actually a predefined option. For example, "kapp --node" would consider "node" a positive option provided that there wasn't already an option named "--de".
> > 
> > Or the opposite, to check first if the given word is a known option and then only if it isn't, check for a "no" prefix.

i find your first idea better.

anyway, i for one find it plain silly that the code matches "no" instead of "no-" in the first place. but we can't change that now, indeed, except for adding a boolean toggle to switch to new semantics.

btw, i think one can work around the current problem by declaring an option named "-label" (with the extra dash, i.e., the positive variant would be ---label) and relying on the inversion semantics. that's also why andreas' remark about compatibility is rather valid.


- Oswald


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5637/#review8187
-----------------------------------------------------------


On 2010-10-16 10:43:01, Jaime Torres wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5637/
> -----------------------------------------------------------
> 
> (Updated 2010-10-16 10:43:01)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> I need an option called no-label followed by some text.
> With this simple change, no- is not an special prefix, so anything that stars with no- is a normal option.
> Also changed the documentation in the header.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kdecore/kernel/kcmdlineargs.h 1186293 
>   /trunk/KDE/kdelibs/kdecore/kernel/kcmdlineargs.cpp 1186293 
> 
> Diff: http://svn.reviewboard.kde.org/r/5637/diff
> 
> 
> Testing
> -------
> 
> made make test in kdelibs build root, previous results here:
> 
>           1 - nepomuk-queryparsertest (Failed)
>           2 - nepomuk-querytest (Failed)
>           4 - nepomuk-resourcetest (Failed)
>          11 - kdecore-kstandarddirstest (Failed)
>          40 - kdecore-kglobaltest (Timeout)
>          43 - kdecore-kconfigafterkglobaltest1 (Failed)
>          44 - kdecore-kconfigafterkglobaltest2 (Failed)
>          45 - kdecore-ktcpsockettest (Failed)
>          94 - kptyprocesstest (Failed)
>          96 - kio-krununittest (Failed)
>         137 - kate-completion_test (Failed)
>         138 - kate-searchbar_test (Failed)
>         140 - kate-movingrange_test (Failed)
>         144 - kate-indenttest (Failed)
> 
> no more regressions added by this patch.
> 
> 
> Thanks,
> 
> Jaime
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101017/2e2686c9/attachment.htm>


More information about the kde-core-devel mailing list