Commit 540c6de1 authored by hjk's avatar hjk
Browse files

work on std::list dumper

parent 09da60f0
...@@ -661,11 +661,8 @@ void QDumper::endHash() ...@@ -661,11 +661,8 @@ void QDumper::endHash()
void QDumper::putEllipsis() void QDumper::putEllipsis()
{ {
d.beginHash(); addCommaIfNeeded();
P(d, "name", "Warning:"); *this << "{name=\"<incomplete>\",value=\"\",type=\"" << innertype << "\"}";
P(d, "value", "<incomplete>");
P(d, "type", d.innertype);
d.endHash();
} }
// //
...@@ -2120,7 +2117,7 @@ static void qDumpStdList(QDumper &d) ...@@ -2120,7 +2117,7 @@ static void qDumpStdList(QDumper &d)
int nn = 0; int nn = 0;
std::list<int>::const_iterator it = list.begin(); std::list<int>::const_iterator it = list.begin();
for (nn < 101 && it != list.end(); ++nn, ++it) for (; nn < 101 && it != list.end(); ++nn, ++it)
qCheckAccess(it.operator->()); qCheckAccess(it.operator->());
if (nn > 100) if (nn > 100)
...@@ -2135,7 +2132,7 @@ static void qDumpStdList(QDumper &d) ...@@ -2135,7 +2132,7 @@ static void qDumpStdList(QDumper &d)
const char *stripped = const char *stripped =
isPointerType(d.innertype) ? strippedInnerType.data() : 0; isPointerType(d.innertype) ? strippedInnerType.data() : 0;
d << ",children=["; d << ",children=[";
std::list<int>::const_iterator it = list.begin(); it = list.begin();
for (int i = 0; i < 1000 && it != list.end(); ++i, ++it) { for (int i = 0; i < 1000 && it != list.end(); ++i, ++it) {
d.beginHash(); d.beginHash();
P(d, "name", "[" << i << "]"); P(d, "name", "[" << i << "]");
......
...@@ -73,6 +73,9 @@ uint qHash(const double & f) ...@@ -73,6 +73,9 @@ uint qHash(const double & f)
return int(f); return int(f);
} }
#define X myns
X::QString str;
class Foo class Foo
{ {
public: public:
...@@ -623,6 +626,8 @@ void testQVariant3() ...@@ -623,6 +626,8 @@ void testQVariant3()
void testQVector() void testQVector()
{ {
QVector<int> big(10000);
QVector<Foo *> plist; QVector<Foo *> plist;
plist.append(new Foo(1)); plist.append(new Foo(1));
plist.append(0); plist.append(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment