diff options
author | Gopi Krishna Menon <gopi.menon@collabora.com> | 2021-06-07 14:21:33 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-06-16 14:45:35 +0200 |
commit | 4b925781760ba84e62cb847ddfe8f8c667a44c95 (patch) | |
tree | 0aac7bdda3cae5d84a0845eb42e0b6ce8d9ac43c /include | |
parent | 3f9fcf0e7f154e49bbffeaea925edb6055add494 (diff) |
Add Active App Name Field To Crash Report
Adds a Active-App field in Crash
Report to assist in investigating
the crashes
Change-Id: I30e5f307045b8e5def9986447551f39e70b94edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116786
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/desktop/crashreport.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx index 8d55b85487d0..c16b4a7eb80b 100644 --- a/include/desktop/crashreport.hxx +++ b/include/desktop/crashreport.hxx @@ -56,8 +56,12 @@ public: static bool IsDumpEnable(); + static void setActiveApp(const OUString& rActiveApp); + static OUString currentActiveApp(); + private: static osl::Mutex maMutex; + static osl::Mutex maActiveNameMutex; static bool mbInit; typedef struct _mpair { @@ -72,6 +76,7 @@ private: typedef std::vector<mpair> vmaKeyValues; static vmaKeyValues maKeyValues; // used to temporarily save entries before the old info has been uploaded + static OUString mActiveApp; static std::unique_ptr<google_breakpad::ExceptionHandler> mpExceptionHandler; @@ -88,6 +93,11 @@ private: // // the code without linking to the lib and without adding HAVE_FEATURE_BREAKPAD // // everywhere we want to log something to the crash report system. inline static void addKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/, SAL_UNUSED_PARAMETER tAddKeyHandling /*AddKeyHandling*/) {}; + inline static void setActiveApp(SAL_UNUSED_PARAMETER const OUString& /*rActiveApp*/) {}; + inline static OUString currentActiveApp() + { + return OUString(); + }; #endif // HAVE_FEATURE_BREAKPAD }; |