Skip to content

Commit

Permalink
[Qt] small changes to sendcoinsdialog
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Philip Kaufmann committed Nov 25, 2014
1 parent a574189 commit a328dd6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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);

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a328dd6

Please sign in to comment.