From eb2f88598333601edf30571b772376a1a24f7be7 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 1 Sep 2025 08:27:53 -0400 Subject: [PATCH] chore: conform CoreProcess to naming standards --- src/lib/gui/core/CoreProcess.cpp | 26 +++++++++++++------------- src/lib/gui/core/CoreProcess.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lib/gui/core/CoreProcess.cpp b/src/lib/gui/core/CoreProcess.cpp index 1f6827470..90582357e 100644 --- a/src/lib/gui/core/CoreProcess.cpp +++ b/src/lib/gui/core/CoreProcess.cpp @@ -147,15 +147,15 @@ CoreProcess::CoreProcess(const IServerConfig &serverConfig) void CoreProcess::onProcessReadyReadStandardOutput() { - if (m_pProcess) { - handleLogLines(m_pProcess->readAllStandardOutput()); + if (m_process) { + handleLogLines(m_process->readAllStandardOutput()); } } void CoreProcess::onProcessReadyReadStandardError() { - if (m_pProcess) { - handleLogLines(m_pProcess->readAllStandardError()); + if (m_process) { + handleLogLines(m_process->readAllStandardError()); } } @@ -231,9 +231,9 @@ void CoreProcess::startForegroundProcess(const QString &app, const QStringList & const auto quoted = makeQuotedArgs(app, args); qInfo("running command: %s", qPrintable(quoted)); - m_pProcess->start(app, args); + m_process->start(app, args); - if (m_pProcess->waitForStarted()) { + if (m_process->waitForStarted()) { setProcessState(Started); } else { setProcessState(Stopped); @@ -265,15 +265,15 @@ void CoreProcess::stopForegroundProcess() const qFatal("core process must be in stopping state"); } - if (!m_pProcess) { + if (!m_process) { qFatal("process not set, cannot stop"); } qInfo("stopping core desktop process"); - if (m_pProcess->state() == QProcess::ProcessState::Running) { + if (m_process->state() == QProcess::ProcessState::Running) { qDebug("process is running, closing"); - m_pProcess->close(); + m_process->close(); } else { qDebug("process is not running, skipping terminate"); } @@ -346,14 +346,14 @@ void CoreProcess::start(std::optional processModeOption) setConnectionState(ConnectionState::Connecting); if (processMode == ProcessMode::Desktop) { - m_pProcess = new QProcess(this); - connect(m_pProcess, &QProcess::finished, this, &CoreProcess::onProcessFinished, Qt::UniqueConnection); + m_process = new QProcess(this); + connect(m_process, &QProcess::finished, this, &CoreProcess::onProcessFinished, Qt::UniqueConnection); connect( - m_pProcess, &QProcess::readyReadStandardOutput, this, &CoreProcess::onProcessReadyReadStandardOutput, + m_process, &QProcess::readyReadStandardOutput, this, &CoreProcess::onProcessReadyReadStandardOutput, Qt::UniqueConnection ); connect( - m_pProcess, &QProcess::readyReadStandardError, this, &CoreProcess::onProcessReadyReadStandardError, + m_process, &QProcess::readyReadStandardError, this, &CoreProcess::onProcessReadyReadStandardError, Qt::UniqueConnection ); } diff --git a/src/lib/gui/core/CoreProcess.h b/src/lib/gui/core/CoreProcess.h index b9122919c..63aeccf47 100644 --- a/src/lib/gui/core/CoreProcess.h +++ b/src/lib/gui/core/CoreProcess.h @@ -148,7 +148,7 @@ private: int m_connections = 0; deskflow::gui::ipc::DaemonIpcClient *m_daemonIpcClient = nullptr; FileTail *m_daemonFileTail = nullptr; - QProcess *m_pProcess = nullptr; + QProcess *m_process = nullptr; QString m_appPath; };