summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@theqtcompany.com>2016-01-18 17:07:56 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2016-11-18 05:03:43 +0000
commita56dd0b82855dd91d95159de4b568203a026b66c (patch)
tree6b818c288ec2caa5d75e693161f7481e9c987b6d
parentac384524c8fa6b19153811e2eaf6dac6b911f930 (diff)
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>
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp2
1 files changed, 1 insertions, 1 deletions
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<QDateTimeEditPrivate*>(qt_widget_private(&edit)));
- QCOMPARE(edit_d_ptr->text, expectedDisplayString);
+ QCOMPARE(edit_d_ptr->QDateTimeParser::displayText(), expectedDisplayString);
}
#endif