Commit 44ffe900 authored by Robert Krawitz's avatar Robert Krawitz

Fix version-dependent initialization warning

parent d2af41aa
......@@ -38,7 +38,12 @@ Utilities::FastDateTime::FastDateTime(const QDate &d, const QTime &t,
}
Utilities::FastDateTime::FastDateTime(const QDate &d)
: m_dateTime(d),
:
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
m_dateTime(d.startOfDay()),
#else
m_dateTime(d),
#endif
m_msecsSinceEpoch(toValidatedMSecs(m_dateTime))
{
}
......
......@@ -395,11 +395,7 @@ void XMLDB::FileReader::checkIfImagesAreSorted()
if (m_db->uiDelegate().isDialogDisabled(QString::fromLatin1("checkWhetherImagesAreSorted")))
return;
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
Utilities::FastDateTime last = QDate(1900, 1, 1).startOfDay();
#else
Utilities::FastDateTime last(QDate(1900, 1, 1));
#endif
bool wrongOrder = false;
for (DB::ImageInfoListIterator it = m_db->m_images.begin(); !wrongOrder && it != m_db->m_images.end(); ++it) {
if (last > (*it)->date().start() && (*it)->date().start().isValid())
......
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