Commit a82bef9f authored by Sergio Martins's avatar Sergio Martins
Browse files

Use secsTo instead of secsTo_long, the later is deprecated

parent 685af727
......@@ -321,7 +321,7 @@ int DateTime::secsTo(const DateTime &dt) const
qint64 DateTime::secsTo_long(const DateTime &dt) const
{
return d->mDateTime.secsTo_long(dt.d->mDateTime);
return d->mDateTime.secsTo(dt.d->mDateTime);
}
QString DateTime::toString(Qt::DateFormat f) const
......
......@@ -147,14 +147,14 @@ int Repetition::nextRepeatCount(const KDateTime &from, const KDateTime &preDateT
{
return d->mInterval.isDaily()
? from.daysTo(preDateTime) / d->mInterval.asDays() + 1
: static_cast<int>(from.secsTo_long(preDateTime) / d->mInterval.asSeconds()) + 1;
: static_cast<int>(from.secsTo(preDateTime) / d->mInterval.asSeconds()) + 1;
}
int Repetition::previousRepeatCount(const KDateTime &from, const KDateTime &afterDateTime) const
{
return d->mInterval.isDaily()
? from.daysTo(afterDateTime.addSecs(-1)) / d->mInterval.asDays()
: static_cast<int>((from.secsTo_long(afterDateTime) - 1) / d->mInterval.asSeconds());
: static_cast<int>((from.secsTo(afterDateTime) - 1) / d->mInterval.asSeconds());
}
} // namespace KAlarmCal
......
Supports Markdown
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