summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-02-21 21:20:00 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-03-26 23:21:36 +0000
commit552d97ffcbe2b8c7de6af8c556110fa6f70fc965 (patch)
tree2f1b5323e1b8f27e85697952cd847cec88ce1260 /src/corelib
parente9bd162b725607673f8f826a7d1e815217734f18 (diff)
QDateTime: remove unused parameter from localMSecsToEpochMSecs()
...a namespace-level static function. The ok parameter was never set by any caller. Change-Id: I668f78fe198f09fb0a9a52c10c8dea2fab070653 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qdatetime.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 27b21cf745..67f16e1f49 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2185,7 +2185,7 @@ static QString qt_tzname(QDateTimePrivate::DaylightStatus daylightStatus)
// then null date/time will be returned, you should adjust the date first if
// you need a guaranteed result.
static qint64 qt_mktime(QDate *date, QTime *time, QDateTimePrivate::DaylightStatus *daylightStatus,
- QString *abbreviation, bool *ok)
+ QString *abbreviation, bool *ok = 0)
{
const qint64 msec = time->msec();
int yy, mm, dd;
@@ -2446,7 +2446,7 @@ static bool epochMSecsToLocalTime(qint64 msecs, QDate *localDate, QTime *localTi
static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
QDateTimePrivate::DaylightStatus *daylightStatus,
QDate *localDate = 0, QTime *localTime = 0,
- QString *abbreviation = 0, bool *ok = 0)
+ QString *abbreviation = 0)
{
QDate dt;
QTime tm;
@@ -2469,8 +2469,6 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
*localDate = dt;
if (localTime)
*localTime = tm;
- if (ok)
- *ok = true;
return utcMsecs;
}
} else {
@@ -2485,8 +2483,6 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
*daylightStatus = QDateTimePrivate::StandardTime;
if (abbreviation)
*abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
- if (ok)
- *ok = true;
return utcMsecs;
} else if (localMsecs >= msecsMax - MSECS_PER_DAY) {
@@ -2505,8 +2501,6 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
*localDate = dt;
if (localTime)
*localTime = tm;
- if (ok)
- *ok = true;
return utcMsecs;
}
}
@@ -2520,7 +2514,7 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
--day;
QDate fakeDate(2037, month, day);
qint64 fakeDiff = fakeDate.daysTo(dt);
- qint64 utcMsecs = qt_mktime(&fakeDate, &tm, daylightStatus, abbreviation, ok);
+ qint64 utcMsecs = qt_mktime(&fakeDate, &tm, daylightStatus, abbreviation);
if (localDate)
*localDate = fakeDate.addDays(fakeDiff);
if (localTime)
@@ -2535,7 +2529,7 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
} else {
// Clearly falls inside 1970-2037 suported range so can use mktime
- qint64 utcMsecs = qt_mktime(&dt, &tm, daylightStatus, abbreviation, ok);
+ qint64 utcMsecs = qt_mktime(&dt, &tm, daylightStatus, abbreviation);
if (localDate)
*localDate = dt;
if (localTime)