diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 34442204ef904e2b312817c9296c8f2ece92ca53..8e422f1cfd6cfa3e3da51271669ac113ce2f0fac 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -3480,6 +3480,7 @@ void *qDumpObjectData440( "\"").put(((QT_VERSION >> 16) & 255)).put("\"," "\"").put(((QT_VERSION >> 8) & 255)).put("\"," "\"").put(((QT_VERSION) & 255)).put("\"]"); + d.put(",namespace=\""NS"\","); d.put(",dumperversion=\"1.3\","); // Dump out size information d.put("sizes={"); diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index 83486e899e9f1ded9f5c1ceff68a30708d58cb0e..4ca9b22b9803eb14e1dee6bb6f55592f7e95e9c0 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -1359,7 +1359,7 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, case QMapType: case QMultiMapType: { QString nodetype; - if (m_qtVersion >= (4 << 16) + (5 << 8) + 0) { + if (m_qtVersion >= 0x040500) { nodetype = m_qtNamespace + QLatin1String("QMapNode"); nodetype += data.type.mid(outertype.size()); } else { @@ -1374,7 +1374,7 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, extraArgs[3] += QLatin1String("'*)0)->value"); } break; - case QMapNodeType: + case QMapNodeType: extraArgs[2] = evaluationSizeofTypeExpression(data.type, debugger); extraArgs[3] = QLatin1String("(size_t)&(('"); extraArgs[3] += data.type; diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index ff3feca27a2b50c66d594e1e3be1d7ce55357e51..dc164491c4eca97cbaa2aee4cca73831700032e3 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -302,7 +302,17 @@ void testQLinkedList() void testQList() { -#if 1 + QList<int> big; + for (int i = 0; i < 10000; ++i) + big.push_back(i); + + QList<Foo> flist; + for (int i = 0; i < 100; ++i) + flist.push_back(i + 15); + flist.push_back(1000); + flist.push_back(1001); + flist.push_back(1002); +#if 0 QList<int> li; QList<uint> lu; @@ -365,13 +375,13 @@ void testQList() QList<Foo> f; f.append(Foo(1)); f.append(Foo(2)); -#endif - QList<std::string> v; + QList<std::string> v; v.push_back("aa"); v.push_back("bb"); v.push_back("cc"); v.push_back("dd"); +#endif } void testQMap() @@ -620,6 +630,11 @@ void testStdList() for (int i = 0; i < 10000; ++i) big.push_back(i); + std::list<Foo> flist; + for (int i = 0; i < 100; ++i) + flist.push_back(i + 15); + +#if 0 std::list<int *> plist1; plist1.push_back(new int(1)); plist1.push_back(0); @@ -641,11 +656,6 @@ void testStdList() plist.push_back(0); plist.push_back(new Foo(2)); - std::list<Foo> flist; - flist.push_back(1); - flist.push_back(2); - flist.push_back(3); - flist.push_back(4); foreach (Foo f, flist) {} @@ -653,6 +663,7 @@ void testStdList() std::list<bool> vec; vec.push_back(true); vec.push_back(false); +#endif } void testStdMap()