diff options
author | Juergen Funk <juergen.funk_ml@cib.de> | 2019-09-25 13:49:26 +0200 |
---|---|---|
committer | Juergen Funk (CIB) <juergen.funk_ml@cib.de> | 2019-10-02 07:10:50 +0200 |
commit | 8fe03eef707561bb0b9e1655292619ec3cd347f5 (patch) | |
tree | 8cfd6d8f86f0b82e93c42bef9d96f9221d019ae6 /vcl | |
parent | d09dc224977c498356ab76738afe03136c98fabe (diff) |
Refactoring of the class CrashReporter
- remove double code
- using of all the methode of the CrashReporter-Class
- all methode only active when crash-dump enable
except the addKeyValue
With this change the handling for the patch
tdf#127711 A runtime-switch for the MiniCrashDump
would be simpler
Change-Id: I339b3b8e06f7fc2cd3c0d34ece112a6fd352913a
Reviewed-on: https://gerrit.libreoffice.org/79272
Tested-by: Jenkins
Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/win/WinDeviceInfo.cxx | 6 | ||||
-rw-r--r-- | vcl/opengl/x11/X11DeviceInfo.cxx | 4 | ||||
-rw-r--r-- | vcl/source/app/salplug.cxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/win/app/salinst.cxx | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx index 53801f4ed859..b4e9d6db55c3 100644 --- a/vcl/opengl/win/WinDeviceInfo.cxx +++ b/vcl/opengl/win/WinDeviceInfo.cxx @@ -531,9 +531,9 @@ void writeToLog(SvStream& rStrm, const char* pKey, const OUString & rVal) bool WinOpenGLDeviceInfo::isDeviceBlocked() { - CrashReporter::addKeyValue("OpenGLVendor", maAdapterVendorID); - CrashReporter::addKeyValue("OpenGLDevice", maAdapterDeviceID); - CrashReporter::addKeyValue("OpenGLDriver", maDriverVersion); + CrashReporter::addKeyValue("OpenGLVendor", maAdapterVendorID, CrashReporter::AddItem); + CrashReporter::addKeyValue("OpenGLDevice", maAdapterDeviceID, CrashReporter::AddItem); + CrashReporter::addKeyValue("OpenGLDriver", maDriverVersion, CrashReporter::Write); SAL_INFO("vcl.opengl", maDriverVersion); SAL_INFO("vcl.opengl", maDriverDate); diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx index 68d6c204a17f..7f671952f0fe 100644 --- a/vcl/opengl/x11/X11DeviceInfo.cxx +++ b/vcl/opengl/x11/X11DeviceInfo.cxx @@ -283,8 +283,8 @@ bool X11OpenGLDeviceInfo::isDeviceBlocked() if (mnGLMajorVersion == 1) return true; - CrashReporter::addKeyValue("AdapterVendorId", OStringToOUString(maVendor, RTL_TEXTENCODING_UTF8)); - CrashReporter::addKeyValue("AdapterDeviceId", OStringToOUString(maRenderer, RTL_TEXTENCODING_UTF8)); + CrashReporter::addKeyValue("AdapterVendorId", OStringToOUString(maVendor, RTL_TEXTENCODING_UTF8), CrashReporter::AddItem); + CrashReporter::addKeyValue("AdapterDeviceId", OStringToOUString(maRenderer, RTL_TEXTENCODING_UTF8), CrashReporter::Write); SAL_INFO("vcl.opengl", "Vendor: " << maVendor); SAL_INFO("vcl.opengl", "Renderer: " << maRenderer); diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index a9196acdaf7a..1868853e93b8 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -296,7 +296,7 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore ) std::fprintf( stderr, "Application Error\n" ); else { - CrashReporter::addKeyValue("AbortMessage", rErrorText); + CrashReporter::addKeyValue("AbortMessage", rErrorText, CrashReporter::Write); std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() ); } if( bDumpCore ) diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 323f71288236..715fb4568e71 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -1024,7 +1024,7 @@ bool OpenGLHelper::isVCLOpenGLEnabled() if (!getenv("SAL_DISABLE_GL_WATCHDOG")) OpenGLWatchdogThread::start(); } - CrashReporter::addKeyValue("UseOpenGL", OUString::boolean(bRet)); + CrashReporter::addKeyValue("UseOpenGL", OUString::boolean(bRet), CrashReporter::Write); return bRet; } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 4b119d5af444..79d698045d91 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -442,7 +442,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr catch (const css::uno::Exception &rExcept) { DBG_UNHANDLED_EXCEPTION("vcl.layout", "Unable to read .ui file"); - CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message); + CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message, CrashReporter::Write); throw; } diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 1169ae5b75c2..cc4fd65d7719 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -79,7 +79,7 @@ void SalAbort( const OUString& rErrorText, bool ) } else { - CrashReporter::addKeyValue("AbortMessage", rErrorText); + CrashReporter::addKeyValue("AbortMessage", rErrorText, CrashReporter::Write); // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, nullptr ); FatalAppExitW( 0, o3tl::toW(rErrorText.getStr()) ); |