summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2011-02-10 15:17:58 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-02-10 15:18:56 (GMT)
commitb5e5f72faea7ae278572660f8fb6968d635e548f (patch)
tree7ced9c01d9aec3598b3eb963430b68d7a3e312de /src
parent7ed338b87ae50388101176ee29e72df55208a12c (diff)
downloadQt-b5e5f72faea7ae278572660f8fb6968d635e548f.zip
Qt-b5e5f72faea7ae278572660f8fb6968d635e548f.tar.gz
Qt-b5e5f72faea7ae278572660f8fb6968d635e548f.tar.bz2
fix crash when setting QPROCESS_DEBUG
don't pass QStrings to printf, but use qPrintable instead.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qprocess_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index f9f5362..ba61bda 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -645,7 +645,7 @@ void QProcessPrivate::startProcess()
if (childPid < 0) {
// Cleanup, report error and return
#if defined (QPROCESS_DEBUG)
- qDebug("qt_fork failed: %s", qt_error_string(lastForkErrno));
+ qDebug("qt_fork failed: %s", qPrintable(qt_error_string(lastForkErrno)));
#endif
processManager()->unlock();
q->setProcessState(QProcess::NotRunning);
@@ -849,7 +849,7 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen)
qDebug("QProcessPrivate::writeToStdin(%p \"%s\", %lld) == %lld",
data, qt_prettyDebug(data, maxlen, 16).constData(), maxlen, written);
if (written == -1)
- qDebug("QProcessPrivate::writeToStdin(), failed to write (%s)", qt_error_string(errno));
+ qDebug("QProcessPrivate::writeToStdin(), failed to write (%s)", qPrintable(qt_error_string(errno)));
#endif
// If the O_NONBLOCK flag is set and If some data can be written without blocking
// the process, write() will transfer what it can and return the number of bytes written.