Kaydet (Commit) 9ff8bdcd authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Compile the DebugEventInjector code always, not only when OSL_DEBUG_LEVEL > 0

Otherwise if you happen to compile vcl/source/app/svmain.cxx with
OSL_DEBUG_LEVEL > 0 but not this file, you get an undefined symbol
DebugEventInjector::getCreate().

In general I think our intent is that ideally it should be possible to
compile an arbitrary selection of source files with OSL_DEBUG_LEVEL=0,
and others with OSL_DEBUG_LEVEL=1. (For debugging functionality that
does require consistency across the codebase, we have DBG_UTIL.)

Note that DebugEventInjector::getCreate() will be called from
InitVCL() only when svmain.cxx is compiled with OSL_DEBUG_LEVEL > 0,
though. So for a "production" build with no debug compilation, this
change has no run-time effect.

Change-Id: I3411edfbbbaae21561363634e5eec5ac0cf53418
Reviewed-on: https://gerrit.libreoffice.org/71757
Tested-by: Jenkins
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst fdab8ee6
......@@ -10,8 +10,6 @@
#ifndef INCLUDED_VCL_DEBUGEVENT_HXX
#define INCLUDED_VCL_DEBUGEVENT_HXX
#if OSL_DEBUG_LEVEL > 0
#include <vcl/dllapi.h>
#include <vcl/timer.hxx>
#include <sal/types.h>
......@@ -33,8 +31,6 @@ class VCL_DLLPUBLIC DebugEventInjector : private Timer {
static DebugEventInjector *getCreate();
};
#endif // OSL_DEBUG_LEVEL > 0
#endif // INCLUDED_VCL_DEBUGEVENT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,8 +20,6 @@
#include <window.h>
#include <salwtype.hxx>
#if OSL_DEBUG_LEVEL > 0
DebugEventInjector::DebugEventInjector( sal_uInt32 nMaxEvents) :
Timer("debug event injector")
, mnEventsLeft( nMaxEvents )
......@@ -273,6 +271,4 @@ DebugEventInjector *DebugEventInjector::getCreate()
return nullptr;
}
#endif // OSL_DEBUG_LEVEL > 0
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment