diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index fc7169c7d2a..027f9bd11d4 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -19,6 +19,18 @@ def qdump__QBasicAtomicInt(d, item): d.putNumChild(0) +def qdump__QBasicAtomicPointer(d, item): + innerType = templateArgument(item.value.type.unqualified(), 0) + d.putType(item.value.type) + p = cleanAddress(item.value["_q_value"]) + d.putValue(p) + d.putPointerValue(item.value.address) + d.putNumChild(p) + if d.isExpanded(item): + with Children(d): + d.putItem(item.value["_q_value"]) + + def qdump__QByteArray(d, item): d.putByteArrayValue(item.value) diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp index cd6ef447a90..c36e4fe744b 100644 --- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp +++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp @@ -867,7 +867,7 @@ public: void testQObject(int &argc, char *argv[]) { QApplication app(argc, argv); - QString longString = QString(10000, QLatin1Char('A')); + //QString longString = QString(10000, QLatin1Char('A')); #if 1 Names::Bar::TestObject test; test.setMyProp1("HELLO"); @@ -887,7 +887,7 @@ void testQObject(int &argc, char *argv[]) t += "y"; #endif -#if 0 +#if 1 QWidget ob; ob.setObjectName("An Object"); ob.setProperty("USER DEFINED 1", 44); @@ -895,6 +895,7 @@ void testQObject(int &argc, char *argv[]) QObject ob1; ob1.setObjectName("Another Object"); + QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater())); QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater())); //QObject::connect(&app, SIGNAL(lastWindowClosed()), &ob, SLOT(deleteLater())); #endif