Konsole::NullProcessInfo
#include <ProcessInfo.h>
![Inheritance graph](classKonsole_1_1NullProcessInfo__inherit__graph.png)
Public Member Functions | |
NullProcessInfo (int pid, bool readEnvironment=false) | |
![]() | |
QVector< QString > | arguments (bool *ok) const |
QString | currentDir (bool *ok) const |
QMap< QString, QString > | environment (bool *ok) const |
Error | error () const |
int | foregroundPid (bool *ok) const |
QString | format (const QString &text) const |
bool | isValid () const |
QString | name (bool *ok) const |
int | parentPid (bool *ok) const |
int | pid (bool *ok) const |
void | setUserHomeDir () |
void | update () |
QString | userHomeDir () const |
int | userId (bool *ok) const |
QString | userName () const |
QString | validCurrentDir () const |
Protected Member Functions | |
bool | readProcessInfo (int pid, bool readEnvironment) override |
void | readUserName (void) override |
![]() | |
ProcessInfo (int pid, bool readEnvironment=false) | |
void | addArgument (const QString &argument) |
void | addEnvironmentBinding (const QString &name, const QString &value) |
void | clearArguments () |
void | setCurrentDir (const QString &dir) |
void | setError (Error error) |
void | setFileError (QFile::FileError error) |
void | setForegroundPid (int pid) |
void | setName (const QString &name) |
void | setParentPid (int pid) |
void | setPid (int pid) |
void | setUserId (int uid) |
void | setUserName (const QString &name) |
Additional Inherited Members | |
![]() | |
enum | Error { NoError , UnknownError , PermissionsError } |
enum | Field { PROCESS_ID = 1 , PARENT_PID = 2 , FOREGROUND_PID = 4 , ARGUMENTS = 8 , ENVIRONMENT = 16 , NAME = 32 , CURRENT_DIR = 64 , UID = 128 } |
typedef QFlags< Field > | Fields |
![]() | |
static QString | localHost () |
static std::unique_ptr< ProcessInfo > | newInstance (int pid, bool readEnvironment=false) |
Detailed Description
Implementation of ProcessInfo which does nothing.
Used on platforms where a suitable ProcessInfo subclass is not available.
isValid() will always return false for instances of NullProcessInfo
Definition at line 327 of file ProcessInfo.h.
Constructor & Destructor Documentation
◆ NullProcessInfo()
|
explicit |
Constructs a new NullProcessInfo instance.
See ProcessInfo::newInstance()
Definition at line 339 of file ProcessInfo.cpp.
Member Function Documentation
◆ readProcessInfo()
|
overrideprotectedvirtual |
This is called on construction to read the process state Subclasses should reimplement this function to provide platform-specific process state reading functionality.
When called, readProcessInfo() should attempt to read all of the necessary state information. If the attempt is successful, it should set the process id using setPid(), and update the other relevant information using setParentPid(), setName(), setArguments() etc.
Calls to isValid() will return true only if the process id has been set using setPid()
- Parameters
-
pid The process id of the process to read readEnvironment Specifies whether the environment bindings for the process should be read
Implements Konsole::ProcessInfo.
Definition at line 344 of file ProcessInfo.cpp.
◆ readUserName()
|
overrideprotectedvirtual |
Implements Konsole::ProcessInfo.
Definition at line 349 of file ProcessInfo.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Aug 30 2024 11:51:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.