summaryrefslogtreecommitdiff
path: root/core/pim
authorsandman <sandman>2002-06-09 23:42:42 (UTC)
committer sandman <sandman>2002-06-09 23:42:42 (UTC)
commit1c56ab829f04ea5b127c1c632cec330e47bca524 (patch) (unidiff)
tree30f0bd7c2d124cbf2dc41f32234922d2f3be19a7 /core/pim
parent25d084dd1a4b69cefcf16a889f22feb39d60f541 (diff)
downloadopie-1c56ab829f04ea5b127c1c632cec330e47bca524.zip
opie-1c56ab829f04ea5b127c1c632cec330e47bca524.tar.gz
opie-1c56ab829f04ea5b127c1c632cec330e47bca524.tar.bz2
Fixed a counter bug in alarm timer loop.
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp14
-rw-r--r--core/pim/datebook/datebook.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 8614b3f..2c2965e 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -83,3 +83,4 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
83 syncing(FALSE), 83 syncing(FALSE),
84 inSearch(FALSE) 84 inSearch(FALSE),
85 alarmCounter(0)
85{ 86{
@@ -616,2 +617,3 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
616 Sound::soundAlarm(); 617 Sound::soundAlarm();
618 alarmCounter = 0;
617 stopTimer = startTimer( 5000 ); 619 stopTimer = startTimer( 5000 );
@@ -685,10 +687,8 @@ void DateBook::timerEvent( QTimerEvent *e )
685{ 687{
686 static int stop = 0; 688 if ( alarmCounter < 10 ) {
687 if ( stop < 10 ) { 689 alarmCounter++;
688 Sound::soundAlarm(); 690 Sound::soundAlarm();
689 stop++; 691 }
690 } else { 692 else
691 stop = 0;
692 killTimer( e->timerId() ); 693 killTimer( e->timerId() );
693 }
694} 694}
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h
index d1fe90d..e7be0dd 100644
--- a/core/pim/datebook/datebook.h
+++ b/core/pim/datebook/datebook.h
@@ -122,2 +122,4 @@ private:
122 122
123 int alarmCounter;
124
123 QString checkEvent(const Event &); 125 QString checkEvent(const Event &);