QDateTimeParser: simpler return, clearer comment

skipToNextSection() returned via a local temp that served no purpose.
The accompanying comment didn't quite explain what it set out to.

Change-Id: I31581323df374653db9c2558a3bd63409aafb178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2016-12-15 10:57:13 +01:00
parent 5bc814ac69
commit e764f34583

View File

@ -1594,14 +1594,13 @@ bool QDateTimeParser::skipToNextSection(int index, const QDateTime &current, con
if (pos < 0 || pos >= text.size())
pos = -1;
const bool potential = potentialValue(text, min, max, index, current, pos);
return !potential;
/* If the value potentially can become another valid entry we
* don't want to skip to the next. E.g. In a M field (month
* without leading 0 if you type 1 we don't want to autoskip but
* if you type 3 we do
/*
If the value potentially can become another valid entry we don't want to
skip to the next. E.g. In a M field (month without leading 0) if you type
1 we don't want to autoskip (there might be [012] following) but if you
type 3 we do.
*/
return !potentialValue(text, min, max, index, current, pos);
}
/*!