Details
-
Sub-task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Description
If I compare two QQuickItem pointers, for example
QCOMPARE(dialogHelper.window()->activeFocusItem(), expectedFocusItem);
and the comparison fails, I get this output:
FAIL! : tst_QQuickFileDialogImpl::tabFocusNavigation() Compared pointers are not the same Loc: [/home/mitch/dev/qt-dev/qtquickcontrols2/tests/auto/dialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp(991)]
compare that to e.g. comparing two ints:
FAIL! : tst_QQuickFileDialogImpl::tabFocusNavigation() Compared values are not the same Actual (1): 1 Expected (2): 2 Loc: [/home/mitch/dev/qt-dev/qtquickcontrols2/tests/auto/dialogs/qquickfiledialogimpl/tst_qquickfiledialogimpl.cpp(994)]
It would be useful to know what the actual values of the pointers are. For example, if I do:
qDebug() << " Actual:" << dialogHelper.window()->activeFocusItem(); qDebug() << "Expected:" << expectedFocusItem;
I get:
QDEBUG : tst_QQuickFileDialogImpl::tabFocusNavigation() Actual: "ComboBox_QMLTYPE_15(0x611000170880, parent=0x611000170740, geometry=20,20 326x40)" QDEBUG : tst_QQuickFileDialogImpl::tabFocusNavigation() Expected: "FileDialogDelegate_QMLTYPE_7(0x611000124fc0, name=\"fileDialogDelegate0\", parent=0x6030002036b0, geometry=0,0 558x40, z=1)"