refactor: Use override for non-final overriders

This commit is contained in:
Hennadii Stepanov
2020-03-14 08:49:59 +02:00
parent f54753293f
commit 1551cea2d5
35 changed files with 106 additions and 105 deletions

View File

@@ -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;