aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoinamountfield.cpp6
-rw-r--r--src/qt/bitcoinamountfield.h2
-rw-r--r--src/qt/qvalidatedlineedit.cpp6
-rw-r--r--src/qt/qvalidatedlineedit.h1
-rw-r--r--src/qt/sendcoinsentry.cpp2
5 files changed, 16 insertions, 1 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index d545dc52e8..f9df91b333 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -55,6 +55,12 @@ void BitcoinAmountField::setText(const QString &text)
}
}
+void BitcoinAmountField::clear()
+{
+ amount->clear();
+ decimals->clear();
+}
+
bool BitcoinAmountField::validate()
{
bool valid = true;
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 2a0ef4bd99..fd09ab2c9b 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -18,6 +18,8 @@ public:
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
diff --git a/src/qt/qvalidatedlineedit.cpp b/src/qt/qvalidatedlineedit.cpp
index 4b5acd8b07..2430cc9fb5 100644
--- a/src/qt/qvalidatedlineedit.cpp
+++ b/src/qt/qvalidatedlineedit.cpp
@@ -35,3 +35,9 @@ void QValidatedLineEdit::markValid()
{
setValid(true);
}
+
+void QValidatedLineEdit::clear()
+{
+ setValid(true);
+ QLineEdit::clear();
+}
diff --git a/src/qt/qvalidatedlineedit.h b/src/qt/qvalidatedlineedit.h
index 9fc026fab1..f7b9486a6e 100644
--- a/src/qt/qvalidatedlineedit.h
+++ b/src/qt/qvalidatedlineedit.h
@@ -10,6 +10,7 @@ class QValidatedLineEdit : public QLineEdit
Q_OBJECT
public:
explicit QValidatedLineEdit(QWidget *parent = 0);
+ void clear();
protected:
void focusInEvent(QFocusEvent *evt);
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 6e87e9cf99..2d4fe9b123 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -68,7 +68,7 @@ void SendCoinsEntry::clear()
{
ui->payTo->clear();
ui->addAsLabel->clear();
- ui->payAmount->setText(QString());
+ ui->payAmount->clear();
ui->payTo->setFocus();
}