Review Request 129677: Pre process the -e custom command argument

Wolfgang Bauer wbauer at tmo.at
Tue Dec 20 09:41:59 UTC 2016


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



I can confirm that this patch works, it restores the correct handling of the '-e' option.

There is one problem though:
Running "konsole -e" (i.e. not specifying any command after '-e') will open a new konsole window instead of printing an error message about the missing command.


src/Application.cpp (lines 124 - 127)
<https://git.reviewboard.kde.org/r/129677/#comment67955>

    I would suggest to only do this if there actually is an argument after '-e'.
    This way, QCommandLineParser will see the '-e' option if no command is given and will print an error message because the argument is missing.
    
    E.g. change the condition in the previous if to this:
        if (i < 0 || args.size() <= i+1) {
            return customCommand;
        }



src/Application.cpp (lines 124 - 127)
<https://git.reviewboard.kde.org/r/129677/#comment67956>

    


- Wolfgang Bauer


On Dez. 19, 2016, 10:34 nachm., Maximiliano Curia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129677/
> -----------------------------------------------------------
> 
> (Updated Dez. 19, 2016, 10:34 nachm.)
> 
> 
> Review request for Konsole, Kurt Hindenburg and Martin Tobias Holmedahl Sandsmark.
> 
> 
> Repository: konsole
> 
> 
> Description
> -------
> 
> Special case parsing of -e, to avoid parsing parameters intended for the
> command to be executed.
> 
> 
> Diffs
> -----
> 
>   src/Application.h 8987d789b8b0789592c41ae1b0f4538f5229b64f 
>   src/Application.cpp 6256e08ccc9d57f052790550ca8f20ef3bac1716 
>   src/main.cpp 26d3da990b6aee564c0c9a237a56a65b1d372508 
> 
> Diff: https://git.reviewboard.kde.org/r/129677/diff/
> 
> 
> Testing
> -------
> 
> It works for me.
> 
> 
> Thanks,
> 
> Maximiliano Curia
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20161220/45b9dddd/attachment.html>


More information about the konsole-devel mailing list