chore: conform CoreProcess to naming standards

This commit is contained in:
sithlord48 2025-09-01 08:27:53 -04:00 committed by Nick Bolton
parent 4a16931c5d
commit eb2f885983
2 changed files with 14 additions and 14 deletions

View file

@ -147,15 +147,15 @@ CoreProcess::CoreProcess(const IServerConfig &serverConfig)
void CoreProcess::onProcessReadyReadStandardOutput() void CoreProcess::onProcessReadyReadStandardOutput()
{ {
if (m_pProcess) { if (m_process) {
handleLogLines(m_pProcess->readAllStandardOutput()); handleLogLines(m_process->readAllStandardOutput());
} }
} }
void CoreProcess::onProcessReadyReadStandardError() void CoreProcess::onProcessReadyReadStandardError()
{ {
if (m_pProcess) { if (m_process) {
handleLogLines(m_pProcess->readAllStandardError()); handleLogLines(m_process->readAllStandardError());
} }
} }
@ -231,9 +231,9 @@ void CoreProcess::startForegroundProcess(const QString &app, const QStringList &
const auto quoted = makeQuotedArgs(app, args); const auto quoted = makeQuotedArgs(app, args);
qInfo("running command: %s", qPrintable(quoted)); 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); setProcessState(Started);
} else { } else {
setProcessState(Stopped); setProcessState(Stopped);
@ -265,15 +265,15 @@ void CoreProcess::stopForegroundProcess() const
qFatal("core process must be in stopping state"); qFatal("core process must be in stopping state");
} }
if (!m_pProcess) { if (!m_process) {
qFatal("process not set, cannot stop"); qFatal("process not set, cannot stop");
} }
qInfo("stopping core desktop process"); qInfo("stopping core desktop process");
if (m_pProcess->state() == QProcess::ProcessState::Running) { if (m_process->state() == QProcess::ProcessState::Running) {
qDebug("process is running, closing"); qDebug("process is running, closing");
m_pProcess->close(); m_process->close();
} else { } else {
qDebug("process is not running, skipping terminate"); qDebug("process is not running, skipping terminate");
} }
@ -346,14 +346,14 @@ void CoreProcess::start(std::optional<ProcessMode> processModeOption)
setConnectionState(ConnectionState::Connecting); setConnectionState(ConnectionState::Connecting);
if (processMode == ProcessMode::Desktop) { if (processMode == ProcessMode::Desktop) {
m_pProcess = new QProcess(this); m_process = new QProcess(this);
connect(m_pProcess, &QProcess::finished, this, &CoreProcess::onProcessFinished, Qt::UniqueConnection); connect(m_process, &QProcess::finished, this, &CoreProcess::onProcessFinished, Qt::UniqueConnection);
connect( connect(
m_pProcess, &QProcess::readyReadStandardOutput, this, &CoreProcess::onProcessReadyReadStandardOutput, m_process, &QProcess::readyReadStandardOutput, this, &CoreProcess::onProcessReadyReadStandardOutput,
Qt::UniqueConnection Qt::UniqueConnection
); );
connect( connect(
m_pProcess, &QProcess::readyReadStandardError, this, &CoreProcess::onProcessReadyReadStandardError, m_process, &QProcess::readyReadStandardError, this, &CoreProcess::onProcessReadyReadStandardError,
Qt::UniqueConnection Qt::UniqueConnection
); );
} }

View file

@ -148,7 +148,7 @@ private:
int m_connections = 0; int m_connections = 0;
deskflow::gui::ipc::DaemonIpcClient *m_daemonIpcClient = nullptr; deskflow::gui::ipc::DaemonIpcClient *m_daemonIpcClient = nullptr;
FileTail *m_daemonFileTail = nullptr; FileTail *m_daemonFileTail = nullptr;
QProcess *m_pProcess = nullptr; QProcess *m_process = nullptr;
QString m_appPath; QString m_appPath;
}; };