diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2016-12-15 10:57:13 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-04-18 12:56:09 +0000 |
commit | e764f345834cfc5052967da100cc26900a97fbb5 (patch) | |
tree | ab5aee98056f70c6b02020c5ee06c6063991aef0 /src/corelib/tools/qdatetimeparser.cpp | |
parent | 5bc814ac69c805bdc5b88a1dbb576bd546855e28 (diff) |
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>
Diffstat (limited to 'src/corelib/tools/qdatetimeparser.cpp')
-rw-r--r-- | src/corelib/tools/qdatetimeparser.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp index 6a9d1fbc69..d49bec5f76 100644 --- a/src/corelib/tools/qdatetimeparser.cpp +++ b/src/corelib/tools/qdatetimeparser.cpp @@ -1594,14 +1594,13 @@ bool QDateTimeParser::skipToNextSection(int index, const QDateTime ¤t, 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); } /*! |