aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-11-20 13:06:10 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-11-25 17:00:02 +0100
commita328dd60a7affeb0444f7bd836d70d80b35d9c2a (patch)
tree61062e3e7da5fa569fad62e5cb03026e71de1f37 /src/qt
parenta574189e2acdaa03658bfe495740b2d722984467 (diff)
[Qt] small changes to sendcoinsdialog
- add newly added variables to the constructor init - move an already existing bool also to constructor init - move a connect call to setClientModel and add a NULL pointer check
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/sendcoinsdialog.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index ff39829b95..46eb58ca43 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -12,12 +12,12 @@
#include "guiutil.h"
#include "optionsmodel.h"
#include "sendcoinsentry.h"
-#include "wallet.h"
#include "walletmodel.h"
#include "base58.h"
#include "coincontrol.h"
#include "ui_interface.h"
+#include "wallet.h"
#include <QMessageBox>
#include <QScrollBar>
@@ -27,7 +27,10 @@
SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SendCoinsDialog),
- model(0)
+ clientModel(0),
+ model(0),
+ fNewRecipientAllowed(true),
+ fFeeMinimized(true)
{
ui->setupUi(this);
@@ -106,13 +109,15 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
-
- fNewRecipientAllowed = true;
}
void SendCoinsDialog::setClientModel(ClientModel *clientModel)
{
this->clientModel = clientModel;
+
+ if (clientModel) {
+ connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
+ }
}
void SendCoinsDialog::setModel(WalletModel *model)
@@ -143,7 +148,6 @@ void SendCoinsDialog::setModel(WalletModel *model)
coinControlUpdateLabels();
// fee section
- connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
@@ -460,7 +464,7 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
return true;
}
-void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
+void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance)
{
Q_UNUSED(unconfirmedBalance);