diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-05-14 11:18:39 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-05-14 11:18:39 +0200 |
commit | 6644d98d9eeaa24c197d18665b1461b8cd4300ea (patch) | |
tree | 2420a36fc6b0b7b62ce1c62406c826df1ab01875 /gui | |
parent | 1f2e0df86573910257318cbdc2c80d114f90d85c (diff) |
integration phase
Diffstat (limited to 'gui')
-rw-r--r-- | gui/include/bitcoinaddressvalidator.h | 2 | ||||
-rw-r--r-- | gui/src/bitcoinaddressvalidator.cpp | 4 | ||||
-rw-r--r-- | gui/src/sendcoinsdialog.cpp | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/gui/include/bitcoinaddressvalidator.h b/gui/include/bitcoinaddressvalidator.h index 8b57a24714..d1a06f7e57 100644 --- a/gui/include/bitcoinaddressvalidator.h +++ b/gui/include/bitcoinaddressvalidator.h @@ -11,7 +11,7 @@ class BitcoinAddressValidator : public QRegExpValidator public: explicit BitcoinAddressValidator(QObject *parent = 0); - static const QString valid_chars; + static const int MaxAddressLength = 34; signals: public slots: diff --git a/gui/src/bitcoinaddressvalidator.cpp b/gui/src/bitcoinaddressvalidator.cpp index 408027b4d5..8e71916391 100644 --- a/gui/src/bitcoinaddressvalidator.cpp +++ b/gui/src/bitcoinaddressvalidator.cpp @@ -1,8 +1,8 @@ #include "bitcoinaddressvalidator.h" -const QString BitcoinAddressValidator::valid_chars = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; +#include "base58.h" BitcoinAddressValidator::BitcoinAddressValidator(QObject *parent) : - QRegExpValidator(QRegExp("^["+valid_chars+"]+"), parent) + QRegExpValidator(QRegExp(QString("^[")+QString(pszBase58)+QString("]+")), parent) { } diff --git a/gui/src/sendcoinsdialog.cpp b/gui/src/sendcoinsdialog.cpp index 6f459fb669..6c216d397b 100644 --- a/gui/src/sendcoinsdialog.cpp +++ b/gui/src/sendcoinsdialog.cpp @@ -12,6 +12,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) : ui(new Ui::SendCoinsDialog) { ui->setupUi(this); + ui->payTo->setMaxLength(BitcoinAddressValidator::MaxAddressLength); ui->payTo->setValidator(new BitcoinAddressValidator(this)); ui->payAmount->setValidator(new QDoubleValidator(this)); } |