path: root/src/corelib/tools/qdatetime.h
diff options
authorJon Severinsson <>2012-10-09 15:15:53 +0200
committerThe Qt Project <>2012-10-10 08:45:22 +0200
commit85c47eed6b6bfdacfb8e6438b6ef8a1185168675 (patch)
tree9aae146045a3b5dd0b09c0a4f164a81289d61456 /src/corelib/tools/qdatetime.h
parent78dddc280235e3b298922189bfef8aca6f42d879 (diff)
Change QDateTime::addSecs() and QDateTime::secsTo() to use qint64.
addMSecs() / msecsTo() have always used qint64, and when QDate was changed to use a 64-bit julian day, QDateTime::addDays() and QDateTime::daysTo() was changed to use qint64 in order to support the full extended range, but addSecs() and secsTo() seems to have been forgotten. Change-Id: I3acc35ee2bcc9f353650eb42f97d428f706b2db6 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/corelib/tools/qdatetime.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index 35c598fef7..ed7d8adb5f 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -232,13 +232,13 @@ public:
QDateTime addDays(qint64 days) const;
QDateTime addMonths(int months) const;
QDateTime addYears(int years) const;
- QDateTime addSecs(int secs) const;
+ QDateTime addSecs(qint64 secs) const;
QDateTime addMSecs(qint64 msecs) const;
QDateTime toTimeSpec(Qt::TimeSpec spec) const;
inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); }
inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
qint64 daysTo(const QDateTime &) const;
- int secsTo(const QDateTime &) const;
+ qint64 secsTo(const QDateTime &) const;
qint64 msecsTo(const QDateTime &) const;
bool operator==(const QDateTime &other) const;