KCoreAddons
kprocess.cpp
169#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__GNU__) \
226 QProcess::setProgram(QString::fromUtf16((const char16_t *)sysdir, size) + QLatin1String("\\cmd.exe"));
279 if (!QProcess::startDetached(QProcess::program(), QProcess::arguments(), workingDirectory(), &pid)) {
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:176
void setNextOpenMode(QIODevice::OpenMode mode)
Set the QIODevice open mode the process will be opened in.
Definition kprocess.cpp:54
@ ForwardedChannels
Both standard output and standard error are forwarded to the parent process' respective channel.
Definition kprocess.h:49
void unsetEnv(const QString &name)
Removes the variable name from the process' environment.
Definition kprocess.cpp:92
KProcess & operator<<(const QString &arg)
Append an element to the command line argument list for this process.
Definition kprocess.cpp:139
OutputChannelMode outputChannelMode() const
Query how the output channels of the child process are handled.
Definition kprocess.cpp:49
QStringList program() const
Obtain the currently set program and arguments.
Definition kprocess.cpp:235
void setOutputChannelMode(OutputChannelMode mode)
Set how to handle the output channels of the child process.
Definition kprocess.cpp:44
void setEnv(const QString &name, const QString &value, bool overwrite=true)
Adds the variable name to the process' environment.
Definition kprocess.cpp:68
int execute(int msecs=-1)
Start the process, wait for it to finish, and return the exit code.
Definition kprocess.cpp:249
void setProgram(const QString &exe, const QStringList &args=QStringList())
Set the program and the command line arguments.
Definition kprocess.cpp:114
KCOREADDONS_EXPORT QStringList splitArgs(const QString &cmd, Options flags=NoOptions, Errors *err=nullptr)
Splits cmd according to system shell word splitting and quoting rules.
Definition kshell_unix.cpp:46
@ AbortOnMeta
Put the parser into full shell mode and bail out if a too complex construct is encountered.
Definition kshell.h:67
QString symLinkTarget() const const
virtual qint64 size() const const
OpenMode
void append(QList< T > &&value)
iterator begin()
iterator end()
iterator erase(const_iterator begin, const_iterator end)
bool isEmpty() const const
void prepend(parameter_type value)
qsizetype removeAll(const AT &t)
value_type takeFirst()
QStringList environment() const const
void setEnvironment(const QStringList &environment)
NormalExit
ProcessChannelMode
QStringList arguments() const const
int exitCode() const const
QProcess::ExitStatus exitStatus() const const
void kill()
ProcessChannelMode processChannelMode() const const
QString program() const const
void setArguments(const QStringList &arguments)
void setNativeArguments(const QString &arguments)
void setProcessChannelMode(ProcessChannelMode mode)
void setProgram(const QString &program)
void start(OpenMode mode)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
QStringList systemEnvironment()
bool waitForFinished(int msecs)
QString workingDirectory() const const
QString findExecutable(const QString &executableName, const QStringList &paths)
QString & append(QChar ch)
QString fromUtf16(const char16_t *unicode, qsizetype size)
bool isEmpty() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:53:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:53:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.