diff options
author | Martin Smith <martin.smith@theqtcompany.com> | 2016-04-08 11:54:52 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@theqtcompany.com> | 2016-04-08 14:11:32 +0000 |
commit | b333c3396af80d63b40734293ae59d2e00cd714b (patch) | |
tree | 47c8fc418ed0622e71ff9a4dbc41ab8873488819 /src/corelib/doc/snippets | |
parent | e1d44b531d9a40b3f485e7532794642ca65fb0ee (diff) |
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 <martin.smith@theqtcompany.com>
Diffstat (limited to 'src/corelib/doc/snippets')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp | 36 |
1 files changed, 28 insertions, 8 deletions
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] |