| 93 | // |
| 94 | |
| 95 | CoreProcess::CoreProcess(const IServerConfig &serverConfig) |
| 96 | : m_serverConfig(serverConfig), |
| 97 | m_daemonIpcClient{new ipc::DaemonIpcClient(this)} |
| 98 | { |
| 99 | m_appPath = QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), kCoreBinName); |
| 100 | if (!QFile::exists(m_appPath)) { |
| 101 | qFatal("core server binary does not exist"); |
| 102 | return; |
| 103 | } |
| 104 | |
| 105 | connect(m_daemonIpcClient, &ipc::DaemonIpcClient::connected, this, &CoreProcess::daemonIpcClientConnected); |
| 106 | connect( |
| 107 | m_daemonIpcClient, &ipc::DaemonIpcClient::connectionFailed, this, &CoreProcess::daemonIpcClientConnectionFailed |
| 108 | ); |
| 109 | |
| 110 | connect(&m_retryTimer, &QTimer::timeout, this, [this] { |
| 111 | if (m_processState == ProcessState::RetryPending) { |
| 112 | start(); |
| 113 | } else { |
| 114 | qDebug("retry cancelled, process state is not retry pending"); |
| 115 | } |
| 116 | }); |
| 117 | } |
| 118 | |
| 119 | void CoreProcess::onProcessReadyReadStandardOutput() |
| 120 | { |
nothing calls this directly
no outgoing calls
no test coverage detected