Skip to content

Commit

Permalink
Bugfix: GUI: Check validity when QValidatedLineEdit::setText is called
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Feb 13, 2020
1 parent b1a544b commit aeb18b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/qt/qvalidatedlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ QValidatedLineEdit::QValidatedLineEdit(QWidget *parent) :
connect(this, SIGNAL(textChanged(QString)), this, SLOT(markValid()));
}

void QValidatedLineEdit::setText(const QString& text)
{
QLineEdit::setText(text);
checkValidity();
}

void QValidatedLineEdit::setValid(bool _valid)
{
if(_valid == this->valid)
Expand Down
1 change: 1 addition & 0 deletions src/qt/qvalidatedlineedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class QValidatedLineEdit : public QLineEdit
const QValidator *checkValidator;

public Q_SLOTS:
void setText(const QString&);
void setValid(bool valid);
void setEnabled(bool enabled);

Expand Down

0 comments on commit aeb18b6

Please sign in to comment.