• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDE3Support

K3ShellProcess Class Reference

A class derived from K3Process to start child processes through a shell. More...

#include <k3process.h>

Inheritance diagram for K3ShellProcess:
K3Process QObject

List of all members.

Public Member Functions

 K3ShellProcess (const char *shellname=0)
virtual bool start (RunMode runmode=NotifyOnExit, Communication comm=NoCommunication)
 ~K3ShellProcess ()

Static Public Member Functions

static QString quote (const QString &arg)

Detailed Description

A class derived from K3Process to start child processes through a shell.

Deprecated:

Use K3Process and K3Process::setUseShell(true) instead.

Author:
Christian Czezatke <e9025461@student.tuwien.ac.at>

Definition at line 860 of file k3process.h.


Constructor & Destructor Documentation

K3ShellProcess::K3ShellProcess ( const char *  shellname = 0  )  [explicit]

Constructor.

If no shellname is specified, the user's default shell is used.

Definition at line 1032 of file k3process.cpp.

K3ShellProcess::~K3ShellProcess (  ) 

Destructor.

Definition at line 1038 of file k3process.cpp.


Member Function Documentation

QString K3ShellProcess::quote ( const QString &  arg  )  [static]

This function can be used to quote an argument string such that the shell processes it properly.

This is e. g. necessary for user-provided file names which may contain spaces or quotes. It also prevents expansion of wild cards and environment variables.

Parameters:
arg the argument to quote
Returns:
the quoted argument

Reimplemented from K3Process.

Definition at line 1041 of file k3process.cpp.

bool K3ShellProcess::start ( RunMode  runmode = NotifyOnExit,
Communication  comm = NoCommunication 
) [virtual]

Starts the process.

For a detailed description of the various run modes and communication semantics, have a look at the general description of the K3Process class. Note that if you use setUsePty( Stdout | Stderr, <bool> ), you cannot use Stdout | Stderr here - instead, use Stdout only to receive the mixed output.

The following problems could cause this function to return false:

  • The process is already running.
  • The command line argument list is empty.
  • The the comm parameter is incompatible with the selected pty usage.
  • The starting of the process failed (could not fork).
  • The executable was not found.
Parameters:
runmode The Run-mode for the process.
comm Specifies which communication channels should be established to the child process (stdin/stdout/stderr). By default, no communication takes place and the respective communication signals will never get emitted.
Returns:
true on success, false on error (see above for error conditions)

Reimplemented from K3Process.

Definition at line 1046 of file k3process.cpp.


The documentation for this class was generated from the following files:
  • k3process.h
  • k3process.cpp

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal