[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Dec 14 15:41:55 CET 2004


CVS commit by staikos: 

make forced updates happen immediately
This is as close as we'll get to fixing 95025 without fixing 95117 I think.
It still pauses after the dialog closes, but this is because it's doing an
update before it repaints.

BUG: 95025


  M +10 -2     updatethread.cpp   1.37


--- kdeextragear-2/kst/kst/updatethread.cpp  #1.36:1.37
@@ -59,6 +59,8 @@ void UpdateThread::run() {
       kdDebug() << "Update timer" << _updateTime << endl;
 #endif
+      if (!_force) {
       break;
     }
+    }
 
     _statusMutex.lock();
@@ -289,4 +291,5 @@ void UpdateThread::setFinished(bool fini
   _statusMutex.lock();
   _done = finished;
+  _force = false;
   _statusMutex.unlock();
   _waitCondition.wakeOne();
@@ -295,6 +298,11 @@ void UpdateThread::setFinished(bool fini
 
 void UpdateThread::forceUpdate() {
-  QMutexLocker ml(&_statusMutex);
+  if (_done) {
+    return;
+  }
+  _statusMutex.lock();
   _force = true;
+  _statusMutex.unlock();
+  _waitCondition.wakeOne();
 }
 





More information about the Kst mailing list