diff options
author | hjk <hjk@qt.io> | 2020-11-25 10:25:08 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-11-26 08:41:23 +0000 |
commit | 0ce92b3ac7f9ca93259471c3887b6bfc624fde61 (patch) | |
tree | 14e5fba7beabad6dd9877c54fcde758a7cc3597f | |
parent | 786c131beb49152f76c570df49f5d514e8110205 (diff) |
Debugger: Adapt QXmlAttributes dumper to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: I67ee0fae1308d20b474fe0dd565b46d2a83dd5e3
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | share/qtcreator/debugger/qttypes.py | 9 | ||||
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index cff834aa23..b9cac65065 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -2202,10 +2202,11 @@ def qdump__QXmlAttributes__Attribute(d, value): def qdump__QXmlAttributes(d, value): - (vptr, atts) = value.split('pP') - innerType = d.createType(d.qtNamespace() + 'QXmlAttributes::Attribute', 4 * d.ptrSize()) - val = d.createListItem(atts, innerType) - qdumpHelper_QList(d, val, innerType) + vptr, atts = value.split('p{QList<QXmlAttributes::Attribute>}') + _, att_size, _ = d.describeStruct('{QString}' * 4) + innerType = d.createType(d.qtNamespace() + 'QXmlAttributes::Attribute', + att_size) + qdumpHelper_QList(d, atts, innerType) def qdump__QXmlStreamStringRef(d, value): diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 9adf8543c3..aed514301f 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -1050,7 +1050,8 @@ public: { this->operator+(CoreProfile()); profileExtra += - " QT += xml\n"; + "greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat\n" + "else: QT += xml\n"; cmakelistsExtra += "find_package(Qt5 COMPONENTS Core Xml REQUIRED)\n" |