Commit 00831829 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method

parent 0f5c0182
......@@ -47,7 +47,7 @@ find_package(KF5IdentityManagement ${IDENTITYMANAGER_LIB_VERSION} CONFIG REQUIRE
find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
########### Targets ###########
add_subdirectory(src)
......
......@@ -1655,7 +1655,7 @@ void KADateTimeTest::set()
// time_t
utcd = KADateTime(QDate(2005, 6, 6), QTime(12, 15, 20), KADateTime::UTC);
QDateTime qtt = utcd.qDateTime();
uint secs = qtt.toTime_t();
uint secs = qtt.toSecsSinceEpoch();
KADateTime tt;
tt.setTime_t(static_cast<qint64>(secs));
QVERIFY(tt.isUtc());
......
......@@ -1146,7 +1146,7 @@ uint KADateTime::toTime_t() const
const QDateTime qdt = d->toUtc(local);
if (!qdt.isValid())
return uint(-1);
return qdt.toTime_t();
return qdt.toSecsSinceEpoch();
}
void KADateTime::setTime_t(qint64 seconds)
......
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