tst_QDateTimeEdit: Use base method, not direct member access
A test was directly accessing the .text member of QDateTimeParser (which presently has nothing private). Use the virtual .displayText() method of this base instead, to let the base have some hope of data-hiding (maybe, some day). Change-Id: I8b6e39fba130de56f117bffb2aec346197969c5b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>bb10
parent
ac384524c8
commit
a56dd0b828
|
|
@ -3749,7 +3749,7 @@ void tst_QDateTimeEdit::dateEditCorrectSectionSize()
|
|||
QTest::keyClick(&edit, keyPair.first, keyPair.second);
|
||||
|
||||
QDateTimeEditPrivate* edit_d_ptr(static_cast<QDateTimeEditPrivate*>(qt_widget_private(&edit)));
|
||||
QCOMPARE(edit_d_ptr->text, expectedDisplayString);
|
||||
QCOMPARE(edit_d_ptr->QDateTimeParser::displayText(), expectedDisplayString);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue