! * \brief Constructs a new Syncthing process. */
| 134 | * \brief Constructs a new Syncthing process. |
| 135 | */ |
| 136 | SyncthingProcess::SyncthingProcess(QObject *parent) |
| 137 | : SyncthingProcessBase(parent) |
| 138 | , m_manuallyStopped(false) |
| 139 | , m_fallingAsleep(false) |
| 140 | { |
| 141 | #ifdef Q_OS_WINDOWS |
| 142 | if (auto *const app = QCoreApplication::instance()) { |
| 143 | app->installNativeEventFilter(this); |
| 144 | } |
| 145 | #endif |
| 146 | m_killTimer.setInterval(3000); |
| 147 | m_killTimer.setSingleShot(true); |
| 148 | setProcessChannelMode(QProcess::MergedChannels); |
| 149 | connect(this, &SyncthingProcess::started, this, &SyncthingProcess::handleStarted); |
| 150 | connect(this, static_cast<void (SyncthingProcess::*)(int exitCode, QProcess::ExitStatus exitStatus)>(&SyncthingProcess::finished), this, |
| 151 | &SyncthingProcess::handleFinished, Qt::QueuedConnection); |
| 152 | connect(&m_killTimer, &QTimer::timeout, this, &SyncthingProcess::confirmKill); |
| 153 | } |
| 154 | |
| 155 | /*! |
| 156 | * \brief Destroys the process. |
nothing calls this directly
no outgoing calls
no test coverage detected