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.

Conflicts:
	src/qt/addressbookpage.cpp
	src/qt/peertablemodel.cpp
	src/qt/receivecoinsdialog.cpp
	src/qt/rpcconsole.cpp

Rebased-From: d29ec6c2301e593d577126d1ca85b93307b32bf1
Github-Pull: #6433
This commit is contained in:
Wladimir J. van der Laan
2015-07-14 13:59:05 +02:00
parent d7101a6d31
commit e092f22951
66 changed files with 184 additions and 186 deletions

View File

@@ -142,7 +142,7 @@ public:
{
parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex+toInsert.size()-1);
int insert_idx = lowerIndex;
foreach(const TransactionRecord &rec, toInsert)
Q_FOREACH(const TransactionRecord &rec, toInsert)
{
cachedWallet.insert(insert_idx, rec);
insert_idx += 1;
@@ -245,7 +245,7 @@ TransactionTableModel::~TransactionTableModel()
void TransactionTableModel::updateAmountColumnTitle()
{
columns[Amount] = BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
emit headerDataChanged(Qt::Horizontal,Amount,Amount);
Q_EMIT headerDataChanged(Qt::Horizontal,Amount,Amount);
}
void TransactionTableModel::updateTransaction(const QString &hash, int status, bool showTransaction)
@@ -262,8 +262,8 @@ void TransactionTableModel::updateConfirmations()
// Invalidate status (number of confirmations) and (possibly) description
// for all rows. Qt is smart enough to only actually request the data for the
// visible rows.
emit dataChanged(index(0, Status), index(priv->size()-1, Status));
emit dataChanged(index(0, ToAddress), index(priv->size()-1, ToAddress));
Q_EMIT dataChanged(index(0, Status), index(priv->size()-1, Status));
Q_EMIT dataChanged(index(0, ToAddress), index(priv->size()-1, ToAddress));
}
int TransactionTableModel::rowCount(const QModelIndex &parent) const
@@ -650,7 +650,7 @@ void TransactionTableModel::updateDisplayUnit()
{
// emit dataChanged to update Amount column with the current unit
updateAmountColumnTitle();
emit dataChanged(index(0, Amount), index(priv->size()-1, Amount));
Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount));
}
// queue notifications to show a non freezing progress dialog e.g. for rescan