From 0d46571eb3b4777abde3921d763551a917955017 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Fri, 5 Dec 2008 18:44:09 +0100
Subject: [PATCH] fix QSet custom dumper for namespaced Qt

---
 bin/gdbmacros/gdbmacros.cpp             |  4 ++--
 tests/manual/gdbdebugger/simple/app.cpp | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/bin/gdbmacros/gdbmacros.cpp b/bin/gdbmacros/gdbmacros.cpp
index 2043f65973d..05488a85125 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 b00a259457e..4a1ec67e7ab 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();
-- 
GitLab