Don't call static members with object

This makes it clear that we're not modifying d.

Change-Id: Ic5d393bfd36e48a193fcffff13b968c6d08e69f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Thiago Macieira 2015-01-14 16:39:20 -08:00
parent 514af281e3
commit 47f99cacc4

View File

@ -3738,7 +3738,7 @@ QDateTime QDateTime::addDays(qint64 ndays) const
localMSecsToEpochMSecs(timeToMSecs(date, time), &date, &time);
#ifndef QT_BOOTSTRAPPED
else if (d->m_spec == Qt::TimeZone)
d->zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
QDateTimePrivate::zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
#endif // QT_BOOTSTRAPPED
dt.d->setDateTime(date, time);
return dt;
@ -3772,7 +3772,7 @@ QDateTime QDateTime::addMonths(int nmonths) const
localMSecsToEpochMSecs(timeToMSecs(date, time), &date, &time);
#ifndef QT_BOOTSTRAPPED
else if (d->m_spec == Qt::TimeZone)
d->zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
QDateTimePrivate::zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
#endif // QT_BOOTSTRAPPED
dt.d->setDateTime(date, time);
return dt;
@ -3806,7 +3806,7 @@ QDateTime QDateTime::addYears(int nyears) const
localMSecsToEpochMSecs(timeToMSecs(date, time), &date, &time);
#ifndef QT_BOOTSTRAPPED
else if (d->m_spec == Qt::TimeZone)
d->zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
QDateTimePrivate::zoneMSecsToEpochMSecs(timeToMSecs(date, time), d->m_timeZone, &date, &time);
#endif // QT_BOOTSTRAPPED
dt.d->setDateTime(date, time);
return dt;