summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorDavid E. Narváez <david.narvaez@computer.org>2013-02-23 23:14:50 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-24 06:26:53 +0100
commitd9ff510f02bba63dabe7a081a68296056a89ae4c (patch)
tree9c746309698473e22f02d522aaabe59325bb0de7 /src/corelib/kernel
parentcf885ee8363252a263bdbdde7cfcf3cf46a62835 (diff)
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>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qtimerinfo_unix.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
index 0eee425cf9..7a29247fc5 100644
--- a/src/corelib/kernel/qtimerinfo_unix.cpp
+++ b/src/corelib/kernel/qtimerinfo_unix.cpp
@@ -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);
}
/*