aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsentry.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-22 09:30:04 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-23 17:58:47 +0200
commit29eaa316944477af538b75b439a49ee1a9fc2f2a (patch)
tree4cf2d1d0411ab8c558a4980b02b44840de2c4e30 /src/qt/sendcoinsentry.cpp
parent2a05101efd41f4e86a0323f5e00dd040574bc170 (diff)
downloadbitcoin-29eaa316944477af538b75b439a49ee1a9fc2f2a.tar.xz
ui: Make sure sendcoinsentry signals only connected once
Move signal connections to constructor where possible.
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
-rw-r--r--src/qt/sendcoinsentry.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 3c0b8881ff..52545c3857 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -34,6 +34,12 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
GUIUtil::setupAddressWidget(ui->payTo, this);
// just a label for displaying bitcoin address(es)
ui->payTo_is->setFont(GUIUtil::bitcoinAddressFont());
+
+ // Connect signals
+ connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
+ connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+ connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+ connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
}
SendCoinsEntry::~SendCoinsEntry()
@@ -72,11 +78,6 @@ void SendCoinsEntry::setModel(WalletModel *model)
if (model && model->getOptionsModel())
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
- connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
- connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
- connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
- connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
-
clear();
}