13#include <QApplication>
68 bool notify(QObject *receiver, QEvent *event)
override;
128 template <
typename Body>
129 static void guardedSlot(
const QObject *context, Body &&body)
noexcept
132 std::forward<Body>(body)();
133 }
catch (
const std::exception &e) {
149 static ExceptionInfo makeExceptionInfo(
const std::exception &e);
Custom QApplication that wraps event dispatch with exception handling.
static bool migrationEnabled
static bool isSentryDenyMessage(const QString &message)
bool notify(QObject *receiver, QEvent *event) override
static void guardedSlot(const QObject *context, Body &&body) noexcept
Wraps a slot body in try/catch and reports any exception synchronously, inside the slot's own stack f...
static bool renderingEnabled
Application(int &argc, char **argv)
Constructs the application with command-line arguments.
static Application * instance()
Returns the application instance cast to Application*.
~Application() override=default
Destructor.
static void handleException(const ExceptionInfo &info, const QObject *context)
Centralised exception-reporting handler used by both Application::notify (defence-in-depth on Linux/W...
static bool interactiveMode
Value-captured exception details safe to forward across an event-loop boundary.
QString what
The translated message for QMessageBox display.
QString englishMessage
English message for Sentry; equals what for non-Pandaception types.
QString file
Throw-site file when the exception is a Pandaception, else empty.
int line
Throw-site line when the exception is a Pandaception, else 0.