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 <Friedemann.Kleint@digia.com>
This commit is contained in:
Marc Mutz 2014-09-14 02:29:22 +02:00 committed by Giuseppe D'Angelo
parent 181980d4a7
commit a2b453502c
1 changed files with 1 additions and 0 deletions

View File

@ -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')) {