[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdetoys/kteatime
From:       Martin Willers <M.Willers () tu-bs ! de>
Date:       2003-04-17 20:46:17
[Download RAW message or body]

CVS commit by willers: 

fixed bug with propagation of valueChanged() signals from TimeEdit


  M +4 -1      ChangeLog   1.28
  M +14 -5     timeedit.cpp   1.5


--- kdetoys/kteatime/timeedit.cpp  #1.4:1.5
@@ -83,12 +83,21 @@ TimeEdit::~TimeEdit()
 
 /** Set to specified number of seconds. */
-void TimeEdit::setValue(int value)
+void TimeEdit::setValue(int val)
 {
-        if (value < 0)
+        if (val < 0)
                 return;
-        // FIXME: What does KSpinBox do if value is out of range?
 
-        secondBox->setValue(value % 60);
-        minuteBox->setValue(value / 60);
+        // block signals to avoid receiption of valueChanged()
+        // between changing of minutes and seconds
+        secondBox->blockSignals(true);
+        minuteBox->blockSignals(true);
+
+        secondBox->setValue(val % 60);
+        minuteBox->setValue(val / 60);
+
+        secondBox->blockSignals(false);
+        minuteBox->blockSignals(false);
+
+        emit valueChanged(value());
 }
 

--- kdetoys/kteatime/ChangeLog  #1.27:1.28
@@ -1,2 +1,5 @@
+2003-04-17  Martin Willers <willers@xm-arts.de>
+        - fixed bug with propagation of valueChanged() signals from TimeEdit
+
 2003-04-10  Martin Willers <willers@xm-arts.de>
         - have now proper wrapping time-edit widget


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic