Fix some uninitialized variables in dash-qt (#1324)
* Fix uninitialized variables in WalletModel * Fix uninitialized variable on overviewpage startup
This commit is contained in:
parent
56971f8da1
commit
fecb3e4fe6
@ -271,6 +271,8 @@ void OverviewPage::setWalletModel(WalletModel *model)
|
|||||||
this->walletModel = model;
|
this->walletModel = model;
|
||||||
if(model && model->getOptionsModel())
|
if(model && model->getOptionsModel())
|
||||||
{
|
{
|
||||||
|
// update the display unit, to not use the default ("DASH")
|
||||||
|
updateDisplayUnit();
|
||||||
// Keep up to date with wallet
|
// Keep up to date with wallet
|
||||||
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(), model->getAnonymizedBalance(),
|
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(), model->getAnonymizedBalance(),
|
||||||
model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
|
model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
|
||||||
@ -290,9 +292,6 @@ void OverviewPage::setWalletModel(WalletModel *model)
|
|||||||
updateWatchOnlyLabels(model->haveWatchOnly());
|
updateWatchOnlyLabels(model->haveWatchOnly());
|
||||||
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
|
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the display unit, to not use the default ("DASH")
|
|
||||||
updateDisplayUnit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverviewPage::updateDisplayUnit()
|
void OverviewPage::updateDisplayUnit()
|
||||||
@ -671,4 +670,4 @@ void OverviewPage::DisablePrivateSendCompletely() {
|
|||||||
ui->labelPrivateSendEnabled->setText("<span style='color:red;'>(" + tr("Disabled") + ")</span>");
|
ui->labelPrivateSendEnabled->setText("<span style='color:red;'>(" + tr("Disabled") + ")</span>");
|
||||||
}
|
}
|
||||||
fEnablePrivateSend = false;
|
fEnablePrivateSend = false;
|
||||||
}
|
}
|
||||||
|
@ -36,9 +36,17 @@ WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *wallet, Op
|
|||||||
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
|
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
|
||||||
transactionTableModel(0),
|
transactionTableModel(0),
|
||||||
recentRequestsTableModel(0),
|
recentRequestsTableModel(0),
|
||||||
cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0),
|
cachedBalance(0),
|
||||||
|
cachedUnconfirmedBalance(0),
|
||||||
|
cachedImmatureBalance(0),
|
||||||
|
cachedAnonymizedBalance(0),
|
||||||
|
cachedWatchOnlyBalance(0),
|
||||||
|
cachedWatchUnconfBalance(0),
|
||||||
|
cachedWatchImmatureBalance(0),
|
||||||
cachedEncryptionStatus(Unencrypted),
|
cachedEncryptionStatus(Unencrypted),
|
||||||
cachedNumBlocks(0)
|
cachedNumBlocks(0),
|
||||||
|
cachedTxLocks(0),
|
||||||
|
cachedPrivateSendRounds(0)
|
||||||
{
|
{
|
||||||
fHaveWatchOnly = wallet->HaveWatchOnly();
|
fHaveWatchOnly = wallet->HaveWatchOnly();
|
||||||
fForceCheckBalanceChanged = false;
|
fForceCheckBalanceChanged = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user