summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@theqtcompany.com>2016-01-22 17:03:48 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2016-11-17 14:22:44 +0000
commit658c8370e4dd74ee82046799b56947bb3c738b92 (patch)
tree22bad1e92d0e0b7186d4f7202db88a7992055229 /src
parentbd591064be388216f91d48522b3bdbc1be93bb92 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qdatetimeparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp
index 5b7bf0d3d4..bda786aa24 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/tools/qdatetimeparser.cpp
@@ -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;