From 69fb25cebb9e74b018026d3ab9aa75fcc959cfc5 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Sep 2009 15:16:21 +0200 Subject: Fix ./tst_qdatetimeedit::task118867 Before the QLineEdit change, the QLineEdit::displayText used to return the currently entered text when we call validate() on the validator. Now, the displayText is set _after_ the validation. Hence, the QDateTimeEdit::validate did not had access to the real text. Reviewed-by: Thierry --- src/gui/widgets/qdatetimeedit_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qdatetimeedit_p.h b/src/gui/widgets/qdatetimeedit_p.h index 7e1c24d..689b508 100644 --- a/src/gui/widgets/qdatetimeedit_p.h +++ b/src/gui/widgets/qdatetimeedit_p.h @@ -89,7 +89,7 @@ public: QDateTime validateAndInterpret(QString &input, int &, QValidator::State &state, bool fixup = false) const; void clearSection(int index); - virtual QString displayText() const { return edit->displayText(); } // this is from QDateTimeParser + virtual QString displayText() const { return edit->text(); } // this is from QDateTimeParser int absoluteIndex(QDateTimeEdit::Section s, int index) const; int absoluteIndex(const SectionNode &s) const; -- cgit v0.12