From 1a9b8715ced2c72d5f6b474fee5878272874def9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 11 Sep 2018 11:32:26 +0200 Subject: 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 --- src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp index 97453e2b06..88f1e90713 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp @@ -48,11 +48,15 @@ ** ****************************************************************************/ +//! [typedef] +qreal myEasingFunction(qreal progress); +//! [typedef] + //! [0] QEasingCurve easing(QEasingCurve::InOutQuad); - for (qreal t = 0.0; t < 1.0; t+=0.1) - qWarning() << "Effective progress" << t << " is + for (qreal t = 0.0; t < 1.0; t += 0.1) + qWarning() << "Effective progress" << t << "is" << easing.valueForProgress(t); //! [0] -- cgit v1.2.3