Mercurial > hg > bitcoin
changeset 1200:bed5698d5381 draft
fix clear() (clear red/invalid status)
author | Wladimir J. van der Laan <laanwj@gmail.com> |
---|---|
date | Fri, 22 Jul 2011 17:06:37 +0200 |
parents | 9ba11f138fcc |
children | e42be0adb78d |
files | src/qt/bitcoinamountfield.cpp src/qt/bitcoinamountfield.h src/qt/qvalidatedlineedit.cpp src/qt/qvalidatedlineedit.h src/qt/sendcoinsentry.cpp |
diffstat | 5 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -55,6 +55,12 @@ } } +void BitcoinAmountField::clear() +{ + amount->clear(); + decimals->clear(); +} + bool BitcoinAmountField::validate() { bool valid = true;
--- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -18,6 +18,8 @@ void setText(const QString &text); QString text() const; + + void clear(); bool validate(); // Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907) // Hence we have to set it up manually
--- a/src/qt/qvalidatedlineedit.cpp +++ b/src/qt/qvalidatedlineedit.cpp @@ -35,3 +35,9 @@ { setValid(true); } + +void QValidatedLineEdit::clear() +{ + setValid(true); + QLineEdit::clear(); +}