fix QSet custom dumper for namespaced Qt

This commit is contained in:
hjk
2008-12-05 18:44:09 +01:00
parent f89efc23e0
commit 0d46571eb3
2 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -1869,8 +1869,8 @@ static void qDumpQSet(QDumper &d)
d.beginHash();
P(d, "name", "[" << i << "]");
P(d, "type", d.innertype);
P(d, "exp", "(('QHashNode<" << d.innertype
<< ",QHashDummyValue>'*)"
P(d, "exp", "(('"NS"QHashNode<" << d.innertype
<< ","NS"QHashDummyValue>'*)"
<< static_cast<const void*>(node) << ")->key"
);
d.endHash();
+18
View File
@@ -351,6 +351,23 @@ void testPlugin()
}
}
void testSet()
{
QSet<int> hgg0;
hgg0.insert(11);
hgg0.insert(22);
QSet<QString> hgg1;
hgg1.insert("22.0");
QObject ob;
QSet<QPointer<QObject> > hash;
QPointer<QObject> ptr(&ob);
//hash.insert(ptr);
//hash.insert(ptr);
//hash.insert(ptr);
}
void stringRefTest(const QString &refstring)
{
Q_UNUSED(refstring);
@@ -759,6 +776,7 @@ int main(int argc, char *argv[])
testImage();
testMap();
testString();
testSet();
testStringList();
testStruct();
//testThreads();