KCrash
kcrash.h
42 * Call this in your main() after setting up KAboutData to ensure that the crash handler is launched.
111 4, ///< never try to to start DrKonqi via kdeinit. Use fork() and exec() instead. @deprecated This is now the default, and does not need to be set.
112 AutoRestart = 8, ///< autorestart this application. Only sensible for KUniqueApplications. @since 4.1.
151 * Allows providing information to be included in the bug report. Prefer setErrorExtraInformation as it is more flexible.
158 * Sets the error tags to be included in the crash report. These are rendered as tags in the crash reporting system.
159 * Note that server-side limits apply to the length of these so you should only put short, sortable data in here.
165 * Sets the error details to be included in the crash report. These are rendered as extra blobs of data and can any form.
166 * Note that these are subject to event ingestion limits and should be kept at reasonable sizes to prevent event rejection.
173 * By default KCrash will try to determine the GPU name, this may however not be accurate data. In particular on
174 * multi-gpu systems it may not be possible to determine whether the integrated or dedicated GPU is in use.
175 * You should call this function once you know which GPU will be in use for application. This is a free form string.
178 * At least 'name' should be set. Additional supported fields follow Sentry unless documented otherwise.
KCRASH_EXPORT void setCrashHandler(HandlerType handler=defaultCrashHandler)
Install a function to be called when a crash occurs.
Definition kcrash.cpp:353
KCRASH_EXPORT void setErrorMessage(const QString &message)
Allows providing information to be included in the bug report.
Definition kcrash.cpp:781
KCRASH_EXPORT HandlerType crashHandler()
Returns the installed crash handler.
Definition kcrash.cpp:406
KCRASH_EXPORT void setErrorTags(const QHash< QString, QString > &details)
Sets the error tags to be included in the crash report.
Definition kcrash.cpp:786
KCRASH_EXPORT void defaultCrashHandler(int signal)
The default crash handler.
Definition kcrash.cpp:429
KCRASH_EXPORT void setDrKonqiEnabled(bool enabled)
Enables or disables launching DrKonqi from the crash handler.
Definition kcrash.cpp:325
KCRASH_EXPORT void setFlags(KCrash::CrashFlags flags)
Set options to determine how the default crash handler should behave.
Definition kcrash.cpp:287
KCRASH_EXPORT void setErrorExtraData(const QHash< QString, QString > &details)
Sets the error details to be included in the crash report.
Definition kcrash.cpp:797
KCRASH_EXPORT HandlerType emergencySaveFunction()
Returns the currently set emergency save function.
Definition kcrash.cpp:257
KCRASH_EXPORT void setGPUData(const QVariantHash &data)
Sets better GPU data.
Definition kcrash.cpp:808
KCRASH_EXPORT bool isDrKonqiEnabled()
Returns true if DrKonqi is set to be launched from the crash handler or false otherwise.
Definition kcrash.cpp:348
@ AlwaysDirectly
never try to to start DrKonqi via kdeinit. Use fork() and exec() instead.
Definition kcrash.h:110
@ AutoRestart
autorestart this application. Only sensible for KUniqueApplications.
Definition kcrash.h:112
KCRASH_EXPORT void setEmergencySaveFunction(HandlerType saveFunction=nullptr)
Installs a function which should try to save the application's data.
Definition kcrash.cpp:244
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:03:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:03:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.