spacr.qt.install_consent¶
Apply privacy choices collected by desktop installation.
Also the one-time notice that anonymised error reports are on by default
(maybe_show_anonymous_report_notice()) and the example of what such a
report holds (AnonymousReportExampleDialog).
Classes¶
Show exactly what an anonymised error report holds, with an example. |
|
The one-time notice that anonymised error reports are on by default. |
|
One first-launch page whose two optional choices start off. |
Functions¶
|
Persist the installer's privacy choices. |
Show the anonymised-report notice once per profile, without blocking. |
|
|
Apply installer choices once, asking in-app if no page was shown. |
Module Contents¶
- class spacr.qt.install_consent.AnonymousReportExampleDialog(parent=None)[source]¶
Bases:
PySide6.QtWidgets.QDialogShow exactly what an anonymised error report holds, with an example.
The example is built by
spacr.crashreport.example_public_summary()from a made-up error whose message names a file under the home folder, an e-mail address and a token, so the dialog shows each one removed.- Parameters:
parent – parent widget.
Build the explanation, the example and a Close button.
- Parameters:
parent – parent widget, or
None.
- class spacr.qt.install_consent.AnonymousReportNotice(parent=None)[source]¶
Bases:
PySide6.QtWidgets.QDialogThe one-time notice that anonymised error reports are on by default.
Not modal: it never stands between the user and the window. Closing it saves the switch as it is then.
- Parameters:
parent – parent widget.
Build the notice, its switch and its two buttons.
- Parameters:
parent – parent widget, or
None.
- class spacr.qt.install_consent.InstallerConsentDialog(parent=None)[source]¶
Bases:
PySide6.QtWidgets.QDialogOne first-launch page whose two optional choices start off.
- Parameters:
parent – parent widget.
Build the privacy choices dialog.
Sized in scaled pixels rather than raw ones: a size set from Python does not grow with the stylesheet’s font size, and at the 200% scale the prose inside wrapped to more height than the window had.
- Parameters:
parent – parent widget, or
None.
- spacr.qt.install_consent.apply_choices(choices: Mapping[str, Any]) None[source]¶
Persist the installer’s privacy choices.
- Parameters:
choices – the consent answers, read by the keys
share_diagnosticsandreport_issues; a missing or unrecognised value counts as no, and any other key is ignored.
- spacr.qt.install_consent.maybe_show_anonymous_report_notice(parent) PySide6.QtWidgets.QDialog | None[source]¶
Show the anonymised-report notice once per profile, without blocking.
Nothing is shown while the network is forbidden (
spacr.crashreport.network_allowed()), since no report could be sent; the notice then waits for a start that allows it. Waiting reports are also given another try, on a background thread.- Parameters:
parent – the window that parents the notice.
- Returns:
the notice, already showing, or
Nonewhen it was not due.