[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:22:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 611a95a11cb14698b0b543e25142f978d8689d02
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 22 02:30:52 2004 +0000

    	Add some methods to dicts and stacks that exist in Qt.
    
            Reviewed by darin
    
            * kwq/KWQDict.h:
            (QDict::replace):
            * kwq/KWQPtrDict.h:
            (QPtrDict::replace):
            (QPtrDict::find):
            * kwq/KWQPtrStack.h:
            (QPtrStack::current):
            (QPtrStack::setAutoDelete):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 82d6e6f..b02fa11 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,4 +1,17 @@
-=== Safari-125 ===
+2004-01-21  David Hyatt  <hyatt at apple.com>
+
+	Add some methods to dicts and stacks that exist in Qt.
+	
+        Reviewed by darin
+
+        * kwq/KWQDict.h:
+        (QDict::replace):
+        * kwq/KWQPtrDict.h:
+        (QPtrDict::replace):
+        (QPtrDict::find):
+        * kwq/KWQPtrStack.h:
+        (QPtrStack::current):
+        (QPtrStack::setAutoDelete):
 
 2004-01-19  Maciej Stachowiak  <mjs at apple.com>
 
diff --git a/WebCore/kwq/KWQDict.h b/WebCore/kwq/KWQDict.h
index 1ee7f00..c12f0c7 100644
--- a/WebCore/kwq/KWQDict.h
+++ b/WebCore/kwq/KWQDict.h
@@ -42,6 +42,8 @@ public:
     virtual uint count() const { return impl.count(); }
     void insert(const QString &key, const T *value) { impl.insert(key,(void *)value);}
     bool remove(const QString &key) { return impl.remove(key,del_item); }
+    void replace(const QString &key, const T *value) { if (find(key)) remove(key); insert(key, value); }
+    
     T *find(const QString &key) const { return (T *)impl.find(key); }
 
     QDict &operator=(const QDict &d) { impl.assign(d.impl, del_item); QPtrCollection::operator=(d); return *this;}
diff --git a/WebCore/kwq/KWQPtrDict.h b/WebCore/kwq/KWQPtrDict.h
index 52cbe05..75a8f6a 100644
--- a/WebCore/kwq/KWQPtrDict.h
+++ b/WebCore/kwq/KWQPtrDict.h
@@ -44,6 +44,12 @@ public:
     T *take(void *key) { return (T *)impl.take(key); }
     void insert(void *key, T *value) { impl.insert(key, value); }
     bool remove(void *key) { return impl.remove(key, del_item); }
+    void replace(void *key, T *value) {
+      if (find(key)) remove(key);
+      insert(key, value);
+    }
+    T* find(void *key) { return (T*)impl.find(key); }
+
     bool isEmpty() const { return count() == 0; }
 
     QPtrDict<T> &operator=(const QPtrDict<T> &pd) { impl.assign(pd.impl,del_item); QPtrCollection::operator=(pd); return *this; }
diff --git a/WebCore/kwq/KWQPtrStack.h b/WebCore/kwq/KWQPtrStack.h
index 53fe059..000cdfa 100644
--- a/WebCore/kwq/KWQPtrStack.h
+++ b/WebCore/kwq/KWQPtrStack.h
@@ -36,7 +36,10 @@ public:
     void push(const T *item) { list.append (item); }
     T *pop() { T *tmp = list.getLast(); list.removeLast(); return tmp; }
     uint count() const { return list.count(); }
-
+    T* current() const { return list.getLast(); }
+    
+    void setAutoDelete(bool b) { list.setAutoDelete(b); }
+    
  private:
     QPtrList<T> list;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list