mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[CrashReporting] Forward mode changes to SDK and fix Linux CI opt-in
Connects PersonalSettings::crashReportingModeChanged to giveConsent()/revokeConsent() so switching from AlwaysSend to NeverSend (or Ask) mid-session reaches the SDK instead of leaving consent given until restart. Forwards WITH_CRASH_REPORTING into the docker container the way CCACHE_DIR is, so the Linux package leg actually builds with crash reporting ON instead of silently building OFF.
This commit is contained in:
parent
6411abfb57
commit
4d790ff388
2 changed files with 18 additions and 0 deletions
|
|
@ -283,6 +283,18 @@ int main(int argc, char *argv[])
|
|||
// Silent opt-in: cached crash envelopes flush automatically once consent is given.
|
||||
crashReporter.giveConsent();
|
||||
}
|
||||
// Mid-session mode changes must reach the SDK: without this, switching from AlwaysSend to
|
||||
// NeverSend (or Ask) leaves consent given until restart, so a later crash in this session
|
||||
// would still upload after the user opted out. crashReporter outlives main(), so capturing
|
||||
// it here is safe.
|
||||
QObject::connect(&SettingsCache::instance().personal(), &PersonalSettings::crashReportingModeChanged,
|
||||
[&crashReporter](PersonalSettings::CrashReportingMode mode) {
|
||||
if (mode == PersonalSettings::CrashReportingMode::AlwaysSend) {
|
||||
crashReporter.giveConsent();
|
||||
} else {
|
||||
crashReporter.revokeConsent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Persistent session log: keeps this run's logs on disk so the next-startup crash dialog can
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue