diff options
| author | Philip Kaufmann <[email protected]> | 2013-11-20 15:56:51 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-01-29 14:15:55 +0100 |
| commit | c78bd937017212c89c1c7aab07399cec5b6b3bdd (patch) | |
| tree | 92129bb63c2b9bbb724c3a2b4ad643710484e3ea /src/qt/sendcoinsentry.cpp | |
| parent | Merge pull request #3450 (diff) | |
| download | discoin-c78bd937017212c89c1c7aab07399cec5b6b3bdd.tar.xz discoin-c78bd937017212c89c1c7aab07399cec5b6b3bdd.zip | |
[Qt] extend validate line edit and btc address validator
- remove btc address length from address validator
- add an optional btc address check in validated line edit that defaults
to off and is used in GUIUtil::setupAddressWidget()
- an isAcceptable() check is added to validated line edit on focus out
which only kicks in, when a validator is used with that widget
- remove an isAcceptable() check from sendcoinsentry.cpp
- remove obsolete attributes from ui files, which are set by calling
GUIUtil::setupAddressWidget()
- move some more things to GUIUtil::setupAddressWidget() and remove them
from normal code e.g. placeholder text
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
| -rw-r--r-- | src/qt/sendcoinsentry.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index b4e74b078..ad8dd7b73 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -28,9 +28,7 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) : #endif #if QT_VERSION >= 0x040700 ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); - ui->payTo->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)")); #endif - setFocusProxy(ui->payTo); // normal bitcoin address field GUIUtil::setupAddressWidget(ui->payTo, this); @@ -121,7 +119,7 @@ bool SendCoinsEntry::validate() if (recipient.paymentRequest.IsInitialized()) return retval; - if (!ui->payTo->hasAcceptableInput() || !model->validateAddress(ui->payTo->text())) + if (!model->validateAddress(ui->payTo->text())) { ui->payTo->setValid(false); retval = false; |