KDECore
kprocess.cpp
Go to the documentation of this file.
287 # if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__GNU__)
typedef OpenMode
void setNextOpenMode(QIODevice::OpenMode mode)
Set the QIODevice open mode the process will be opened in.
Definition: kprocess.cpp:155
void setShellCommand(const QString &cmd)
Set a command to execute through a shell (a POSIX sh on *NIX and cmd.exe on Windows).
Definition: kprocess.cpp:265
void readyReadStandardError()
QString & append(QChar ch)
void kill()
QStringList systemEnvironment()
Only standard output is handled; standard error is forwarded.
Definition: kprocess.h:64
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
KProcess & operator<<(const QString &arg)
Append an element to the command line argument list for this process.
Definition: kprocess.cpp:232
iterator erase(iterator pos)
void setOutputChannelMode(OutputChannelMode mode)
Set how to handle the output channels of the child process.
Definition: kprocess.cpp:127
void readyReadStandardOutput()
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
QStringList splitArgs(const QString &cmd, Options flags=NoOptions, Errors *err=0)
Splits cmd according to system shell word splitting and quoting rules.
Definition: kshell_unix.cpp:70
Definition: kprocess_p.h:27
void append(const T &value)
virtual qint64 size() const
QStringList program() const
Obtain the currently set program and arguments.
Definition: kprocess.cpp:331
QString fromUtf16(const ushort *unicode, int size)
void setEnv(const QString &name, const QString &value, bool overwrite=true)
Adds the variable name to the process' environment.
Definition: kprocess.cpp:169
QString symLinkTarget() const
bool isEmpty() const
int removeAll(const T &value)
QStringList environment() const
typedef Iterator
void setEnvironment(const QStringList &environment)
void forwardStd(KProcess::ProcessChannel good, int fd)
Definition: kprocess.cpp:74
void unsetEnv(const QString &name)
Removes the variable name from the process' environment.
Definition: kprocess.cpp:190
iterator end()
Q_PID pid() const
void setProcessChannelMode(ProcessChannelMode mode)
int mode() const
Both standard output and standard error are forwarded to the parent process' respective channel...
Definition: kprocess.h:61
T takeFirst()
QString workingDirectory() const
static QString findExe(const QString &appname, const QString &pathstr=QString(), SearchOptions options=NoSearchOptions)
Finds the executable in the system path.
Definition: kstandarddirs.cpp:1328
int execute(int msecs=-1)
Start the process, wait for it to finish, and return the exit code.
Definition: kprocess.cpp:347
char * data()
QString fromLatin1(const char *str, int size)
void prepend(const T &value)
int size() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Only standard error is handled; standard output is forwarded.
Definition: kprocess.h:66
void setNativeArguments(const QString &arguments)
QProcess::ExitStatus exitStatus() const
iterator begin()
int exitCode() const
void start(const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)
Put the parser into full shell mode and bail out if a too complex construct is encoutered.
Definition: kshell.h:78
OutputChannelMode outputChannelMode() const
Query how the output channels of the child process are handled.
Definition: kprocess.cpp:148
void setProgram(const QString &exe, const QStringList &args=QStringList())
Set the program and the command line arguments.
Definition: kprocess.cpp:209
bool waitForFinished(int msecs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.