Skip to content
Browse files

Rewrite ProgramInfo::GetSecondsInRecording() so it works in Qt5.

QDateTime::secsTo() returns a qint64 instead of an int in Qt5.
This tweaks things so the code compiles with both Qt4 and Qt5.
  • Loading branch information
daniel-kristjansson authored and jyavenard committed Feb 26, 2013
1 parent 5da62ae commit efd7d422f64ab2057159ef49673d73e4986b2728
Showing with 3 additions and 2 deletions.
  1. +3 −2 mythtv/libs/libmyth/programinfo.cpp
@@ -1705,8 +1705,9 @@ void ProgramInfo::ToMap(InfoMap &progMap,
/// \brief Returns length of program/recording in seconds.
uint ProgramInfo::GetSecondsInRecording(void) const
int recsecs = recstartts.secsTo(endts);
return (uint) ((recsecs>0) ? recsecs : max(startts.secsTo(endts),0));
int64_t recsecs = recstartts.secsTo(endts);
int64_t duration = startts.secsTo(endts);
return (uint) ((recsecs>0) ? recsecs : max(duration,int64_t(0)));

/// \brief Returns last frame in position map or 0

0 comments on commit efd7d42

Please sign in to comment.
You can’t perform that action at this time.