desktop/source/app/app.cxx | 3 ++- desktop/source/app/crashreport.cxx | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)
New commits: commit 61c5685b5f7a8affba336631f605a94a0d0390ab Author: Thorsten Behrens <thorsten.behr...@cib.de> AuthorDate: Tue Apr 21 19:06:44 2020 +0200 Commit: Balazs Varga <balazs.va...@collabora.com> CommitDate: Wed Aug 27 16:28:06 2025 +0200 Some optimisations around crashreporter status queries * make dump enable status query static * only offer crash UI if dump is enabled cherry-pick from commit: f67e4da406f8753fb041705cf197690e7fd9a0aa Change-Id: I71aff4c6ca5a73e4d1db6163cdf8dec75b9e7538 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156490 Reviewed-by: Gabor Kelemen <kelem...@ubuntu.com> Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175001 Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de> Tested-by: allotropia jenkins <jenk...@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190014 Tested-by: Balazs Varga <balazs.va...@collabora.com> Reviewed-by: Balazs Varga <balazs.va...@collabora.com> diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index adc254da541e..224b5f525aab 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2059,7 +2059,8 @@ void Desktop::OpenClients() #endif #if HAVE_FEATURE_BREAKPAD - if (officecfg::Office::Common::Misc::CrashReport::get() && CrashReporter::crashReportInfoExists()) + if (CrashReporter::IsDumpEnable() && + officecfg::Office::Common::Misc::CrashReport::get() && CrashReporter::crashReportInfoExists()) handleCrashReport(); #endif diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index 18db12d07b38..49f7b17290a1 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -273,13 +273,21 @@ bool CrashReporter::IsDumpEnable() if (env != nullptr && env[0] != ' return true; } + + static bool bConfigRead = false; + static bool bEnable = true; // default, always on + + if (bConfigRead) + return bEnable; + // read configuration item 'CrashDumpEnable' -> bool on/off OUString sToken; if (rtl::Bootstrap::get("CrashDumpEnable", sToken)) { - return sToken.toBoolean(); + bEnable = sToken.toBoolean(); } - return true; // default, always on + bConfigRead = true; + return bEnable; }