Port away from deprecated QDateTime(QDate) constructor
GIT_SILENT
This commit is contained in:
parent
fe73c236db
commit
633eeaafdd
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user