Commit dcc481ab authored by Robert Krawitz's avatar Robert Krawitz

Provide FastDateTime constructor from QTime for older Qt

parent 88c0bea6
......@@ -37,6 +37,12 @@ Utilities::FastDateTime::FastDateTime(const QDate &d, const QTime &t,
{
}
Utilities::FastDateTime::FastDateTime(const QDate &d)
: m_dateTime(d),
m_msecsSinceEpoch(toValidatedMSecs(m_dateTime))
{
}
Utilities::FastDateTime::FastDateTime(const QDateTime &other)
: m_dateTime(other),
m_msecsSinceEpoch(toValidatedMSecs(m_dateTime))
......
......@@ -43,6 +43,7 @@ class FastDateTime
public:
FastDateTime();
FastDateTime(const QDate &d, const QTime &t, Qt::TimeSpec spec = Qt::LocalTime);
FastDateTime(const QDate &d);
FastDateTime(const FastDateTime &other) : m_dateTime(other.m_dateTime), m_msecsSinceEpoch(other.m_msecsSinceEpoch) {}
// Needed for QDate(Y, M, D).startOfDay()
FastDateTime(const QDateTime &other);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment