mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 15:27:57 +00:00
Merge pull request #762 from laanwj/qtprogressfix
Revert to global progress indication, also fix the build
This commit is contained in:
commit
43cda5f325
@ -417,7 +417,6 @@ void BitcoinGUI::setNumBlocks(int count)
|
|||||||
{
|
{
|
||||||
if(!clientModel)
|
if(!clientModel)
|
||||||
return;
|
return;
|
||||||
int initTotal = clientModel->getNumBlocksAtStartup();
|
|
||||||
int total = clientModel->getNumBlocksOfPeers();
|
int total = clientModel->getNumBlocksOfPeers();
|
||||||
QString tooltip;
|
QString tooltip;
|
||||||
|
|
||||||
@ -428,8 +427,8 @@ void BitcoinGUI::setNumBlocks(int count)
|
|||||||
progressBarLabel->setVisible(true);
|
progressBarLabel->setVisible(true);
|
||||||
progressBarLabel->setText(tr("Synchronizing with network..."));
|
progressBarLabel->setText(tr("Synchronizing with network..."));
|
||||||
progressBar->setVisible(true);
|
progressBar->setVisible(true);
|
||||||
progressBar->setMaximum(total - initTotal);
|
progressBar->setMaximum(total);
|
||||||
progressBar->setValue(count - initTotal);
|
progressBar->setValue(count);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
|||||||
case ProxyIP:
|
case ProxyIP:
|
||||||
return QVariant(QString::fromStdString(addrProxy.ToStringIP()));
|
return QVariant(QString::fromStdString(addrProxy.ToStringIP()));
|
||||||
case ProxyPort:
|
case ProxyPort:
|
||||||
return QVariant(QString::fromStdString(addrProxy.ToStringPort()));
|
return QVariant(addrProxy.GetPort());
|
||||||
case Fee:
|
case Fee:
|
||||||
return QVariant(nTransactionFee);
|
return QVariant(nTransactionFee);
|
||||||
case DisplayUnit:
|
case DisplayUnit:
|
||||||
@ -87,7 +87,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
|||||||
case ProxyIP:
|
case ProxyIP:
|
||||||
{
|
{
|
||||||
// Use CAddress to parse and check IP
|
// Use CAddress to parse and check IP
|
||||||
CAddress addr(value.toString().toStdString() + ":1");
|
CNetAddr addr(value.toString().toStdString());
|
||||||
if (addr.IsValid())
|
if (addr.IsValid())
|
||||||
{
|
{
|
||||||
addrProxy.SetIP(addr);
|
addrProxy.SetIP(addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user