[CrashReporting] Break up the CrashReporter class doc per review

This commit is contained in:
Lukas Brübach 2026-10-18 13:16:10 +02:00
parent 06752242fa
commit 8d6aa9e420

View file

@ -32,22 +32,28 @@ Q_DECLARE_LOGGING_CATEGORY(CrashReportLog);
/** /**
* @brief Sentry-backed crash-report facade, owned by main(). * @brief Sentry-backed crash-report facade, owned by main().
* *
* Single responsibility: init/shutdown the sentry-native SDK behind consent * An empty DSN (or Never consent) skips the SDK entirely, so the mock dialog
* gating, plus the shared log redaction helpers. An empty DSN (or Never * fallback behaves exactly as before. All SDK calls are guarded so OFF builds
* consent) skips the SDK entirely, so the mock dialog fallback behaves exactly * compile to no-ops.
* as before. With a DSN, init() arms require-user-consent and before_send *
* scrubbing (stale persisted consent from a previous AlwaysSend run is cleared * @par Consent gating
* before init when the mode is not AlwaysSend, and cached crash envelopes are * init() arms require-user-consent and before_send scrubbing. Stale persisted
* held for the dialog instead of being dropped); giveConsent()/revokeConsent() * consent from a previous AlwaysSend run is cleared before init when the mode is
* gate uploads. attachToPendingCrashEnvelopes() folds the redacted log and the * not AlwaysSend, and cached crash envelopes are held for the dialog instead of
* optional user note into the pending native crash event(s) before consent * being dropped. giveConsent()/revokeConsent() gate uploads.
* releases them, so dump, stack, log and note arrive as ONE Sentry event; *
* sendReport() is the fallback for unclean exits that produced no native crash * @par Envelope and log helpers
* event, capturing a redacted message event with the log preview attached. All * attachToPendingCrashEnvelopes() folds the redacted log and the optional user
* SDK calls are guarded so OFF builds compile to no-ops. * note into the pending native crash event(s) before consent releases them, so
* Session tracking (beginSession/endSession) is SDK-independent: a QLockFile per * dump, stack, log and note arrive as ONE Sentry event. sendReport() is the
* process in the database dir detects unclean exits cross-platform, replacing the * fallback for unclean exits that produced no native crash event, capturing a
* legacy Windows-only .dmp scan. The held lock makes the reporter non-copyable and * redacted message event with the log preview attached. The log redaction
* helpers are static and SDK-independent.
*
* @par Session tracking
* beginSession()/endSession() are SDK-independent: a QLockFile per process in
* the database dir detects unclean exits cross-platform, replacing the legacy
* Windows-only .dmp scan. The held lock makes the reporter non-copyable and
* non-movable. * non-movable.
*/ */
class CrashReporter class CrashReporter