path: root/src/corelib/tools/qdatetime.h
diff options
authorDavid Gil <>2013-07-12 00:44:00 +0200
committerThe Qt Project <>2013-07-15 10:15:33 +0200
commit7dbe4df27bfd72507bba4af72ba1fb250cd03930 (patch)
tree5d85b3f6bec583c3a5f115b9dd9aa049293531b3 /src/corelib/tools/qdatetime.h
parent0e4c09662aec1f2d53cbc860c244891464de8c07 (diff)
Add reminders to change uint to quint64 in Qt6 QDateTime time_t methods
In order to avoid problems in 2038 with time_t dates in 32-bit machines, add reminders to change uint to quint64 in Qt6, in time_t-related methods of QDateTime. Change-Id: I1596a64fe1806df17c28c7586bb1ce6283b9ae02 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/corelib/tools/qdatetime.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index 5c1668033c..e5c1e104a2 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -217,11 +217,13 @@ public:
QTime time() const;
Qt::TimeSpec timeSpec() const;
qint64 toMSecsSinceEpoch() const;
+ // ### Qt 6: use quint64 instead of uint
uint toTime_t() const;
void setDate(const QDate &date);
void setTime(const QTime &time);
void setTimeSpec(Qt::TimeSpec spec);
void setMSecsSinceEpoch(qint64 msecs);
+ // ### Qt 6: use quint64 instead of uint
void setTime_t(uint secsSince1Jan1970UTC);
QString toString(Qt::DateFormat f = Qt::TextDate) const;
@@ -255,6 +257,7 @@ public:
static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
static QDateTime fromString(const QString &s, const QString &format);
+ // ### Qt 6: use quint64 instead of uint
static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
static QDateTime fromMSecsSinceEpoch(qint64 msecs);
static qint64 currentMSecsSinceEpoch() Q_DECL_NOTHROW;