diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index 605c6187b91..6aa0e995de2 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -1440,6 +1440,15 @@ def qdump__QTextCodec(d, item): d.putCallItem("name", item, "name()") d.putCallItem("mibEnum", item, "mibEnum()") +def qdump__QUrl(d, item): + d_ptr = item.value["d"].dereference() + d.putStringValue(d_ptr["encodedOriginal"]) + d.putNumChild(1) + if d.isExpanded(item): + with Children(d): + d.putItem(Item(d_ptr, item.iname, "d", "d")) + + def qdumpHelper__QVariant(d, value): #warn("VARIANT TYPE: %s : " % variantType) data = value["d"]["data"] diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index 68bdcfb2ebe..1705327ffa5 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #if QT_VERSION >= 0x040500 #include #endif @@ -1165,6 +1166,8 @@ void testQStack() void testQString() { + QUrl url(QString("http://www.nokia.com")); + QString str = "Hello "; str += " big, "; str += " fat ";