KProcessList::KProcessInfo Class
class KProcessList::KProcessInfoContains information about a process. More...
Header: | #include <KProcessInfo> |
CMake: | find_package(KF6 REQUIRED COMPONENTS CoreAddons) target_link_libraries(mytarget PRIVATE KF6::CoreAddons) |
Since: | 5.58 |
Public Functions
KProcessInfo() | |
KProcessInfo(qint64 pid, const QString &command, const QString &user) | |
KProcessInfo(qint64 pid, const QString &command, const QString &name, const QString &user) | |
(since 5.61) QString | command() const |
bool | isValid() const |
QString | name() const |
qint64 | pid() const |
QString | user() const |
Detailed Description
This class is usually not used alone but rather returned by processInfoList and processInfo. To check if the data contained in this class is valid use the isValid method.
Member Function Documentation
KProcessInfo::KProcessInfo()
KProcessInfo::KProcessInfo(qint64 pid, const QString &command, const QString &user)
KProcessInfo::KProcessInfo(qint64 pid, const QString &command, const QString &name, const QString &user)
[since 5.61]
QString KProcessInfo::command() const
The command line running this process e.g /bin/ls /some/path -R
This function was introduced in 5.61.
bool KProcessInfo::isValid() const
If the KProcessInfo contains valid information. If it returns true the pid, name and user function returns valid information, otherwise they return value is undefined.
QString KProcessInfo::name() const
The name of the process.
The class will try to get the full path to the executable file for the process but if it is not available the name of the process will be used instead. e.g /bin/ls
qint64 KProcessInfo::pid() const
The pid of the process
QString KProcessInfo::user() const
The username the process is running under.