Port away from deprecated QDateTime(QDate) constructor

GIT_SILENT
This commit is contained in:
Friedrich W. H. Kossebau 2020-06-26 05:55:29 +02:00
parent fe73c236db
commit 633eeaafdd

View File

@ -41,7 +41,11 @@ Calendar::Calendar(QObject *parent)
QDateTime Calendar::displayedDate() const
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
return m_displayedDate.startOfDay();
#else
return QDateTime(m_displayedDate);
#endif
}
void Calendar::setDisplayedDate(const QDate &dateTime)
@ -74,7 +78,11 @@ void Calendar::setDisplayedDate(const QDateTime &dateTime)
QDateTime Calendar::today() const
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
return m_today.startOfDay();
#else
return QDateTime(m_today);
#endif
}
void Calendar::setToday(const QDateTime &dateTime)