From 9ab04795e2eb8ae3fdb6ab6ef75f26db9d25e876 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Fri, 21 Dec 2018 15:22:35 +0100 Subject: 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. Fixes: QTBUG-72725 Done-with: Michal Srb Change-Id: I6424873425d46345e09f411f9ce88f2520825da4 Reviewed-by: Thiago Macieira Reviewed-by: Jesus Fernandez --- src/corelib/global/qfloat16.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/global/qfloat16.h') 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 { -- cgit v1.2.3