qtbase-5.0.2: backport fix for build with gcc-4.8

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa 2013-05-28 16:55:22 +02:00
parent 49319a8617
commit 6f4e86b621
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From 126d2c4beff40bc51a1912a752b23c178eac59b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= <david.narvaez@computer.org>
Date: Sat, 23 Feb 2013 23:14:50 -0500
Subject: [PATCH 17/17] 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>
Upstream-Status: Backported from stable branch
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/corelib/kernel/qtimerinfo_unix.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp
index 0eee425..7a29247 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);
}
/*
--
1.8.2.1

View File

@ -5,6 +5,7 @@ PR = "${INC_PR}.0"
SRC_URI += " \
file://0016-Allow-tslib-to-be-specified-at-configure-time.patch \
file://0017-Rename-qAbs-Function-for-timeval.patch \
"
SRC_URI[md5sum] = "a4fec8ed03867c4ee4fe5a46001a11f0"