diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-04-28 20:40:22 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-29 12:45:12 +0000 |
commit | 3980354daa4d8dfa8ec07ed2c2265ebb137b6f36 (patch) | |
tree | 88d64fe36e91c0242767e1bb5b28f984f8a63882 /src/quicktemplates2/qquicktumbler_p.h | |
parent | 8d340d7f3f28364d6b2b8fad2d4828ae761a2dad (diff) |
Revert Tumbler::displacement to position changes
This reverts commits 150d8fcc7f97e4a5d56bdcf608fa22533d807677 and
0905066bcbb967d3344d399383d0ea4b30e1d489 that broke Tumbler. The
normalized position calculation did not work in some corner cases
(eg. when the total amount of model items is just 2). Therefore,
just go back to "displacement"; and if we ever get this working
correctly, we can call it position and deprecate displacement.
Task-number: QTBUG-53061
Change-Id: Ic721f8a96c250dd5d40f881ff991fae687311996
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p.h')
-rw-r--r-- | src/quicktemplates2/qquicktumbler_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p.h b/src/quicktemplates2/qquicktumbler_p.h index 19d86bf2..e28102e4 100644 --- a/src/quicktemplates2/qquicktumbler_p.h +++ b/src/quicktemplates2/qquicktumbler_p.h @@ -116,23 +116,23 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumblerAttached : public QObject { Q_OBJECT Q_PROPERTY(QQuickTumbler *tumbler READ tumbler CONSTANT) - Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal displacement READ displacement NOTIFY displacementChanged FINAL) public: explicit QQuickTumblerAttached(QQuickItem *delegateItem); ~QQuickTumblerAttached(); QQuickTumbler *tumbler() const; - qreal position() const; + qreal displacement() const; Q_SIGNALS: - void positionChanged(); + void displacementChanged(); private: Q_DISABLE_COPY(QQuickTumblerAttached) Q_DECLARE_PRIVATE(QQuickTumblerAttached) - Q_PRIVATE_SLOT(d_func(), void _q_calculatePosition()) + Q_PRIVATE_SLOT(d_func(), void _q_calculateDisplacement()) }; QT_END_NAMESPACE |