From b333c3396af80d63b40734293ae59d2e00cd714b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 8 Apr 2016 11:54:52 +0200 Subject: qdoc: Remove Q_QDOC for qRound() and qRound64() These uses of Q_QDOC cause clang to report syntax errors. They are used to hide function return values as qreal instead of using double and float. The decision is to be more transparent and use double and float in the docs instead of qreal. This change does not require clang in qdoc. Change-Id: I65b3afb693b1eff486b0b45b8d972fec96953c5f Task-number: QTBUG-52454 Reviewed-by: Martin Smith --- .../snippets/code/src_corelib_global_qglobal.cpp | 36 +++++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'src/corelib/doc/snippets/code') diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp index a022187c21..ae969ca269 100644 --- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp @@ -131,26 +131,46 @@ absoluteValue = qAbs(myValue); //! [10] -//! [11] -qreal valueA = 2.3; -qreal valueB = 2.7; +//! [11A] +double valueA = 2.3; +double valueB = 2.7; int roundedValueA = qRound(valueA); // roundedValueA = 2 int roundedValueB = qRound(valueB); // roundedValueB = 3 -//! [11] +//! [11A] +//! [11B] +float valueA = 2.3; +float valueB = 2.7; -//! [12] -qreal valueA = 42949672960.3; -qreal valueB = 42949672960.7; +int roundedValueA = qRound(valueA); +// roundedValueA = 2 +int roundedValueB = qRound(valueB); +// roundedValueB = 3 +//! [11B] + + +//! [12A] +double valueA = 42949672960.3; +double valueB = 42949672960.7; + +qint64 roundedValueA = qRound64(valueA); +// roundedValueA = 42949672960 +qint64 roundedValueB = qRound64(valueB); +// roundedValueB = 42949672961 +//! [12A] + +//! [12B] +float valueA = 42949672960.3; +float valueB = 42949672960.7; qint64 roundedValueA = qRound64(valueA); // roundedValueA = 42949672960 qint64 roundedValueB = qRound64(valueB); // roundedValueB = 42949672961 -//! [12] +//! [12B] //! [13] -- cgit v1.2.3