diff options
author | David Tardon <dtardon@redhat.com> | 2012-10-25 10:14:01 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-11-22 10:47:15 +0100 |
commit | db5d4214bc85836e390cca9b346307a8568d3b9e (patch) | |
tree | 348be22c6562f0b8ba98e99f8043e74de23ae5da /slideshow | |
parent | OSL_TRACE -> SAL_INFO (diff) | |
download | core-db5d4214bc85836e390cca9b346307a8568d3b9e.tar.gz core-db5d4214bc85836e390cca9b346307a8568d3b9e.zip |
always set event description
Change-Id: I8d83c0d65fff0b0d3d08f32aa3d5c0bb5e7e9c8a
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/eventqueue.cxx | 14 | ||||
-rw-r--r-- | slideshow/source/engine/rehearsetimingsactivity.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/wakeupevent.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/inc/delayevent.hxx | 25 | ||||
-rw-r--r-- | slideshow/source/inc/event.hxx | 8 | ||||
-rw-r--r-- | slideshow/source/inc/interruptabledelayevent.hxx | 4 |
6 files changed, 13 insertions, 46 deletions
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 9e513b17b979..0967d29c1e28 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -91,13 +91,11 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription() << "\" [" << rEvent.get() << "] at " << mpTimer->getElapsedTime() << " with delay " << rEvent->getActivationTime(0.0) ); -#endif ENSURE_OR_RETURN_FALSE( rEvent, "EventQueue::addEvent: event ptr NULL" ); @@ -119,13 +117,11 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription() << "\" [" << rEvent.get() << "] for the next round at " << mpTimer->getElapsedTime() << " with delay " << rEvent->getActivationTime(0.0) ); -#endif ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL" ); @@ -139,13 +135,11 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("slideshow.eventqueue", "adding event \"" << rpEvent->GetDescription() << "\" [" << rpEvent.get() << "] for execution when the queue is empty at " << mpTimer->getElapsedTime() << " with delay " << rpEvent->getActivationTime(0.0) ); -#endif ENSURE_OR_RETURN_FALSE( rpEvent.get() != NULL, @@ -222,20 +216,12 @@ namespace slideshow { try { -#if OSL_DEBUG_LEVEL > 0 - VERBOSE_TRACE( "Firing event: unknown (0x%X), timeout was: %f", - event.pEvent.get(), - event.pEvent->getActivationTime(0.0) ); -#endif -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("slideshow.eventqueue", "firing event \"" << event.pEvent->GetDescription() << "\" [" << event.pEvent.get() << "] at " << mpTimer->getElapsedTime() << " with delay " << event.pEvent->getActivationTime(0.0) ); -#endif - event.pEvent->fire(); SAL_INFO("slideshow.eventqueue", "event \"" << event.pEvent->GetDescription() diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index 343349784d28..76efb42046c4 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -60,9 +60,7 @@ public: WakeupEvent( boost::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase, ActivitySharedPtr const& rActivity, ActivitiesQueue & rActivityQueue ) : -#if OSL_DEBUG_LEVEL > 1 - Event(::rtl::OUString("WakeupEvent")), -#endif + Event("WakeupEvent"), maTimer(pTimeBase), mnNextTime(0.0), mpActivity(rActivity), diff --git a/slideshow/source/engine/wakeupevent.cxx b/slideshow/source/engine/wakeupevent.cxx index ee909dd0cd05..10da6963d7cd 100644 --- a/slideshow/source/engine/wakeupevent.cxx +++ b/slideshow/source/engine/wakeupevent.cxx @@ -32,9 +32,7 @@ namespace slideshow WakeupEvent::WakeupEvent( boost::shared_ptr<canvas::tools::ElapsedTime> const & pTimeBase, ActivitiesQueue& rActivityQueue ) : -#if OSL_DEBUG_LEVEL > 1 - Event(::rtl::OUString("WakeupEvent")), -#endif + Event("WakeupEvent"), maTimer(pTimeBase), mnNextTime(0.0), mpActivity(), diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index 5115fd7e7522..ba7ac03b904a 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -37,22 +37,14 @@ public: template <typename FuncT> Delay( FuncT const& func, double nTimeout -#if OSL_DEBUG_LEVEL > 1 , const ::rtl::OUString& rsDescription ) : Event(rsDescription), -#else - ) : -#endif mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} Delay( const boost::function0<void>& func, double nTimeout -#if OSL_DEBUG_LEVEL > 1 , const ::rtl::OUString& rsDescription ) : Event(rsDescription), -#else - ) : -#endif mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} @@ -83,9 +75,9 @@ private: @return generated delay event */ template <typename FuncT> -inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout ) +inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout, rtl::OUString const& rsDescription ) { - return EventSharedPtr( new Delay( func, nTimeout ) ); + return EventSharedPtr( new Delay( func, nTimeout, rsDescription ) ); } /** Generate immediate event @@ -96,15 +88,14 @@ inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout ) @return generated immediate event. */ template <typename FuncT> -inline EventSharedPtr makeEvent_( FuncT const& func ) +inline EventSharedPtr makeEvent_( FuncT const& func, rtl::OUString const& rsDescription) { - return EventSharedPtr( new Delay( func, 0.0 ) ); + return EventSharedPtr( new Delay( func, 0.0, rsDescription ) ); } -// Strip away description. -#define makeDelay(f, t, d) makeDelay_(f, t) -#define makeEvent(f, d) makeEvent_(f) +#define makeDelay(f, t, d) makeDelay_(f, t, d) +#define makeEvent(f, d) makeEvent_(f, d) #else // OSL_DEBUG_LEVEL > 1 @@ -135,10 +126,10 @@ inline EventSharedPtr makeDelay_( #define makeDelay(f, t, d) makeDelay_(f, t, \ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) + d) #define makeEvent(f, d) makeDelay_(f, 0.0, \ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) + d) #endif // OSL_DEBUG_LEVEL <= 1 diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx index cd9b91ddc637..44b5bd8d7507 100644 --- a/slideshow/source/inc/event.hxx +++ b/slideshow/source/inc/event.hxx @@ -32,9 +32,7 @@ namespace internal { class Event : public Disposable { public: -#if OSL_DEBUG_LEVEL > 1 - Event (const ::rtl::OUString& rsDescription) : msDescription(rsDescription) {}; -#endif + Event (const ::rtl::OUString& rsDescription) : msDescription(rsDescription) {} /** Execute the event. @@ -66,12 +64,10 @@ public: */ virtual double getActivationTime( double nCurrentTime ) const = 0; -#if OSL_DEBUG_LEVEL > 1 - ::rtl::OUString GetDescription (void) const { return msDescription; } + const ::rtl::OUString& GetDescription (void) const { return msDescription; } private: const ::rtl::OUString msDescription; -#endif }; typedef ::boost::shared_ptr< Event > EventSharedPtr; diff --git a/slideshow/source/inc/interruptabledelayevent.hxx b/slideshow/source/inc/interruptabledelayevent.hxx index a8c2fef7568b..d5f962d69946 100644 --- a/slideshow/source/inc/interruptabledelayevent.hxx +++ b/slideshow/source/inc/interruptabledelayevent.hxx @@ -38,9 +38,7 @@ namespace slideshow public: DelayFacade( const EventSharedPtr& rEvent, double nTimeout ) : -#if OSL_DEBUG_LEVEL > 1 - Event(::rtl::OUString("DelayFacade")), -#endif + Event("DelayFacade"), mpEvent( rEvent ), mnTimeout( nTimeout ) { |