Akonadi
processcontrol.cpp
50void ProcessControl::start(const QString &application, const QStringList &arguments, CrashPolicy policy)
89 qCWarning(AKONADICONTROL_LOG) << "ProcessControl: Application" << mApplication << "stopped unexpectedly (" << mProcess.errorString() << ")";
98 qCWarning(AKONADICONTROL_LOG, "Application '%s' crashed! %d restarts left.", qPrintable(mApplication), s_maxCrashCount - mCrashCount);
105 qCCritical(AKONADICONTROL_LOG, "Application '%s' crashed too often. Giving up!", qPrintable(mApplication));
112 qCCritical(AKONADICONTROL_LOG, "Application '%s' crashed. No restart!", qPrintable(mApplication));
123 qCCritical(AKONADICONTROL_LOG) << mApplication << "crashed too often and will not be restarted!";
165 if (!agentValgrind.isEmpty() && (mApplication.contains(agentValgrind) || listContains(mArguments, agentValgrind))) {
170 const QString valgrindSkin = akGetEnv("AKONADI_VALGRIND_SKIN", QString::fromLocal8Bit("memcheck"));
185 qCDebug(AKONADICONTROL_LOG) << "ProcessControl: Additional Valgrind options:" << valgrindOptions;
192 if (!agentHeaptrack.isEmpty() && (mApplication.contains(agentHeaptrack) || listContains(mArguments, agentHeaptrack))) {
205 if (!agentPerf.isEmpty() && (mApplication.contains(agentPerf) || listContains(mArguments, agentPerf))) {
210 mArguments = QStringList{QStringLiteral("record"), QStringLiteral("--call-graph"), QStringLiteral("dwarf"), QStringLiteral("--")} + mArguments;
222 qCWarning(AKONADICONTROL_LOG, "ProcessControl: Unable to start application '%s' (%s)", qPrintable(mApplication), qPrintable(mProcess.errorString()));
void start()
Starts the process with the previously set application and arguments.
Definition processcontrol.cpp:158
void unableToStart()
Emitted if the process could not be started since it terminated too often.
bool isRunning() const
Returns true if the process is currently running.
Definition processcontrol.cpp:253
void setShutdownTimeout(std::chrono::milliseconds timeout)
Sets the time (in msecs) we wait for the process to shut down before we send terminate/kill signals.
Definition processcontrol.cpp:258
ProcessControl(QObject *parent=nullptr)
Creates a new process control.
Definition processcontrol.cpp:27
CrashPolicy
These enums describe the behaviour when the observed application crashed.
Definition processcontrol.h:32
void restarted()
This signal is emitted when the server is restarted after a crash.
Helper integration between Akonadi and Qt.
QString errorString() const const
void prepend(parameter_type value)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
ExitStatus
ForwardedChannels
ProcessError
NotRunning
void errorOccurred(QProcess::ProcessError error)
void finished(int exitCode, QProcess::ExitStatus exitStatus)
void kill()
QProcessEnvironment processEnvironment() const const
qint64 processId() const const
void setProcessChannelMode(ProcessChannelMode mode)
void setProcessEnvironment(const QProcessEnvironment &environment)
void start(OpenMode mode)
QProcess::ProcessState state() const const
void terminate()
bool waitForFinished(int msecs)
bool waitForStarted(int msecs)
void insert(const QProcessEnvironment &e)
bool isEmpty() const const
QProcessEnvironment systemEnvironment()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString fromLocal8Bit(QByteArrayView str)
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString join(QChar separator) const const
SkipEmptyParts
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.