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
Edward Welbourne 2016-01-18 17:07:56 +01:00 committed by Timur Pocheptsov
parent ac384524c8
commit a56dd0b828
1 changed files with 1 additions and 1 deletions

View File

@ -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