Doc: Fix QEasingCurve code snippets

Commit ff2a71e3 accidentally removed a code snippet used in documenting
EasingCurve::EasingFunction. This commit restores it and fixes other
minor issues in QEasingCurve code snippets.

Change-Id: Ib19f602a4abbca3511d3d26c5f6da4910f7104a3
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
This commit is contained in:
Topi Reinio 2018-09-11 11:32:26 +02:00 committed by Topi Reiniö
parent edeeba639e
commit 1a9b8715ce
2 changed files with 7 additions and 3 deletions

View File

@ -48,11 +48,15 @@
** **
****************************************************************************/ ****************************************************************************/
//! [typedef]
qreal myEasingFunction(qreal progress);
//! [typedef]
//! [0] //! [0]
QEasingCurve easing(QEasingCurve::InOutQuad); QEasingCurve easing(QEasingCurve::InOutQuad);
for (qreal t = 0.0; t < 1.0; t+=0.1) for (qreal t = 0.0; t < 1.0; t += 0.1)
qWarning() << "Effective progress" << t << " is qWarning() << "Effective progress" << t << "is"
<< easing.valueForProgress(t); << easing.valueForProgress(t);
//! [0] //! [0]

View File

@ -292,7 +292,7 @@
This is a typedef for a pointer to a function with the following This is a typedef for a pointer to a function with the following
signature: signature:
\snippet code/src_corelib_tools_qeasingcurve.cpp 0 \snippet code/src_corelib_tools_qeasingcurve.cpp typedef
*/ */
#include "qeasingcurve.h" #include "qeasingcurve.h"