summaryrefslogtreecommitdiff
path: root/core/launcher/qprocess.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/qprocess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qprocess.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/qprocess.cpp b/core/launcher/qprocess.cpp
index 3fe1238..aef7967 100644
--- a/core/launcher/qprocess.cpp
+++ b/core/launcher/qprocess.cpp
@@ -40,49 +40,49 @@
This is a temporary class. This will be replaced by Qt 3's QProcess class.
\ingroup qtopiaemb
*/
/*!
\enum QProcess::Communication
This enum type defines the communication channels connected to the
process.
\value Stdin Data can be written to the process's standard input.
\value Stdout Data can be read from the process's standard output.
\value Stderr Data can be read from the process's standard error.
\value DupStderr Duplicates standard error to standard output for new
processes; i.e. everything that the process writes to standard error, is
reported by QProcess on standard output instead. This is especially useful if
your application requires that the output on standard output and standard
error is read in the same order as the process output it. Please note that
this is a binary flag, so if you want to activate this together with standard
input, output and error redirection (the default), you have to specify
- \c{Stdin|Stdout|Stderr|DupStderr} for the setCommunication() call.
+ \c {Stdin|Stdout|Stderr|DupStderr} for the setCommunication() call.
\sa setCommunication() communication()
*/
/*!
Constructs a QProcess object. The \a parent and \a name parameters are passed
to the QObject constructor.
\sa setArguments() addArgument() start()
*/
QProcess::QProcess( QObject *parent, const char *name )
: QObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
wroteToStdinConnected( FALSE ),
readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
comms( Stdin|Stdout|Stderr )
{
init();
}
/*!
Constructs a QProcess with \a arg0 as the command to be executed. The
\a parent and \a name parameters are passed to the QObject constructor.
The process is not started. You must call start() or launch()
@@ -191,49 +191,49 @@ QDir QProcess::workingDirectory() const
\sa workingDirectory() start()
*/
void QProcess::setWorkingDirectory( const QDir& dir )
{
workingDir = dir;
}
#endif //QT_NO_DIR
/*!
Returns the communication required with the process.
\sa setCommunication()
*/
int QProcess::communication() const
{
return comms;
}
/*!
Sets \a commFlags as the communication required with the process.
\a commFlags is a bitwise OR between the flags defined in \c Communication.
- The default is \c{Stdin|Stdout|Stderr}.
+ The default is \c {Stdin|Stdout|Stderr}.
\sa communication()
*/
void QProcess::setCommunication( int commFlags )
{
comms = commFlags;
}
/*!
Returns TRUE if the process has exited normally; otherwise returns
FALSE. This implies that this function returns FALSE if the process
is still running.
\sa isRunning() exitStatus() processExited()
*/
bool QProcess::normalExit() const
{
// isRunning() has the side effect that it determines the exit status!
if ( isRunning() )
return FALSE;
else
return exitNormal;
}
@@ -350,49 +350,49 @@ QString QProcess::readLineStdout()
return s;
}
/*!
Reads a line of text from standard error, excluding any trailing newline or
carriage return characters and returns it. Returns QString::null if
canReadLineStderr() returns FALSE.
\sa canReadLineStderr() readyReadStderr() readStderr() readLineStdout()
*/
QString QProcess::readLineStderr()
{
QByteArray a;
QString s;
if ( scanNewline( FALSE, &a ) ) {
if ( a.isEmpty() )
s = "";
else
s = QString( a );
}
return s;
}
/*!
- This private function scans for any occurrence of \n or \r\n in the
+ This private function scans for any occurrence of \\n or \\r\\n in the
buffer \e buf. It stores the text in the byte array \a store if it is
non-null.
*/
bool QProcess::scanNewline( bool stdOut, QByteArray *store )
{
QByteArray *buf;
if ( stdOut )
buf = bufStdout();
else
buf = bufStderr();
uint n = buf->size();
uint i;
for ( i=0; i<n; i++ ) {
if ( buf->at(i) == '\n' ) {
break;
}
}
if ( i >= n )
return FALSE;
if ( store ) {
uint lineLength = i;
if ( lineLength>0 && buf->at(lineLength-1) == '\r' )
lineLength--; // (if there are two \r, let one stay)