QDateTimeParser: localize variable to avoid shadowing

The outer scope it was in had a later clause with its own pos
variable.

Change-Id: I8d083d3d5935416ef82a78890ed145f02d6d6ded
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Edward Welbourne 2016-01-22 17:03:48 +01:00 committed by Edward Welbourne
parent bd591064be
commit 658c8370e4

View File

@ -879,12 +879,12 @@ QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPos
State state = Acceptable;
QDateTime newCurrentValue;
int pos = 0;
bool conflicts = false;
const int sectionNodesCount = sectionNodes.size();
QDTPDEBUG << "parse" << input;
{
int pos = 0;
int year, month, day;
currentValue.date().getDate(&year, &month, &day);
int year2digits = year % 100;