From a2b453502c657dcc4e6926e4cdfec9d143bdb90c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 14 Sep 2014 02:29:22 +0200 Subject: QCalendarWidget: fix a bug when parsing date/time formats Quoting was not reset after consuming the quoted character. This bug only manifests when a format contains two quoted characters. It's not possible to write an auto-test for this, since the format is always read from the locale. Change-Id: I39aff41f20f647c285c971b4d560f9e36d4b82fb Reviewed-by: Friedemann Kleint --- src/widgets/widgets/qcalendarwidget.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 05f150e5ab..b281b98cb0 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -590,6 +590,7 @@ void QCalendarDateValidator::setFormat(const QString &format) const QChar nextChar = format.at(pos); if (quoting) { separator += nextChar; + quoting = false; } else { SectionToken *token = 0; if (nextChar == QLatin1Char('d')) { -- cgit v1.2.3