Skip to content

Commit aeb18b6

Browse files
committed
Bugfix: GUI: Check validity when QValidatedLineEdit::setText is called
1 parent b1a544b commit aeb18b6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/qt/qvalidatedlineedit.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ QValidatedLineEdit::QValidatedLineEdit(QWidget *parent) :
1515
connect(this, SIGNAL(textChanged(QString)), this, SLOT(markValid()));
1616
}
1717

18+
void QValidatedLineEdit::setText(const QString& text)
19+
{
20+
QLineEdit::setText(text);
21+
checkValidity();
22+
}
23+
1824
void QValidatedLineEdit::setValid(bool _valid)
1925
{
2026
if(_valid == this->valid)

src/qt/qvalidatedlineedit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class QValidatedLineEdit : public QLineEdit
2929
const QValidator *checkValidator;
3030

3131
public Q_SLOTS:
32+
void setText(const QString&);
3233
void setValid(bool valid);
3334
void setEnabled(bool enabled);
3435

0 commit comments

Comments
 (0)