diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2015-01-14 13:11:28 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2015-03-06 12:27:06 +0000 |
commit | 57656eb1fae5ae6c4d3b7542a385a93ff434e4e7 (patch) | |
tree | 7dc672090c6236ef7bd5a2bf5278cd03b89e2ef8 /vcl | |
parent | 49524c6dcf04b9dadef8d2b084cf26abcf70b8a9 (diff) |
Idle and Timer are now completely independent
And everything is functionating pretty well.
Change-Id: Id7f5a995362f6f7c5235f2e9facb7c7f119f3140
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/qa/cppunit/timer.cxx | 8 | ||||
-rw-r--r-- | vcl/source/app/idle.cxx | 9 | ||||
-rw-r--r-- | vcl/source/edit/textdata.cxx | 2 |
4 files changed, 12 insertions, 8 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 680933383676..e468df4e102d 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -326,6 +326,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/app/dndhelp \ vcl/source/app/help \ vcl/source/app/i18nhelp \ + vcl/source/app/idle \ vcl/source/app/idlemgr \ vcl/source/app/salvtables \ vcl/source/app/session \ diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx index 4e2bb5647f7d..f33578a3d13b 100644 --- a/vcl/qa/cppunit/timer.cxx +++ b/vcl/qa/cppunit/timer.cxx @@ -16,6 +16,7 @@ #include <salhelper/thread.hxx> #include <vcl/timer.hxx> +#include <vcl/idle.hxx> #include <vcl/svapp.hxx> /// Avoid our timer tests just wedging the build if they fail. @@ -86,12 +87,13 @@ class IdleBool : public Idle bool &mrBool; public: IdleBool( bool &rBool ) : - Idle( VCL_IDLE_PRIORITY_LOWEST ), mrBool( rBool ) + Idle(), mrBool( rBool ) { + SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOWEST ); Start(); mrBool = false; } - virtual void Timeout() SAL_OVERRIDE + virtual void DoIdle() SAL_OVERRIDE { mrBool = true; Application::EndYield(); @@ -102,7 +104,7 @@ void TimerTest::testIdle() { bool bTriggered = false; IdleBool aTest( bTriggered ); - Timer::ProcessAllIdleHandlers(); + Idle::ProcessAllIdleHandlers(); CPPUNIT_ASSERT_MESSAGE("watchdog triggered", bTriggered); } diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx index bf715fb1e5bc..15427d6da2ed 100644 --- a/vcl/source/app/idle.cxx +++ b/vcl/source/app/idle.cxx @@ -94,9 +94,10 @@ void Idle::ImplDeInitIdle() void Idle::ProcessAllIdleHandlers() { // process all pending Idle - ImplIdleData* pIdleData; - ImplIdleData* pPrevIdleData; - while (pIdleData = ImplIdleData::GetFirstIdle()) + ImplIdleData* pIdleData = NULL; + ImplIdleData* pPrevIdleData = NULL; + ImplSVData* pSVData = ImplGetSVData(); + while ((pIdleData = ImplIdleData::GetFirstIdle())) { pIdleData->Invoke(); } @@ -192,7 +193,7 @@ Idle& Idle::operator=( const Idle& rIdle ) Idle::Idle(): mpIdleData(NULL), - mePriority(VCL_IDLE_PRIORITY_HIGH), + mePriority(IdlePriority::VCL_IDLE_PRIORITY_HIGH), mbActive(false) { } diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index b4f5047f689f..2004d6e98f0d 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -223,7 +223,7 @@ IdleFormatter::IdleFormatter() { mpView = 0; mnRestarts = 0; - SetPriority(VCL_IDLE_PRIORITY_HIGH); + SetPriority(IdlePriority::VCL_IDLE_PRIORITY_HIGH); } IdleFormatter::~IdleFormatter() |