[Qt] remove std namespace polution from code
This commit is contained in:
parent
ed789ceade
commit
dca6040a86
@ -30,7 +30,6 @@
|
|||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
QList<CAmount> CoinControlDialog::payAmounts;
|
QList<CAmount> CoinControlDialog::payAmounts;
|
||||||
CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
|
CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
|
||||||
bool CoinControlDialog::fSubtractFeeFromAmount = false;
|
bool CoinControlDialog::fSubtractFeeFromAmount = false;
|
||||||
@ -442,7 +441,7 @@ QString CoinControlDialog::getPriorityLabel(double dPriority, double mempoolEsti
|
|||||||
// shows count of locked unspent outputs
|
// shows count of locked unspent outputs
|
||||||
void CoinControlDialog::updateLabelLocked()
|
void CoinControlDialog::updateLabelLocked()
|
||||||
{
|
{
|
||||||
vector<COutPoint> vOutpts;
|
std::vector<COutPoint> vOutpts;
|
||||||
model->listLockedCoins(vOutpts);
|
model->listLockedCoins(vOutpts);
|
||||||
if (vOutpts.size() > 0)
|
if (vOutpts.size() > 0)
|
||||||
{
|
{
|
||||||
@ -467,7 +466,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
|
|
||||||
if (amount > 0)
|
if (amount > 0)
|
||||||
{
|
{
|
||||||
CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
|
CTxOut txout(amount, (CScript)std::vector<unsigned char>(24, 0));
|
||||||
txDummy.vout.push_back(txout);
|
txDummy.vout.push_back(txout);
|
||||||
if (txout.IsDust(::minRelayTxFee))
|
if (txout.IsDust(::minRelayTxFee))
|
||||||
fDust = true;
|
fDust = true;
|
||||||
@ -487,8 +486,8 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
int nQuantityUncompressed = 0;
|
int nQuantityUncompressed = 0;
|
||||||
bool fAllowFree = false;
|
bool fAllowFree = false;
|
||||||
|
|
||||||
vector<COutPoint> vCoinControl;
|
std::vector<COutPoint> vCoinControl;
|
||||||
vector<COutput> vOutputs;
|
std::vector<COutput> vOutputs;
|
||||||
coinControl->ListSelected(vCoinControl);
|
coinControl->ListSelected(vCoinControl);
|
||||||
model->getOutputs(vCoinControl, vOutputs);
|
model->getOutputs(vCoinControl, vOutputs);
|
||||||
|
|
||||||
@ -568,7 +567,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
// Never create dust outputs; if we would, just add the dust to the fee.
|
// Never create dust outputs; if we would, just add the dust to the fee.
|
||||||
if (nChange > 0 && nChange < CENT)
|
if (nChange > 0 && nChange < CENT)
|
||||||
{
|
{
|
||||||
CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0));
|
CTxOut txout(nChange, (CScript)std::vector<unsigned char>(24, 0));
|
||||||
if (txout.IsDust(::minRelayTxFee))
|
if (txout.IsDust(::minRelayTxFee))
|
||||||
{
|
{
|
||||||
if (CoinControlDialog::fSubtractFeeFromAmount) // dust-change will be raised until no dust
|
if (CoinControlDialog::fSubtractFeeFromAmount) // dust-change will be raised until no dust
|
||||||
@ -687,10 +686,10 @@ void CoinControlDialog::updateView()
|
|||||||
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
||||||
double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
|
double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
|
||||||
|
|
||||||
map<QString, vector<COutput> > mapCoins;
|
std::map<QString, std::vector<COutput> > mapCoins;
|
||||||
model->listCoins(mapCoins);
|
model->listCoins(mapCoins);
|
||||||
|
|
||||||
BOOST_FOREACH(const PAIRTYPE(QString, vector<COutput>)& coins, mapCoins) {
|
BOOST_FOREACH(const PAIRTYPE(QString, std::vector<COutput>)& coins, mapCoins) {
|
||||||
QTreeWidgetItem *itemWalletAddress = new QTreeWidgetItem();
|
QTreeWidgetItem *itemWalletAddress = new QTreeWidgetItem();
|
||||||
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
|
||||||
QString sWalletAddress = coins.first;
|
QString sWalletAddress = coins.first;
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSslCertificate>
|
#include <QSslCertificate>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class SSLVerifyError : public std::runtime_error
|
class SSLVerifyError : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -49,7 +47,7 @@ bool PaymentRequestPlus::parse(const QByteArray& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PaymentRequestPlus::SerializeToString(string* output) const
|
bool PaymentRequestPlus::SerializeToString(std::string* output) const
|
||||||
{
|
{
|
||||||
return paymentRequest.SerializeToString(output);
|
return paymentRequest.SerializeToString(output);
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,6 @@
|
|||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
|
const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
|
||||||
const QString BITCOIN_IPC_PREFIX("bitcoin:");
|
const QString BITCOIN_IPC_PREFIX("bitcoin:");
|
||||||
// BIP70 payment protocol messages
|
// BIP70 payment protocol messages
|
||||||
@ -647,7 +645,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
|
|||||||
// Create a new refund address, or re-use:
|
// Create a new refund address, or re-use:
|
||||||
QString account = tr("Refund from %1").arg(recipient.authenticatedMerchant);
|
QString account = tr("Refund from %1").arg(recipient.authenticatedMerchant);
|
||||||
std::string strAccount = account.toStdString();
|
std::string strAccount = account.toStdString();
|
||||||
set<CTxDestination> refundAddresses = wallet->GetAccountAddresses(strAccount);
|
std::set<CTxDestination> refundAddresses = wallet->GetAccountAddresses(strAccount);
|
||||||
if (!refundAddresses.empty()) {
|
if (!refundAddresses.empty()) {
|
||||||
CScript s = GetScriptForDestination(*refundAddresses.begin());
|
CScript s = GetScriptForDestination(*refundAddresses.begin());
|
||||||
payments::Output* refund_to = payment.add_refund_to();
|
payments::Output* refund_to = payment.add_refund_to();
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
|
QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_main);
|
AssertLockHeld(cs_main);
|
||||||
@ -243,14 +241,14 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
|||||||
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), rec->idx) + "<br>";
|
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), rec->idx) + "<br>";
|
||||||
|
|
||||||
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
|
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
|
||||||
Q_FOREACH (const PAIRTYPE(string, string)& r, wtx.vOrderForm)
|
Q_FOREACH (const PAIRTYPE(std::string, std::string)& r, wtx.vOrderForm)
|
||||||
if (r.first == "Message")
|
if (r.first == "Message")
|
||||||
strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(r.second, true) + "<br>";
|
strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(r.second, true) + "<br>";
|
||||||
|
|
||||||
//
|
//
|
||||||
// PaymentRequest info:
|
// PaymentRequest info:
|
||||||
//
|
//
|
||||||
Q_FOREACH (const PAIRTYPE(string, string)& r, wtx.vOrderForm)
|
Q_FOREACH (const PAIRTYPE(std::string, std::string)& r, wtx.vOrderForm)
|
||||||
{
|
{
|
||||||
if (r.first == "PaymentRequest")
|
if (r.first == "PaymentRequest")
|
||||||
{
|
{
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
|
WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
|
||||||
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
|
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
|
||||||
transactionTableModel(0),
|
transactionTableModel(0),
|
||||||
|
Loading…
Reference in New Issue
Block a user