MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / SyncthingProcess

Method SyncthingProcess

syncthingconnector/syncthingprocess.cpp:136–153  ·  view source on GitHub ↗

! * \brief Constructs a new Syncthing process. */

Source from the content-addressed store, hash-verified

134 * \brief Constructs a new Syncthing process.
135 */
136SyncthingProcess::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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected