From 21fa05ea8863cddbf52f74ac0bc8fa4e8dc3625bd2931d7ad9c36861bc2374d9 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 26 Dec 2018 23:22:30 +0000 Subject: [PATCH] Accepting request 660518 from KDE:Qt5 - Add 0001-Fix-qfloat16-methods-definition-without-declaration-.patch (a slightly different version of workaround-qdoc-failure.patch in libqt5-qtdoc, which was submitted upstream to fix libqt5-qtdoc building also when qt modules other than qtbase include qfloat16.h from the system qtbase package (boo#1092425, qtbug#72725) OBS-URL: https://build.opensuse.org/request/show/660518 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=91 --- ...hods-definition-without-declaration-.patch | 44 +++++++++++++++++++ libqt5-qtbase.changes | 9 ++++ libqt5-qtbase.spec | 2 + 3 files changed, 55 insertions(+) create mode 100644 0001-Fix-qfloat16-methods-definition-without-declaration-.patch diff --git a/0001-Fix-qfloat16-methods-definition-without-declaration-.patch b/0001-Fix-qfloat16-methods-definition-without-declaration-.patch new file mode 100644 index 0000000..9590b20 --- /dev/null +++ b/0001-Fix-qfloat16-methods-definition-without-declaration-.patch @@ -0,0 +1,44 @@ +From edc15323b4ef13a2a58ba4bebd46a78449b628ee Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Fri, 21 Dec 2018 12:33:39 +0100 +Subject: [PATCH] Fix qfloat16 methods definition without declaration when + using Q_QDOC + +This fixes qtdoc failing to build on i586 because of an assertion in +libclang since Q_QDOC is defined and thus the declaration of the +qfloat16(float) constructor and operator float() are removed, thus +their definitions should be removed too, which is what this patch +does. + +This patch was done together with Michal Srb . + +Fixes: QTBUG-72725 + +Change-Id: I6424873425d46345e09f411f9ce88f2520825da4 +--- + src/corelib/global/qfloat16.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h +index a8befd7adb..3e50ad8467 100644 +--- a/src/corelib/global/qfloat16.h ++++ b/src/corelib/global/qfloat16.h +@@ -123,6 +123,7 @@ Q_REQUIRED_RESULT inline bool qIsNull(qfloat16 f) Q_DECL_NOTHROW + inline int qIntCast(qfloat16 f) Q_DECL_NOTHROW + { return int(static_cast(f)); } + ++#ifndef Q_QDOC + QT_WARNING_PUSH + QT_WARNING_DISABLE_CLANG("-Wc99-extensions") + QT_WARNING_DISABLE_GCC("-Wold-style-cast") +@@ -162,6 +163,7 @@ inline qfloat16::operator float() const Q_DECL_NOTHROW + return f; + #endif + } ++#endif + + inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW + { +-- +2.19.2 + diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index 5ae5c52..b825abf 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Dec 20 17:37:42 UTC 2018 - Antonio Larrosa + +- Add 0001-Fix-qfloat16-methods-definition-without-declaration-.patch + (a slightly different version of workaround-qdoc-failure.patch in + libqt5-qtdoc, which was submitted upstream to fix libqt5-qtdoc + building also when qt modules other than qtbase include qfloat16.h + from the system qtbase package (boo#1092425, qtbug#72725) + ------------------------------------------------------------------- Thu Dec 6 13:35:10 UTC 2018 - fabian@ritter-vogt.de diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index d086ad5..5a6c223 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -69,6 +69,8 @@ Patch17: 0001-Sanitize-QXcbScreen-s-pixelDensity-values.patch Patch18: 0002-xcb-Use-the-screen-s-physical-DPI-as-logical-DPI-unl.patch # PATCH-FIX-UPSTREAM Patch19: qapplication-emit-palettechanged.patch +# PATCH-FIX-UPSTREAM +Patch20: 0001-Fix-qfloat16-methods-definition-without-declaration-.patch # patches 1000-2000 and above from upstream 5.12 branch # # patches 2000-3000 and above from upstream 5.13/dev branch # BuildRequires: alsa-devel