[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:46:28 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4fb8fb04dd45dedc659f8397d8dbc31c7d51709a
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 24 16:24:46 2001 +0000
Small tweaks and fixes as a result of writing unit tests
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/qt/_qglist.h b/WebCore/kwq/qt/_qglist.h
index 8a562e3..69e8fca 100644
--- a/WebCore/kwq/qt/_qglist.h
+++ b/WebCore/kwq/qt/_qglist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
diff --git a/WebCore/kwq/qt/_qlist.h b/WebCore/kwq/qt/_qlist.h
index 1406fea..c607b43 100644
--- a/WebCore/kwq/qt/_qlist.h
+++ b/WebCore/kwq/qt/_qlist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
@@ -145,5 +146,35 @@ public:
{ QGListIterator::operator=(it); return *this; }
};
+#ifdef _KWQ_IOSTREAM_
+template<class T>
+inline ostream &operator<<(ostream &o, const QList<T> &p)
+{
+ QListIterator<T> it = QListIterator<T>(p);
+ int count = it.count();
+
+ o << "QList: [size: " <<
+ count <<
+ "; items: ";
+
+ if (count == 0) {
+ // no-op
+ }
+ else if (count == 1) {
+ o << *(it.current());
+ }
+ else {
+ o << *(it.current());
+ while (!it.atLast()) {
+ ++it;
+ o << ", " << *(it.current());
+ }
+ }
+ o << "]";
+
+ return o;
+}
+#endif
+
#endif // QLIST_H
diff --git a/WebCore/kwq/qt/_qvaluelist.h b/WebCore/kwq/qt/_qvaluelist.h
index d6a7ec5..1132929 100644
--- a/WebCore/kwq/qt/_qvaluelist.h
+++ b/WebCore/kwq/qt/_qvaluelist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
@@ -434,6 +435,28 @@ protected:
QValueListPrivate<T>* sh;
};
+
+#ifdef _KWQ_IOSTREAM_
+template<class T>
+inline ostream &operator<<(ostream &o, const QValueList<T>&p)
+{
+ o <<
+ "QValueList: [size: " <<
+ (Q_UINT32)p.count() <<
+ "; items: ";
+ QValueListConstIterator<T> it = p.begin();
+ while (it != p.end()) {
+ o << *it;
+ if (++it != p.end()) {
+ o << ", ";
+ }
+ }
+ o << "]";
+ return o;
+}
+#endif
+
+
#ifndef QT_NO_DATASTREAM
template<class T>
inline QDataStream& operator>>( QDataStream& s, QValueList<T>& l )
diff --git a/WebCore/src/kwq/qt/_qglist.h b/WebCore/src/kwq/qt/_qglist.h
index 8a562e3..69e8fca 100644
--- a/WebCore/src/kwq/qt/_qglist.h
+++ b/WebCore/src/kwq/qt/_qglist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
diff --git a/WebCore/src/kwq/qt/_qlist.h b/WebCore/src/kwq/qt/_qlist.h
index 1406fea..c607b43 100644
--- a/WebCore/src/kwq/qt/_qlist.h
+++ b/WebCore/src/kwq/qt/_qlist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
@@ -145,5 +146,35 @@ public:
{ QGListIterator::operator=(it); return *this; }
};
+#ifdef _KWQ_IOSTREAM_
+template<class T>
+inline ostream &operator<<(ostream &o, const QList<T> &p)
+{
+ QListIterator<T> it = QListIterator<T>(p);
+ int count = it.count();
+
+ o << "QList: [size: " <<
+ count <<
+ "; items: ";
+
+ if (count == 0) {
+ // no-op
+ }
+ else if (count == 1) {
+ o << *(it.current());
+ }
+ else {
+ o << *(it.current());
+ while (!it.atLast()) {
+ ++it;
+ o << ", " << *(it.current());
+ }
+ }
+ o << "]";
+
+ return o;
+}
+#endif
+
#endif // QLIST_H
diff --git a/WebCore/src/kwq/qt/_qvaluelist.h b/WebCore/src/kwq/qt/_qvaluelist.h
index d6a7ec5..1132929 100644
--- a/WebCore/src/kwq/qt/_qvaluelist.h
+++ b/WebCore/src/kwq/qt/_qvaluelist.h
@@ -45,6 +45,7 @@
#endif
#include <KWQDef.h>
+#include <iostream>
// -------------------------------------------------------------------------
@@ -434,6 +435,28 @@ protected:
QValueListPrivate<T>* sh;
};
+
+#ifdef _KWQ_IOSTREAM_
+template<class T>
+inline ostream &operator<<(ostream &o, const QValueList<T>&p)
+{
+ o <<
+ "QValueList: [size: " <<
+ (Q_UINT32)p.count() <<
+ "; items: ";
+ QValueListConstIterator<T> it = p.begin();
+ while (it != p.end()) {
+ o << *it;
+ if (++it != p.end()) {
+ o << ", ";
+ }
+ }
+ o << "]";
+ return o;
+}
+#endif
+
+
#ifndef QT_NO_DATASTREAM
template<class T>
inline QDataStream& operator>>( QDataStream& s, QValueList<T>& l )
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list