summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-28 16:01:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-29 22:48:00 +0200
commitfcbb8131ea3a18fc6aa3743cfd61e72dd8472cac (patch)
tree7a75ba85a6a534076033419aca61a0e206dc3c9c /src/widgets/widgets
parent425560cc83f2e71376f03e61e0db7c09c3342631 (diff)
Enable Qt 5 connection syntax for QAbstractButton::animateClick()
Slot QAbstractButton::animateClick() is commonly connected to signal QLineEdit::returnPressed() in dialogs. The function had a parameter with a default for specifying the delay which requires a lambda when using Qt 5 connection syntax. Since the default value is used practically everywhere, remove the parameter. [ChangeLog][QtWidgets][QAbstractButton] The interval parameter has been removed from QAbstractButton::animateClick(). Task-number: QTBUG-81845 Change-Id: I4e399138b6aa3a9f0b31c1f10de97ffcbab6a337 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp6
-rw-r--r--src/widgets/widgets/qabstractbutton.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index c8121f6021..9c08ed65ab 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -818,7 +818,7 @@ QButtonGroup *QAbstractButton::group() const
/*!
Performs an animated click: the button is pressed immediately, and
-released \a msec milliseconds later (the default is 100 ms).
+released 100ms later.
Calling this function again before the button is released resets
the release timer.
@@ -829,7 +829,7 @@ This function does nothing if the button is \l{setEnabled()}{disabled.}
\sa click()
*/
-void QAbstractButton::animateClick(int msec)
+void QAbstractButton::animateClick()
{
if (!isEnabled())
return;
@@ -840,7 +840,7 @@ void QAbstractButton::animateClick(int msec)
repaint();
if (!d->animateTimer.isActive())
d->emitPressed();
- d->animateTimer.start(msec, this);
+ d->animateTimer.start(100, this);
}
/*!
diff --git a/src/widgets/widgets/qabstractbutton.h b/src/widgets/widgets/qabstractbutton.h
index d44da2f4f3..ee7378411f 100644
--- a/src/widgets/widgets/qabstractbutton.h
+++ b/src/widgets/widgets/qabstractbutton.h
@@ -116,7 +116,7 @@ public:
public Q_SLOTS:
void setIconSize(const QSize &size);
- void animateClick(int msec = 100);
+ void animateClick();
void click();
void toggle();
void setChecked(bool);