From a56dd0b82855dd91d95159de4b568203a026b66c Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 18 Jan 2016 17:07:56 +0100 Subject: 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 --- tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/widgets') diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 08a28f3ea0..ee54b16990 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -3749,7 +3749,7 @@ void tst_QDateTimeEdit::dateEditCorrectSectionSize() QTest::keyClick(&edit, keyPair.first, keyPair.second); QDateTimeEditPrivate* edit_d_ptr(static_cast(qt_widget_private(&edit))); - QCOMPARE(edit_d_ptr->text, expectedDisplayString); + QCOMPARE(edit_d_ptr->QDateTimeParser::displayText(), expectedDisplayString); } #endif -- cgit v1.2.3