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>
This commit is contained in:
parent
425560cc83
commit
fcbb8131ea
@ -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);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user