[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Oct 27 19:06:45 CEST 2004


CVS commit by staikos: 

eliminate processEvents() to hopefully eliminate crash in DCOP / races.

CCMAIL: Marc-Antoine Miville-Deschenes <mamd at ias.u-psud.fr>

Anyone notice problems with this?


  M +7 -2      kstdoc.cpp   1.134
  M +6 -1      kstdoc.h   1.36


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.133:1.134
@@ -776,4 +776,9 @@ void KstDoc::forceUpdate() {
 
 
+void KstDoc::enableUpdates() {
+  _updating = false;
+}
+
+
 bool KstDoc::event(QEvent *e) {
   if (e->type() == KstEventTypeThread) {
@@ -807,6 +812,6 @@ bool KstDoc::event(QEvent *e) {
     } else if (te->_eventType == ThreadEvent::Done) {
     }
-    kapp->processEvents(); // actually do the paints and check for inputs
-    _updating = false; // ok, we're done... update thread can send us a new event.
+
+    QTimer::singleShot(0, this, SLOT(enableUpdates()));
 
     return true;

--- kdeextragear-2/kst/kst/kstdoc.h  #1.35:1.36
@@ -92,4 +92,7 @@ public slots:
   void setDelay(int in_delay) { _updateDelay = in_delay; }
 
+private slots:
+  void enableUpdates();
+
 private:
    void createScalars() const;
@@ -112,2 +116,3 @@ signals:
 
 #endif // KSTDOC_H
+// vim: ts=2 sw=2 et





More information about the Kst mailing list