diff options
author | Antonio Larrosa <alarrosa@suse.com> | 2018-12-21 15:22:35 +0100 |
---|---|---|
committer | Antonio Larrosa <alarrosa@suse.com> | 2018-12-21 17:21:34 +0000 |
commit | 9ab04795e2eb8ae3fdb6ab6ef75f26db9d25e876 (patch) | |
tree | 509b13fdf1e88839ffb313b90ffaddddf07cf6ed /src/corelib/global | |
parent | c879fc2ab7c5278f1a1f7727b011479a5baafc0c (diff) |
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 <msrb@suse.com>
Change-Id: I6424873425d46345e09f411f9ce88f2520825da4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qfloat16.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<float>(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 { |