Rename qAbs Function for timeval

This decouples it from qAbs which is declared as a constexpr under
certain compilation flags and enables for qtbase to be compiled with
GCC 4.8

Change-Id: I78e02256ffc8b460ca74ae5241e77dfac4e09ba9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
David E. Narváez 2013-02-23 23:14:50 -05:00 committed by The Qt Project
parent cf885ee836
commit d9ff510f02

View File

@ -94,8 +94,7 @@ timeval QTimerInfoList::updateCurrentTime()
#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_INTEGRITY)) || defined(QT_BOOTSTRAPPED)
template <>
timeval qAbs(const timeval &t)
timeval qAbsTimeval(const timeval &t)
{
timeval tmp = t;
if (tmp.tv_sec < 0) {
@ -144,7 +143,7 @@ bool QTimerInfoList::timeChanged(timeval *delta)
timeval tickGranularity;
tickGranularity.tv_sec = 0;
tickGranularity.tv_usec = msPerTick * 1000;
return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10);
return elapsedTimeTicks < ((qAbsTimeval(*delta) - tickGranularity) * 10);
}
/*