D20007: Add GetProcessList for retrieving the list of currently active processes
David Hallas
noreply at phabricator.kde.org
Sat Mar 23 21:12:12 GMT 2019
hallas added inline comments.
INLINE COMMENTS
> CMakeLists.txt:246
> util/kformat.h
> util/kuser.h
> util/kshell.h
Should util/kprocesslist.h also be added here?
> kprocesslist.h:1
> +/**************************************************************************
> +**
Is this license ok?
> kprocesslist.h:36
> +#include <QList>
> +
> +/**
I modified the interface slightly so that it fits better with other KDE APIs, I don't know what you guys think about it?
> kprocesslist.h:42
> +struct KProcessInfo {
> + unsigned int pid; ///< The pid of the process
> + QString name; ///< The name of the process - this is not the full path to the executable
I changed the pid to be a unsigned int instead, since both Windows and Unix use a number as the pid
> kprocesslist.h:43
> + unsigned int pid; ///< The pid of the process
> + QString name; ///< The name of the process - this is not the full path to the executable
> + QString image; ///< What is this?
What is the exact semantics of this field?
> kprocesslist.h:44
> + QString name; ///< The name of the process - this is not the full path to the executable
> + QString image; ///< What is this?
> + QString state; ///< Running state - should we have this?
This appears to be a Windows only field, should we really keep this?
> kprocesslist.h:45
> + QString image; ///< What is this?
> + QString state; ///< Running state - should we have this?
> + QString user; ///< Owner of the process
Do we really need this? Should we document all the valid states?
> kprocesslist.h:56
> + */
> +KProcessList GetProcessList();
> +
Is this the interface we want?
> kprocesslist.h:56
> + */
> +KProcessList GetProcessList();
> +
I haven't written any tests for the code as I am not sure how I can do that in a portable and reproduceable way.
> kprocesslist_win.cpp:1
> +/**************************************************************************
> +**
I do not have access to a Windows PC so I haven't built the Windows version
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D20007
To: hallas, davidedmundson, broulik
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190323/8dcbfa05/attachment.html>
More information about the Kde-frameworks-devel
mailing list