diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 784691e81a7..b08f60a9bb3 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1163,8 +1163,12 @@ def qdump__QImage(d, value): d.putExpandable() if d.isExpanded(): - (ref, width, height, depth, nbytes, pad, devicePixelRatio, colorTable, - bits, iformat) = d.split('iiiii@dppi', image_data) + if d.qtVersion() < 0x060000: + (ref, width, height, depth, nbytes, pad, devicePixelRatio, colorTable, + bits, iformat) = d.split('iiiii@dppi', image_data) + else: + (ref, width, height, depth, nbytes, pad, devicePixelRatio, _, _, _, + bits, iformat) = d.split('iiiii@dppppi', image_data) with Children(d): d.putIntItem('width', width) d.putIntItem('height', height) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index ac175bffd29..8d8c8f70d38 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2514,7 +2514,7 @@ void tst_Dumpers::dumper_data() "#include \n", "QApplication app(argc, argv);\n" - "QImage im(QSize(200, 200), QImage::Format_RGB32);\n" + "QImage im(QSize(200, 199), QImage::Format_RGB32);\n" "im.fill(QColor(200, 100, 130).rgba());\n\n" "QPainter pain;\n" "pain.begin(&im);\n" @@ -2525,9 +2525,12 @@ void tst_Dumpers::dumper_data() + GuiProfile() - + Check("im", "(200x200)", "@QImage") + + Check("im", "(200x199)", "@QImage") + + Check("im.width", "200", "int") + + Check("im.height", "199", "int") + + Check("im.data", ValuePattern("0x[[:xdigit:]]{2,}"), "void *") + Check("pain", AnyValue, "@QPainter") - + Check("pm", "(200x200)", "@QPixmap"); + + Check("pm", "(200x199)", "@QPixmap"); QTest::newRow("QLinkedList")