Utils: Rename QtcProcess -> Process

Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-05-03 16:00:22 +02:00
parent e5051bbfde
commit 470c95c94b
244 changed files with 769 additions and 769 deletions

View File

@@ -1257,11 +1257,11 @@ void CMakeBuildSystem::runCTest()
QTC_ASSERT(parameters.isValid(), return);
ensureBuildDirectory(parameters);
m_ctestProcess.reset(new QtcProcess);
m_ctestProcess.reset(new Process);
m_ctestProcess->setEnvironment(buildConfiguration()->environment());
m_ctestProcess->setWorkingDirectory(parameters.buildDirectory);
m_ctestProcess->setCommand({m_ctestPath, { "-N", "--show-only=json-v1"}});
connect(m_ctestProcess.get(), &QtcProcess::done, this, [this] {
connect(m_ctestProcess.get(), &Process::done, this, [this] {
if (m_ctestProcess->result() == ProcessResult::FinishedWithSuccess) {
const QJsonDocument json
= QJsonDocument::fromJson(m_ctestProcess->readAllRawStandardOutput());
@@ -1735,12 +1735,12 @@ void CMakeBuildSystem::runGenerator(Id id)
optionsAspect && !optionsAspect->value().isEmpty()) {
cmdLine.addArgs(optionsAspect->value(), CommandLine::Raw);
}
const auto proc = new QtcProcess(this);
connect(proc, &QtcProcess::done, proc, &QtcProcess::deleteLater);
connect(proc, &QtcProcess::readyReadStandardOutput, this, [proc] {
const auto proc = new Process(this);
connect(proc, &Process::done, proc, &Process::deleteLater);
connect(proc, &Process::readyReadStandardOutput, this, [proc] {
Core::MessageManager::writeFlashing(QString::fromLocal8Bit(proc->readAllRawStandardOutput()));
});
connect(proc, &QtcProcess::readyReadStandardError, this, [proc] {
connect(proc, &Process::readyReadStandardError, this, [proc] {
Core::MessageManager::writeDisrupting(QString::fromLocal8Bit(proc->readAllRawStandardError()));
});
proc->setWorkingDirectory(outDir);

View File

@@ -18,7 +18,7 @@ namespace ProjectExplorer {
class ExtraCompiler;
class FolderNode;
}
namespace Utils { class QtcProcess; }
namespace Utils { class Process; }
namespace CMakeProjectManager {
@@ -233,7 +233,7 @@ private:
// CTest integration
Utils::FilePath m_ctestPath;
std::unique_ptr<Utils::QtcProcess> m_ctestProcess;
std::unique_ptr<Utils::Process> m_ctestProcess;
QList<ProjectExplorer::TestCaseInfo> m_testNames;
CMakeConfig m_configurationFromCMake;

View File

@@ -106,7 +106,7 @@ void CMakeProcess::run(const BuildDirParameters &parameters, const QStringList &
// Always use the sourceDir: If we are triggered because the build directory is getting deleted
// then we are racing against CMakeCache.txt also getting deleted.
m_process.reset(new QtcProcess);
m_process.reset(new Process);
m_process->setWorkingDirectory(buildDirectory);
m_process->setEnvironment(parameters.environment);
@@ -120,7 +120,7 @@ void CMakeProcess::run(const BuildDirParameters &parameters, const QStringList &
BuildSystem::appendBuildSystemOutput(stripTrailingNewline(s));
});
connect(m_process.get(), &QtcProcess::done, this, [this] {
connect(m_process.get(), &Process::done, this, [this] {
handleProcessDone(m_process->resultData());
});

View File

@@ -13,7 +13,7 @@
namespace Utils {
class ProcessResultData;
class QtcProcess;
class Process;
}
namespace CMakeProjectManager::Internal {
@@ -37,7 +37,7 @@ signals:
private:
void handleProcessDone(const Utils::ProcessResultData &resultData);
std::unique_ptr<Utils::QtcProcess> m_process;
std::unique_ptr<Utils::Process> m_process;
Utils::OutputFormatter m_parser;
QElapsedTimer m_elapsed;
};

View File

@@ -164,7 +164,7 @@ static CMakeConfig configurationFromPresetProbe(
"project(preset-probe)\n"
"\n"));
QtcProcess cmake;
Process cmake;
cmake.setTimeoutS(30);
cmake.setDisableUnixTerminal();
@@ -341,7 +341,7 @@ static QMakeAndCMakePrefixPath qtInfoFromCMakeCache(const CMakeConfig &config,
file(WRITE "${CMAKE_SOURCE_DIR}/cmake-prefix-path.txt" "${CMAKE_PREFIX_PATH}")
)"));
QtcProcess cmake;
Process cmake;
cmake.setTimeoutS(5);
cmake.setDisableUnixTerminal();

View File

@@ -162,7 +162,7 @@ bool CMakeTool::isValid() const
return m_introspection->m_didRun && !m_introspection->m_fileApis.isEmpty();
}
void CMakeTool::runCMake(QtcProcess &cmake, const QStringList &args, int timeoutS) const
void CMakeTool::runCMake(Process &cmake, const QStringList &args, int timeoutS) const
{
const FilePath executable = cmakeExecutable();
cmake.setTimeoutS(timeoutS);
@@ -248,7 +248,7 @@ TextEditor::Keywords CMakeTool::keywords()
return {};
if (m_introspection->m_functions.isEmpty() && m_introspection->m_didRun) {
QtcProcess proc;
Process proc;
runCMake(proc, {"--help-command-list"}, 5);
if (proc.result() == ProcessResult::FinishedWithSuccess)
m_introspection->m_functions = proc.cleanedStdOut().split('\n');
@@ -492,7 +492,7 @@ QStringList CMakeTool::parseVariableOutput(const QString &output)
void CMakeTool::fetchFromCapabilities() const
{
QtcProcess cmake;
Process cmake;
runCMake(cmake, {"-E", "capabilities"});
if (cmake.result() == ProcessResult::FinishedWithSuccess) {

View File

@@ -12,7 +12,7 @@
#include <optional>
namespace Utils { class QtcProcess; }
namespace Utils { class Process; }
namespace CMakeProjectManager {
@@ -95,7 +95,7 @@ public:
private:
void readInformation() const;
void runCMake(Utils::QtcProcess &proc, const QStringList &args, int timeoutS = 1) const;
void runCMake(Utils::Process &proc, const QStringList &args, int timeoutS = 1) const;
void parseFunctionDetailsOutput(const QString &output);
QStringList parseVariableOutput(const QString &output);