diff --git a/bin/gdbmacros/gdbmacros.cpp b/bin/gdbmacros/gdbmacros.cpp
index 2043f65973d25943c69219bf19e406ce1d879f3a..05488a85125da53628143b5fe3e23c7a7bd7d86f 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 b00a259457ea99e9eef85fc27431fa4e8b0753b4..4a1ec67e7ab1a9d9facf423a2d2eedb9f981bcd4 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();