Fix build: move CrashReporter code to vcl/source/window/builder.cxx
This problem appeared after commit 1a1bf2b78d689a570cc71b7bcb3e0100947a2fb1 (tdf#130857 VclBuilder: Extract helper to start parsing UI file, 2024-09-26): [LNK] Library/libvclplug_qt5lo.so /home/mk/core/include/vcl/widgetbuilder.hxx:55: error: undefined reference to 'CrashReporter::addKeyValue(rtl::OUString const&, rtl::OUString const&, CrashReporter::tAddKeyHandling)' collect2: error: ld returned 1 exit status make[1]: *** [/home/mk/core/vcl/Library_vclplug_qt5.mk:20: /home/mk/build/instdir/program/libvclplug_qt5lo.so] Error 1 Change-Id: I212aa3cbc381770de8fec07ea6454ab209edefc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173977 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
parent
e4ab68142c
commit
70a183875a
@ -14,6 +14,8 @@
|
||||
#include <vcl/dllapi.h>
|
||||
#include <vcl/EnumContext.hxx>
|
||||
|
||||
#include <com/sun/star/uno/Exception.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
@ -105,6 +107,8 @@ protected:
|
||||
|
||||
virtual void resetParserState();
|
||||
|
||||
static void reportException(const css::uno::Exception& rExcept);
|
||||
|
||||
private:
|
||||
struct ParserState
|
||||
{
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
#include <com/sun/star/uno/Exception.hpp>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <desktop/crashreport.hxx>
|
||||
#include <sal/log.hxx>
|
||||
#include <vcl/builderbase.hxx>
|
||||
#include <xmlreader/span.hxx>
|
||||
@ -52,9 +51,7 @@ protected:
|
||||
catch (const css::uno::Exception& rExcept)
|
||||
{
|
||||
TOOLS_WARN_EXCEPTION("vcl.builder", "Unable to read .ui file " << getUIFileUrl());
|
||||
CrashReporter::addKeyValue(u"VclBuilderException"_ustr,
|
||||
"Unable to read .ui file: " + rExcept.Message,
|
||||
CrashReporter::Write);
|
||||
reportException(rExcept);
|
||||
assert(false && "missing ui file or missing gb_CppunitTest_use_uiconfigs dependency");
|
||||
throw;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@
|
||||
#include <PriorityHBox.hxx>
|
||||
#include <window.h>
|
||||
#include <xmlreader/xmlreader.hxx>
|
||||
#include <desktop/crashreport.hxx>
|
||||
#include <calendar.hxx>
|
||||
#include <menutogglebutton.hxx>
|
||||
#include <salinst.hxx>
|
||||
@ -442,6 +443,13 @@ namespace weld
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void BuilderBase::reportException(const css::uno::Exception& rExcept)
|
||||
{
|
||||
CrashReporter::addKeyValue(u"VclBuilderException"_ustr,
|
||||
"Unable to read .ui file: " + rExcept.Message, CrashReporter::Write);
|
||||
}
|
||||
|
||||
BuilderBase::BuilderBase(std::u16string_view sUIDir, const OUString& rUIFile, bool bLegacy)
|
||||
: m_pParserState(new ParserState)
|
||||
, m_sUIFileUrl(sUIDir + rUIFile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user