diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-10-24 23:27:44 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-10-25 08:45:21 +0000 |
commit | 2de38813d72ff243459897aea2b2596287e4e1d3 (patch) | |
tree | dd4deccf587019e9986677a549cfacc20d543cc0 /src/quicktemplates2/qquickbutton.cpp | |
parent | bd4f5a04969b2e69a56c9f735e9376e89ef83690 (diff) |
QQuickButton: promote autoRepeat back to QQuickAbstractButton
The original reason why autoRepeat was demoted to QQuickButton was that
some subclasses, such as QQuickCheckBox, did not need this property.
The same was done with the checkable property. It was first demoted,
and then promoted back to QQuickAbstractButton. These can be useful for
building custom AbstractButton-based controls. Now that we want to make
auto-repeat configurable (autoRepeatInterval and autoRepeatDelay), and
the logic has to be in the base class anyway, it makes more sense to
expose all these in the base class instead of doing the property hiding
tricks for all three properties.
[ChangeLog][Controls][AbstractButton] The autoRepeat property was
promoted from Button to AbstractButton.
Change-Id: Ife105da00d7d87a74fc8160ec35762b6f71d3ad9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickbutton.cpp')
-rw-r--r-- | src/quicktemplates2/qquickbutton.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/quicktemplates2/qquickbutton.cpp b/src/quicktemplates2/qquickbutton.cpp index b5a8ac1c..adbc48fd 100644 --- a/src/quicktemplates2/qquickbutton.cpp +++ b/src/quicktemplates2/qquickbutton.cpp @@ -99,24 +99,6 @@ QQuickButton::QQuickButton(QQuickButtonPrivate &dd, QQuickItem *parent) { } -/*! - \qmlproperty bool QtQuick.Controls::Button::autoRepeat - - This property holds whether the button repeats - \l {AbstractButton::}{pressed()}, \l {AbstractButton::}{released()} - and \l {AbstractButton::}{clicked()} signals while the button is pressed - and held down. - - The default value is \c false. -*/ - -void QQuickButton::buttonChange(ButtonChange change) -{ - QQuickAbstractButton::buttonChange(change); - if (change == ButtonAutoRepeatChange) - emit autoRepeatChanged(); -} - QFont QQuickButton::defaultFont() const { return QQuickControlPrivate::themeFont(QPlatformTheme::PushButtonFont); |