15 #include <QCoreApplication>
16 #include <SettingHandle.h>
18 #include <unordered_map>
72 void setPath(
const QString &path);
124 bool isEnabled()
const {
return _crashReportingEnabled; }
145 void setUrl(
const QString &url);
158 void setToken(
const QString &token);
174 void setAnnotation(
const std::string &key,
const char *value);
188 void setAnnotation(
const std::string &key,
const QString &value);
203 void setAnnotation(
const std::string &key,
const std::string &value);
227 void setStarted(
bool started) { _crashMonitorStarted = started; }
230 std::atomic<bool> _crashMonitorStarted {
false};
231 std::atomic<bool> _crashReportingEnabled {
false};
232 std::unordered_map<std::string, std::string> _annotations{};
233 std::mutex _annotationsMutex{};
The global object in charge of setting up and controlling crash reporting.
Definition: CrashHandler.h:54
bool isStarted() const
Whether the crash monitor has been successfully started.
Definition: CrashHandler.h:112
bool isEnabled() const
Whether the crash monitor will report crashes if they occur.
Definition: CrashHandler.h:124
void setToken(const QString &token)
Set the token for the crash reporter.
Definition: CrashHandler.cpp:101
void setUrl(const QString &url)
Set the URL where to send crash reports to.
Definition: CrashHandler.cpp:89
void setAnnotation(const std::string &key, const char *value)
Set an annotation to be added to a crash.
Definition: CrashHandler.cpp:109
bool start()
Start the crash handler.
Definition: CrashHandler.cpp:42
void startMonitor(QCoreApplication *app)
Starts the unhandled exception monitor.
Definition: CrashHandler.cpp:74
void setPath(const QString &path)
Set the directory for the crash reports.
Definition: CrashHandler.cpp:28
void enabledChanged(bool enabled)
Emitted when the enabled/disabled state of the crash handler changes.
void setEnabled(bool enabled)
Set whether we want to submit crash reports to the report server.
Definition: CrashHandler.cpp:78