forked from qt-creator/qt-creator
Utils: Remove qPidToPid() adapter function
Since Qt 5.3, there's a QProcess::processId() providing direct access. Change-Id: Ia9c143c7a92ec61d1aa36ff3f4670ba72a509634 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -138,7 +138,7 @@ void IosAnalyzeSupport::handleServerPorts(int gdbServerPort, int qmlPort)
|
||||
m_qmlPort = qmlPort;
|
||||
}
|
||||
|
||||
void IosAnalyzeSupport::handleGotInferiorPid(Q_PID pid, int qmlPort)
|
||||
void IosAnalyzeSupport::handleGotInferiorPid(qint64 pid, int qmlPort)
|
||||
{
|
||||
Q_UNUSED(pid);
|
||||
m_qmlPort = qmlPort;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
private:
|
||||
void qmlServerReady();
|
||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||
void handleGotInferiorPid(qint64 pid, int qmlPort);
|
||||
void handleRemoteProcessFinished(bool cleanEnd);
|
||||
|
||||
void handleRemoteOutput(const QString &output);
|
||||
|
||||
@@ -197,11 +197,11 @@ void IosDebugSupport::handleServerPorts(int gdbServerPort, int qmlPort)
|
||||
m_runControl->notifyEngineRemoteSetupFinished(result);
|
||||
}
|
||||
|
||||
void IosDebugSupport::handleGotInferiorPid(Q_PID pid, int qmlPort)
|
||||
void IosDebugSupport::handleGotInferiorPid(qint64 pid, int qmlPort)
|
||||
{
|
||||
RemoteSetupResult result;
|
||||
result.qmlServerPort = qmlPort;
|
||||
result.inferiorPid = int(Utils::qPidToPid(pid));
|
||||
result.inferiorPid = pid;
|
||||
result.success = pid > 0;
|
||||
if (!result.success)
|
||||
result.reason = tr("Got an invalid process id.");
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
private:
|
||||
void handleServerPorts(int gdbServerFd, int qmlPort);
|
||||
void handleGotInferiorPid(Q_PID, int qmlPort);
|
||||
void handleGotInferiorPid(qint64, int qmlPort);
|
||||
void handleRemoteProcessFinished(bool cleanEnd);
|
||||
|
||||
void handleRemoteOutput(const QString &output);
|
||||
|
||||
@@ -191,7 +191,7 @@ void IosRunner::handleGotServerPorts(IosToolHandler *handler, const QString &bun
|
||||
}
|
||||
|
||||
void IosRunner::handleGotInferiorPid(IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, Q_PID pid)
|
||||
const QString &deviceId, qint64 pid)
|
||||
{
|
||||
Q_UNUSED(bundlePath); Q_UNUSED(deviceId);
|
||||
m_pid = pid;
|
||||
|
||||
@@ -72,7 +72,7 @@ public slots:
|
||||
signals:
|
||||
void didStartApp(Ios::IosToolHandler::OpStatus status);
|
||||
void gotServerPorts(int gdbPort, int qmlPort);
|
||||
void gotInferiorPid(Q_PID pid, int);
|
||||
void gotInferiorPid(qint64 pid, int);
|
||||
void appOutput(const QString &output);
|
||||
void errorMsg(const QString &msg);
|
||||
void finished(bool cleanExit);
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
void handleGotServerPorts(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, int gdbPort, int qmlPort);
|
||||
void handleGotInferiorPid(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, Q_PID pid);
|
||||
const QString &deviceId, qint64 pid);
|
||||
void handleAppOutput(Ios::IosToolHandler *handler, const QString &output);
|
||||
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
|
||||
void handleToolExited(Ios::IosToolHandler *handler, int code);
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
|
||||
bool m_cleanExit;
|
||||
quint16 m_qmlPort;
|
||||
Q_PID m_pid;
|
||||
qint64 m_pid;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
IosToolHandler::OpStatus status);
|
||||
void gotServerPorts(const QString &bundlePath, const QString &deviceId, int gdbPort,
|
||||
int qmlPort);
|
||||
void gotInferiorPid(const QString &bundlePath, const QString &deviceId, Q_PID pid);
|
||||
void gotInferiorPid(const QString &bundlePath, const QString &deviceId, qint64 pid);
|
||||
void deviceInfo(const QString &deviceId, const IosToolHandler::Dict &info);
|
||||
void appOutput(const QString &output);
|
||||
void errorMsg(const QString &msg);
|
||||
@@ -318,7 +318,7 @@ void IosToolHandlerPrivate::gotServerPorts(const QString &bundlePath,
|
||||
}
|
||||
|
||||
void IosToolHandlerPrivate::gotInferiorPid(const QString &bundlePath, const QString &deviceId,
|
||||
Q_PID pid)
|
||||
qint64 pid)
|
||||
{
|
||||
emit q->gotInferiorPid(q, bundlePath, deviceId, pid);
|
||||
}
|
||||
@@ -504,7 +504,7 @@ void IosToolHandlerPrivate::processXml()
|
||||
case ParserState::Exit:
|
||||
break;
|
||||
case ParserState::InferiorPid:
|
||||
gotInferiorPid(bundlePath, deviceId, Q_PID(p.chars.toInt()));
|
||||
gotInferiorPid(bundlePath, deviceId, p.chars.toLongLong());
|
||||
break;
|
||||
case ParserState::ServerPorts:
|
||||
break;
|
||||
|
||||
@@ -80,7 +80,7 @@ signals:
|
||||
void gotServerPorts(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, int gdbPort, int qmlPort);
|
||||
void gotInferiorPid(Ios::IosToolHandler *handler, const QString &bundlePath,
|
||||
const QString &deviceId, Q_PID pid);
|
||||
const QString &deviceId, qint64 pid);
|
||||
void deviceInfo(Ios::IosToolHandler *handler, const QString &deviceId,
|
||||
const Ios::IosToolHandler::Dict &info);
|
||||
void appOutput(Ios::IosToolHandler *handler, const QString &output);
|
||||
|
||||
Reference in New Issue
Block a user