aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2008-12-05 18:44:09 +0100
committerhjk <qtc-committer@nokia.com>2008-12-05 18:44:09 +0100
commit0d46571eb3b4777abde3921d763551a917955017 (patch)
treefd9e0da1635d0af958b156a674256327dd88f4d3
parentf89efc23e093c5c6c4ae7d7e82f364e066b9b211 (diff)
fix QSet custom dumper for namespaced Qt
-rw-r--r--bin/gdbmacros/gdbmacros.cpp4
-rw-r--r--tests/manual/gdbdebugger/simple/app.cpp18
2 files changed, 20 insertions, 2 deletions
diff --git a/bin/gdbmacros/gdbmacros.cpp b/bin/gdbmacros/gdbmacros.cpp
index 2043f65973..05488a8512 100644
--- a/bin/gdbmacros/gdbmacros.cpp
+++ b/bin/gdbmacros/gdbmacros.cpp
@@ -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();
diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp
index b00a259457..4a1ec67e7a 100644
--- a/tests/manual/gdbdebugger/simple/app.cpp
+++ b/tests/manual/gdbdebugger/simple/app.cpp
@@ -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();