Remove typedef Q_PID
It is not used in public API any more since
0f8848b7e2
.
Replace by an internal Windows-specific Q_PROCESS_INFORMATION typedef.
Change-Id: Ia6dcc83ca667c40ac5d678c00d143c09d650e42a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
013b6cf0f1
commit
b73d5a0511
@ -2504,17 +2504,6 @@ QString QProcess::nullDevice()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\typedef Q_PID
|
|
||||||
\relates QProcess
|
|
||||||
|
|
||||||
Typedef for the identifiers used to represent processes on the underlying
|
|
||||||
platform. On Unix, this corresponds to \l qint64; on Windows, it
|
|
||||||
corresponds to \c{_PROCESS_INFORMATION*}.
|
|
||||||
|
|
||||||
\sa QProcess::processId()
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif // QT_CONFIG(process)
|
#endif // QT_CONFIG(process)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -48,13 +48,13 @@
|
|||||||
|
|
||||||
QT_REQUIRE_CONFIG(processenvironment);
|
QT_REQUIRE_CONFIG(processenvironment);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
typedef struct _PROCESS_INFORMATION *Q_PID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||||
typedef struct _SECURITY_ATTRIBUTES Q_SECURITY_ATTRIBUTES;
|
struct _PROCESS_INFORMATION;
|
||||||
typedef struct _STARTUPINFOW Q_STARTUPINFO;
|
struct _SECURITY_ATTRIBUTES;
|
||||||
|
struct _STARTUPINFOW;
|
||||||
|
using Q_PROCESS_INFORMATION = _PROCESS_INFORMATION;
|
||||||
|
using Q_SECURITY_ATTRIBUTES = _SECURITY_ATTRIBUTES;
|
||||||
|
using Q_STARTUPINFO = _STARTUPINFOW;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -62,10 +62,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QProcessPrivate;
|
class QProcessPrivate;
|
||||||
class QProcessEnvironmentPrivate;
|
class QProcessEnvironmentPrivate;
|
||||||
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
typedef qint64 Q_PID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class Q_CORE_EXPORT QProcessEnvironment
|
class Q_CORE_EXPORT QProcessEnvironment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -200,7 +196,7 @@ public:
|
|||||||
void *environment;
|
void *environment;
|
||||||
const wchar_t *currentDirectory;
|
const wchar_t *currentDirectory;
|
||||||
Q_STARTUPINFO *startupInfo;
|
Q_STARTUPINFO *startupInfo;
|
||||||
Q_PID processInformation;
|
Q_PROCESS_INFORMATION *processInformation;
|
||||||
};
|
};
|
||||||
typedef std::function<void(CreateProcessArguments *)> CreateProcessArgumentModifier;
|
typedef std::function<void(CreateProcessArguments *)> CreateProcessArgumentModifier;
|
||||||
CreateProcessArgumentModifier createProcessArgumentsModifier() const;
|
CreateProcessArgumentModifier createProcessArgumentsModifier() const;
|
||||||
|
@ -302,8 +302,12 @@ public:
|
|||||||
QProcess::ProcessError processError = QProcess::UnknownError;
|
QProcess::ProcessError processError = QProcess::UnknownError;
|
||||||
QProcess::ProcessState processState = QProcess::NotRunning;
|
QProcess::ProcessState processState = QProcess::NotRunning;
|
||||||
QString workingDirectory;
|
QString workingDirectory;
|
||||||
Q_PID pid = 0;
|
#ifdef Q_OS_WIN
|
||||||
int sequenceNumber = 0;
|
Q_PROCESS_INFORMATION *pid = nullptr;
|
||||||
|
#else
|
||||||
|
qint64 pid = 0;
|
||||||
|
#endif
|
||||||
|
int sequenceNumber;
|
||||||
|
|
||||||
bool dying = false;
|
bool dying = false;
|
||||||
bool emittedReadyRead = false;
|
bool emittedReadyRead = false;
|
||||||
|
@ -503,7 +503,7 @@ void QProcessPrivate::startProcess()
|
|||||||
::_exit(-1);
|
::_exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
pid = Q_PID(childPid);
|
pid = qint64(childPid);
|
||||||
|
|
||||||
// parent
|
// parent
|
||||||
// close the ends we don't use and make all pipes non-blocking
|
// close the ends we don't use and make all pipes non-blocking
|
||||||
|
Loading…
Reference in New Issue
Block a user