summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@theqtcompany.com>2016-01-18 12:58:31 +0100
committerEdward Welbourne <edward.welbourne@theqtcompany.com>2016-01-20 17:13:04 +0000
commit9c0de96454570aec3fe88ba6b5d7c61b666b5753 (patch)
treee29ff508ed0b7758010257afcf62b5fbd61220a2 /src/corelib/tools
parent57e024cc81c55b8c442db9f719f19aebb321ef37 (diff)
Make some initializers be declarations.
This shortens an earlier over-long line of declarations and makes visible that these are declare-and-initialize. Change-Id: I39fa9613196c34f7e2b2da04da729324d7f83a55 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetimeparser.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp
index 3cf926ca8f..9ca2e1ffc0 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/tools/qdatetimeparser.cpp
@@ -889,17 +889,17 @@ QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPos
QDTPDEBUG << "parse" << input;
{
- int year, month, day, hour12, hour, minute, second, msec, ampm, dayofweek, year2digits;
+ int year, month, day;
currentValue.date().getDate(&year, &month, &day);
- year2digits = year % 100;
- hour = currentValue.time().hour();
- hour12 = -1;
- minute = currentValue.time().minute();
- second = currentValue.time().second();
- msec = currentValue.time().msec();
- dayofweek = currentValue.date().dayOfWeek();
-
- ampm = -1;
+ int year2digits = year % 100;
+ int hour = currentValue.time().hour();
+ int hour12 = -1;
+ int minute = currentValue.time().minute();
+ int second = currentValue.time().second();
+ int msec = currentValue.time().msec();
+ int dayofweek = currentValue.date().dayOfWeek();
+
+ int ampm = -1;
Sections isSet = NoSection;
int num;
State tmpstate;