diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-14 01:00:34 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-14 01:00:34 +0200 |
commit | e164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (patch) | |
tree | 06c50077b8baf41b756dc1aa8021c4a9ca34a9d4 /examples/widgets/touch/pinchzoom/mouse.cpp | |
parent | 721a0e807881e4d00e752e3c3cf62427eb681dd2 (diff) | |
parent | 8d8140dffa9aa680a519b501fc5bdf08c91dd735 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
Diffstat (limited to 'examples/widgets/touch/pinchzoom/mouse.cpp')
-rw-r--r-- | examples/widgets/touch/pinchzoom/mouse.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/touch/pinchzoom/mouse.cpp b/examples/widgets/touch/pinchzoom/mouse.cpp index 1dfd7d749c..8456a0214d 100644 --- a/examples/widgets/touch/pinchzoom/mouse.cpp +++ b/examples/widgets/touch/pinchzoom/mouse.cpp @@ -56,8 +56,8 @@ #include <QStyleOption> #include <qmath.h> -const qreal Pi = M_PI; -const qreal TwoPi = 2 * M_PI; +constexpr qreal Pi = M_PI; +constexpr qreal TwoPi = 2 * M_PI; static qreal normalizeAngle(qreal angle) { @@ -69,9 +69,9 @@ static qreal normalizeAngle(qreal angle) } //! [0] -Mouse::Mouse() - : angle(0), speed(0), mouseEyeDirection(0), - color(QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256)) +Mouse::Mouse() : color(QRandomGenerator::global()->bounded(256), + QRandomGenerator::global()->bounded(256), + QRandomGenerator::global()->bounded(256)) { setTransform(QTransform().rotate(QRandomGenerator::global()->bounded(360 * 16)), true); startTimer(1000 / 33); |