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

Method genericErrorString

syncthingconnector/syncthingprocess.cpp:241–257  ·  view source on GitHub ↗

! * \brief Returns a generic error string for \a error. */

Source from the content-addressed store, hash-verified

239 * \brief Returns a generic error string for \a error.
240 */
241QString SyncthingProcess::genericErrorString(QProcess::ProcessError error)
242{
243 switch (error) {
244 case QProcess::FailedToStart:
245 return tr("failed to start (e.g. executable does not exist or not permission error)");
246 case QProcess::Crashed:
247 return tr("process crashed");
248 case QProcess::Timedout:
249 return tr("timeout error");
250 case QProcess::ReadError:
251 return tr("read error");
252 case QProcess::WriteError:
253 return tr("write error");
254 default:
255 return tr("unknown process error");
256 }
257}
258
259/*!
260 * \brief Emits errorOccurred() as if the specified \a error had occurred and sets the specified \a errorString.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected