diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-28 16:55:22 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-28 18:20:26 +0200 |
| commit | 6f4e86b62121c94b36e89b8bd7de50099733547f (patch) | |
| tree | 20fed2261b3cedc74b29464ca81e83c9bdbb48f8 | |
| parent | 49319a861790ca35d2f9c8add5a5742b243f5d3d (diff) | |
| download | meta-qt5-6f4e86b62121c94b36e89b8bd7de50099733547f.tar.gz | |
qtbase-5.0.2: backport fix for build with gcc-4.8
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | recipes-qt/qt5/qtbase-5.0.2/0017-Rename-qAbs-Function-for-timeval.patch | 44 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase_5.0.2.bb | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase-5.0.2/0017-Rename-qAbs-Function-for-timeval.patch b/recipes-qt/qt5/qtbase-5.0.2/0017-Rename-qAbs-Function-for-timeval.patch new file mode 100644 index 00000000..d6ab7637 --- /dev/null +++ b/recipes-qt/qt5/qtbase-5.0.2/0017-Rename-qAbs-Function-for-timeval.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 126d2c4beff40bc51a1912a752b23c178eac59b5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= <david.narvaez@computer.org> | ||
| 3 | Date: Sat, 23 Feb 2013 23:14:50 -0500 | ||
| 4 | Subject: [PATCH 17/17] Rename qAbs Function for timeval | ||
| 5 | |||
| 6 | This decouples it from qAbs which is declared as a constexpr under | ||
| 7 | certain compilation flags and enables for qtbase to be compiled with | ||
| 8 | GCC 4.8 | ||
| 9 | |||
| 10 | Change-Id: I78e02256ffc8b460ca74ae5241e77dfac4e09ba9 | ||
| 11 | Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> | ||
| 12 | |||
| 13 | Upstream-Status: Backported from stable branch | ||
| 14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 15 | --- | ||
| 16 | src/corelib/kernel/qtimerinfo_unix.cpp | 5 ++--- | ||
| 17 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp | ||
| 20 | index 0eee425..7a29247 100644 | ||
| 21 | --- a/src/corelib/kernel/qtimerinfo_unix.cpp | ||
| 22 | +++ b/src/corelib/kernel/qtimerinfo_unix.cpp | ||
| 23 | @@ -94,8 +94,7 @@ timeval QTimerInfoList::updateCurrentTime() | ||
| 24 | |||
| 25 | #if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) && !defined(Q_OS_INTEGRITY)) || defined(QT_BOOTSTRAPPED) | ||
| 26 | |||
| 27 | -template <> | ||
| 28 | -timeval qAbs(const timeval &t) | ||
| 29 | +timeval qAbsTimeval(const timeval &t) | ||
| 30 | { | ||
| 31 | timeval tmp = t; | ||
| 32 | if (tmp.tv_sec < 0) { | ||
| 33 | @@ -144,7 +143,7 @@ bool QTimerInfoList::timeChanged(timeval *delta) | ||
| 34 | timeval tickGranularity; | ||
| 35 | tickGranularity.tv_sec = 0; | ||
| 36 | tickGranularity.tv_usec = msPerTick * 1000; | ||
| 37 | - return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10); | ||
| 38 | + return elapsedTimeTicks < ((qAbsTimeval(*delta) - tickGranularity) * 10); | ||
| 39 | } | ||
| 40 | |||
| 41 | /* | ||
| 42 | -- | ||
| 43 | 1.8.2.1 | ||
| 44 | |||
diff --git a/recipes-qt/qt5/qtbase_5.0.2.bb b/recipes-qt/qt5/qtbase_5.0.2.bb index 89cfb725..c2cd97b6 100644 --- a/recipes-qt/qt5/qtbase_5.0.2.bb +++ b/recipes-qt/qt5/qtbase_5.0.2.bb | |||
| @@ -5,6 +5,7 @@ PR = "${INC_PR}.0" | |||
| 5 | 5 | ||
| 6 | SRC_URI += " \ | 6 | SRC_URI += " \ |
| 7 | file://0016-Allow-tslib-to-be-specified-at-configure-time.patch \ | 7 | file://0016-Allow-tslib-to-be-specified-at-configure-time.patch \ |
| 8 | file://0017-Rename-qAbs-Function-for-timeval.patch \ | ||
| 8 | " | 9 | " |
| 9 | 10 | ||
| 10 | SRC_URI[md5sum] = "a4fec8ed03867c4ee4fe5a46001a11f0" | 11 | SRC_URI[md5sum] = "a4fec8ed03867c4ee4fe5a46001a11f0" |
