Review Request 129122: Try to use ulog-helper if utempter does not exist

Adriaan de Groot groot at kde.org
Sat Oct 8 18:09:59 UTC 2016


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



Perhaps indent the CMake code? It is, after all, inside the body of an if()

How about moving the different command string literals to somewhere else (if this works stylistically)

        #if ! defined(ULOG)
        const char login_cmd[] = "add";
        const char logout_cmd[] = "del";
        #else
        const char login_cmd[] = "login";
        const char logout_cmd[] = "logout";
        #endif

then in the actual code you only have one path, and use `QStringList() << QStringLiteral(appropriate_cmd)` as needed.

- Adriaan de Groot


On Oct. 8, 2016, 12:41 p.m., Tobias Berner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129122/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2016, 12:41 p.m.)
> 
> 
> Review request for KDE Frameworks, Adriaan de Groot, Gleb Popov, and Martin Tobias Holmedahl Sandsmark.
> 
> 
> Repository: kpty
> 
> 
> Description
> -------
> 
> FreeBSD does not have `/usr/libexec/*/utempter`. It does however have `/usr/libexec/ulog-helper` [1].
> 
> It uses `login` instead of `add` and `logout` instead of `del`.
> 
> 
> [1] https://svnweb.freebsd.org/base/head/libexec/ulog-helper/ulog-helper.c?revision=234469&view=markup
> 
> 
> Diffs
> -----
> 
>   cmake/FindUTEMPTER.cmake 9773963 
>   src/kpty.cpp 7bf31c3 
> 
> Diff: https://git.reviewboard.kde.org/r/129122/diff/
> 
> 
> Testing
> -------
> 
> Builds fine. Still need to test if it is actually working.
> 
> 
> Thanks,
> 
> Tobias Berner
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161008/d09f3336/attachment.html>


More information about the Kde-frameworks-devel mailing list