mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
qt: define QT_NO_KEYWORDS
QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros. Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.
This commit is contained in:
@@ -107,7 +107,7 @@ void WalletModel::updateStatus()
|
||||
EncryptionStatus newEncryptionStatus = getEncryptionStatus();
|
||||
|
||||
if(cachedEncryptionStatus != newEncryptionStatus)
|
||||
emit encryptionStatusChanged(newEncryptionStatus);
|
||||
Q_EMIT encryptionStatusChanged(newEncryptionStatus);
|
||||
}
|
||||
|
||||
void WalletModel::pollBalanceChanged()
|
||||
@@ -159,7 +159,7 @@ void WalletModel::checkBalanceChanged()
|
||||
cachedWatchOnlyBalance = newWatchOnlyBalance;
|
||||
cachedWatchUnconfBalance = newWatchUnconfBalance;
|
||||
cachedWatchImmatureBalance = newWatchImmatureBalance;
|
||||
emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance,
|
||||
Q_EMIT balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance,
|
||||
newWatchOnlyBalance, newWatchUnconfBalance, newWatchImmatureBalance);
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ void WalletModel::updateAddressBook(const QString &address, const QString &label
|
||||
void WalletModel::updateWatchOnlyFlag(bool fHaveWatchonly)
|
||||
{
|
||||
fHaveWatchOnly = fHaveWatchonly;
|
||||
emit notifyWatchonlyChanged(fHaveWatchonly);
|
||||
Q_EMIT notifyWatchonlyChanged(fHaveWatchonly);
|
||||
}
|
||||
|
||||
bool WalletModel::validateAddress(const QString &address)
|
||||
@@ -205,7 +205,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||
int nAddresses = 0;
|
||||
|
||||
// Pre-check input data for validity
|
||||
foreach(const SendCoinsRecipient &rcp, recipients)
|
||||
Q_FOREACH(const SendCoinsRecipient &rcp, recipients)
|
||||
{
|
||||
if (rcp.fSubtractFeeFromAmount)
|
||||
fSubtractFeeFromAmount = true;
|
||||
@@ -285,7 +285,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||
{
|
||||
return SendCoinsReturn(AmountWithFeeExceedsBalance);
|
||||
}
|
||||
emit message(tr("Send Coins"), QString::fromStdString(strFailReason),
|
||||
Q_EMIT message(tr("Send Coins"), QString::fromStdString(strFailReason),
|
||||
CClientUIInterface::MSG_ERROR);
|
||||
return TransactionCreationFailed;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||
LOCK2(cs_main, wallet->cs_wallet);
|
||||
CWalletTx *newTx = transaction.getTransaction();
|
||||
|
||||
foreach(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
||||
Q_FOREACH(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
||||
{
|
||||
if (rcp.paymentRequest.IsInitialized())
|
||||
{
|
||||
@@ -337,7 +337,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||
|
||||
// Add addresses / update labels that we've sent to to the address book,
|
||||
// and emit coinsSent signal for each recipient
|
||||
foreach(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
||||
Q_FOREACH(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
||||
{
|
||||
// Don't touch the address book when we have a payment request
|
||||
if (!rcp.paymentRequest.IsInitialized())
|
||||
@@ -361,7 +361,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||
}
|
||||
}
|
||||
}
|
||||
emit coinsSent(wallet, rcp, transaction_array);
|
||||
Q_EMIT coinsSent(wallet, rcp, transaction_array);
|
||||
}
|
||||
checkBalanceChanged(); // update balance immediately, otherwise there could be a short noticeable delay until pollBalanceChanged hits
|
||||
|
||||
@@ -521,7 +521,7 @@ WalletModel::UnlockContext WalletModel::requestUnlock()
|
||||
if(was_locked)
|
||||
{
|
||||
// Request UI to unlock wallet
|
||||
emit requireUnlock();
|
||||
Q_EMIT requireUnlock();
|
||||
}
|
||||
// If wallet is still locked, unlock was failed or cancelled, mark context as invalid
|
||||
bool valid = getEncryptionStatus() != Locked;
|
||||
|
||||
Reference in New Issue
Block a user