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

List:       kde-commits
Subject:    branches/work/kde4/kdelibs/khtml/ecma
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-05-15 21:17:28
Message-ID: 1116191848.351731.30919.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 414355 by amantia:

Compile. Someone with more knowledge about kjs should review though.

 M  +10 -1     branches/work/kde4/kdelibs/khtml/ecma/kjs_window.cpp  
 M  +3 -0      branches/work/kde4/kdelibs/khtml/ecma/kjs_window.h  


--- branches/work/kde4/kdelibs/khtml/ecma/kjs_window.cpp #414354:414355
@@ -1981,9 +1981,18 @@
   int nextInterval = QTime::currentTime().msecsTo(nextTimeActual);
   if (nextInterval < 0)
     nextInterval = 0;
-  startTimer(nextInterval);
+  timerIds.append(startTimer(nextInterval));
 }
 
+void WindowQObject::killTimers()
+{
+ for (int i = 0; i < timerIds.size(); ++i) 
+ {
+    killTimer(list.at(i));
+ } 
+ timerIds.clear();
+}
+
 void WindowQObject::timeoutClose()
 {
   parent->closeNow();
--- branches/work/kde4/kdelibs/khtml/ecma/kjs_window.h #414354:414355
@@ -26,6 +26,7 @@
 #include <qpointer.h>
 #include <qmap.h>
 #include <q3ptrlist.h>
+#include <qlist.h>
 #include <qdatetime.h>
 
 #include "kjs_binding.h"
@@ -211,11 +212,13 @@
   protected:
     void timerEvent(QTimerEvent *e);
     void setNextTimer();
+    void killTimers();
   private:
     Window *parent;
     Q3PtrList<ScheduledAction> scheduledActions;
     int pausedTime;
     int lastTimerId;
+    QList<int> timerIds;
   };
 
   class Location : public ObjectImp {
[prev in list] [next in list] [prev in thread] [next in thread] 

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