mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
refactor: Use override for non-final overriders
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
connect(lineEdit(), &QLineEdit::textEdited, this, &AmountSpinBox::valueChanged);
|
||||
}
|
||||
|
||||
QValidator::State validate(QString &text, int &pos) const
|
||||
QValidator::State validate(QString &text, int &pos) const override
|
||||
{
|
||||
if(text.isEmpty())
|
||||
return QValidator::Intermediate;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
return valid ? QValidator::Intermediate : QValidator::Invalid;
|
||||
}
|
||||
|
||||
void fixup(QString &input) const
|
||||
void fixup(QString &input) const override
|
||||
{
|
||||
bool valid;
|
||||
CAmount val;
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
m_max_amount = value;
|
||||
}
|
||||
|
||||
void stepBy(int steps)
|
||||
void stepBy(int steps) override
|
||||
{
|
||||
bool valid = false;
|
||||
CAmount val = value(&valid);
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
singleStep = step;
|
||||
}
|
||||
|
||||
QSize minimumSizeHint() const
|
||||
QSize minimumSizeHint() const override
|
||||
{
|
||||
if(cachedMinimumSizeHint.isEmpty())
|
||||
{
|
||||
@@ -175,7 +175,7 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event)
|
||||
bool event(QEvent *event) override
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ protected:
|
||||
return QAbstractSpinBox::event(event);
|
||||
}
|
||||
|
||||
StepEnabled stepEnabled() const
|
||||
StepEnabled stepEnabled() const override
|
||||
{
|
||||
if (isReadOnly()) // Disable steps when AmountSpinBox is read-only
|
||||
return StepNone;
|
||||
|
||||
Reference in New Issue
Block a user