forked from qt-creator/qt-creator
Drop ::ExitStatus:: and ::ProcessError::
That's superfluous. Fix comparison of QProcess::exitCode with QProcess::ExitStatus. Change-Id: I49d746fdbbc279e3e04c4ed57d386560e7cbe4b4 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -217,8 +217,8 @@ public:
|
||||
QString errorString;
|
||||
QByteArray stdOut;
|
||||
QByteArray stdErr;
|
||||
QProcess::ExitStatus exitStatus = QProcess::ExitStatus::NormalExit;
|
||||
QProcess::ProcessError error = QProcess::ProcessError::UnknownError;
|
||||
QProcess::ExitStatus exitStatus = QProcess::NormalExit;
|
||||
QProcess::ProcessError error = QProcess::UnknownError;
|
||||
int exitCode = 0;
|
||||
|
||||
private:
|
||||
|
@@ -1243,7 +1243,7 @@ QProcess::ExitStatus QtcProcess::exitStatus() const
|
||||
{
|
||||
if (d->m_process)
|
||||
return d->m_process->exitStatus();
|
||||
return QProcess::ExitStatus::NormalExit;
|
||||
return QProcess::NormalExit;
|
||||
}
|
||||
|
||||
void QtcProcess::kill()
|
||||
|
@@ -74,7 +74,7 @@ QString McuPackageExecutableVersionDetector::parseVersion(const QString &package
|
||||
if (!binaryProcess.waitForStarted())
|
||||
return QString();
|
||||
binaryProcess.waitForFinished(execTimeout);
|
||||
if (binaryProcess.exitCode() == QProcess::ExitStatus::NormalExit) {
|
||||
if (binaryProcess.exitStatus() == QProcess::NormalExit) {
|
||||
const QString processOutput = QString::fromUtf8(
|
||||
binaryProcess.readAllStandardOutput().append(
|
||||
binaryProcess.readAllStandardError()));
|
||||
|
@@ -118,29 +118,29 @@ void MesonProcess::handleProcessError(QProcess::ProcessError error)
|
||||
QString message;
|
||||
QString commandStr = m_currentCommand.toUserOutput();
|
||||
switch (error) {
|
||||
case QProcess::ProcessError::FailedToStart:
|
||||
case QProcess::FailedToStart:
|
||||
message = tr("The process failed to start.")
|
||||
+ tr("Either the "
|
||||
"invoked program \"%1\" is missing, or you may have insufficient "
|
||||
"permissions to invoke the program.")
|
||||
.arg(m_currentCommand.executable().toUserOutput());
|
||||
break;
|
||||
case QProcess::ProcessError::Crashed:
|
||||
case QProcess::Crashed:
|
||||
message = tr("The process was ended forcefully.");
|
||||
break;
|
||||
case QProcess::ProcessError::Timedout:
|
||||
case QProcess::Timedout:
|
||||
message = tr("Process timed out.");
|
||||
break;
|
||||
case QProcess::ProcessError::WriteError:
|
||||
case QProcess::WriteError:
|
||||
message = tr("An error occurred when attempting to write "
|
||||
"to the process. For example, the process may not be running, "
|
||||
"or it may have closed its input channel.");
|
||||
break;
|
||||
case QProcess::ProcessError::ReadError:
|
||||
case QProcess::ReadError:
|
||||
message = tr("An error occurred when attempting to read from "
|
||||
"the process. For example, the process may not be running.");
|
||||
break;
|
||||
case QProcess::ProcessError::UnknownError:
|
||||
case QProcess::UnknownError:
|
||||
message = tr("An unknown error in the process occurred.");
|
||||
break;
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ void NimSuggestServer::onFinished()
|
||||
{
|
||||
clearState();
|
||||
|
||||
if (m_process.exitCode() == QProcess::ExitStatus::CrashExit)
|
||||
if (m_process.exitStatus() == QProcess::CrashExit)
|
||||
emit crashed();
|
||||
else
|
||||
emit finished();
|
||||
|
Reference in New Issue
Block a user