mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
do not declare debug QProcess function if QT_NO_PROCESS is not defined
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
485999c314
commit
3ab43735e9
1 changed files with 27 additions and 29 deletions
|
@ -31,20 +31,41 @@
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
//#define QPROCESS_DEBUG
|
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
|
|
||||||
#ifndef QT_NO_PROCESS
|
#ifndef QT_NO_PROCESS
|
||||||
|
|
||||||
#if defined QPROCESS_DEBUG
|
#include "qplatformdefs.h"
|
||||||
#include "qstring.h"
|
#include "qprocess.h"
|
||||||
#include <ctype.h>
|
#include "qprocess_p.h"
|
||||||
|
#include "qcore_unix_p.h"
|
||||||
|
#include <qcoreapplication_p.h>
|
||||||
|
#include <qthread_p.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qfileinfo.h>
|
||||||
|
#include <qlist.h>
|
||||||
|
#include <qhash.h>
|
||||||
|
#include <qmutex.h>
|
||||||
|
#include <qsemaphore.h>
|
||||||
|
#include <qsocketnotifier.h>
|
||||||
|
#include <qthread.h>
|
||||||
|
#include <qelapsedtimer.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
//#define QPROCESS_DEBUG
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
#if defined QPROCESS_DEBUG
|
||||||
|
#include <ctype.h>
|
||||||
/*
|
/*
|
||||||
Returns a human readable representation of the first \a len
|
Returns a human readable representation of the first \a len
|
||||||
characters in \a data.
|
characters in \a data.
|
||||||
*/
|
*/
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
static QByteArray qt_prettyDebug(const char *data, int len, int maxSize)
|
static QByteArray qt_prettyDebug(const char *data, int len, int maxSize)
|
||||||
{
|
{
|
||||||
if (!data) return "(null)";
|
if (!data) return "(null)";
|
||||||
|
@ -69,34 +90,10 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxSize)
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
QT_END_NAMESPACE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "qplatformdefs.h"
|
|
||||||
|
|
||||||
#include "qprocess.h"
|
|
||||||
#include "qprocess_p.h"
|
|
||||||
#include "qcore_unix_p.h"
|
|
||||||
#include <qcoreapplication_p.h>
|
|
||||||
#include <qthread_p.h>
|
|
||||||
#include <qfile.h>
|
|
||||||
#include <qfileinfo.h>
|
|
||||||
#include <qlist.h>
|
|
||||||
#include <qhash.h>
|
|
||||||
#include <qmutex.h>
|
|
||||||
#include <qsemaphore.h>
|
|
||||||
#include <qsocketnotifier.h>
|
|
||||||
#include <qthread.h>
|
|
||||||
#include <qelapsedtimer.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
// POSIX requires PIPE_BUF to be 512 or larger
|
// POSIX requires PIPE_BUF to be 512 or larger
|
||||||
// so we will use 512
|
// so we will use 512
|
||||||
static const int errorBufferMax = 512;
|
static const int errorBufferMax = 512;
|
||||||
|
@ -285,6 +282,7 @@ static QAtomicInt idCounter = QAtomicInt(1);
|
||||||
|
|
||||||
void QProcessManager::add(pid_t pid, QProcess *process)
|
void QProcessManager::add(pid_t pid, QProcess *process)
|
||||||
{
|
{
|
||||||
|
// locked by startProcess()
|
||||||
#if defined (QPROCESS_DEBUG)
|
#if defined (QPROCESS_DEBUG)
|
||||||
qDebug() << "QProcessManager::add() adding pid" << pid << "process" << process;
|
qDebug() << "QProcessManager::add() adding pid" << pid << "process" << process;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue