diff options
author | David E. Narváez <david.narvaez@computer.org> | 2013-02-24 04:14:50 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-13 18:34:27 (GMT) |
commit | 522c899b777eb25adb7e235baf0027c0c0a9119a (patch) | |
tree | f031bb77e3a92ac5d0a3b5b3dbb3b216a7dd7346 /src/corelib/kernel | |
parent | 9ea966e79a7d698fd2622fa5ec27101c13f7cefc (diff) | |
download | Qt-522c899b777eb25adb7e235baf0027c0c0a9119a.zip Qt-522c899b777eb25adb7e235baf0027c0c0a9119a.tar.gz Qt-522c899b777eb25adb7e235baf0027c0c0a9119a.tar.bz2 |
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>
(cherry-picked from qtbase commit d9ff510f02bba63dabe7a081a68296056a89ae4c)
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index df3cda1..abf1c29 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -356,8 +356,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) { @@ -406,7 +405,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); } void QTimerInfoList::repairTimersIfNeeded() |